Understanding Bitcoin Security: Proof of Work & 51% Attacks

Explore the security mechanisms of the Bitcoin network, focusing on the essential role of proof-of-work (PoW) in deterring 51% attacks. Learn how PoW enhances network security, the economic and com...

TECHNICAL

12/10/20243 min read

Mining is done by machines solving difficult problems and these sort of problems take a lot of computing power and are solved through trial and error. When a mining machine or PC finds the solution to the problem the proof of work has been complete, and it is likely that at least a certain amount of computing power was expended in order to solve this proof of work puzzle. This is why the name is called proof of work, due to the solution being found being a proof that on average a certain amount of computing power was expended in order to solve it, and thus the proof of work has been found. Now how does this help secure the bitcoin blockchain? The difficulty of the puzzle or problem being worked on within the bitcoin blockchain is set so that on average one is solved every 10 minutes. If a large amount of mining machines are working, resulting in a high hash rate on the blockchain, then the problem will be more difficult so that it continues to be solved every 10 minutes on average, the problem will become easier if there is less computing power on the network which is unlikely to trend down over long time periods as mining rigs are becoming more efficient.

If honest nodes control the majority of the hash rate, then the chain will stay honest and keep getting longer as new blocks are added. Any attackers on the network, that is miners acting dishonestly and validating invalid blocks will be wasting their money as they will not be receiving any rewards, so there is no incentive to work against the network unless the attackers can take 51% control of the network. If enough dishonest miners united in order to attack the bitcoin network and attained the majority of the hashing power (commonly known as a 51% attack), this would give the attackers the ability to create the new longest chain as they are outpacing the minority of the honest miners on the network

Even though dishonest nodes and miners have “taken over” all of the previous transactions cannot be reversed without re-mining previous blocks, so say if the attackers wanted to reverse 1 day of the bitcoin blockchain and replace it with invalid blocks, they would have to go back 1 day (144 10-minute blocks) and start re-mining. The problem is that in one day’s time, assuming they had 51% of the mining power, the honest nodes would have already mined more new blocks as they are acting from the present validated blockchain and would be about 4% slower so it would take weeks or months of dishonest nodes retaining the majority of mining power just to reverse the blockchain by a single day, in which time the honest mining pool would increase to take back the network, making any attack with a significant amount of blocks in the past virtually impossible. The attackers would have to do this without getting any financial incentive to do so, unlike the honest miners who receive money to cover the electric bill and for profit. So it would be basically impossible for an attacker to revert the blockchain by a day.

Executing a 51% attack would require a tremendous amount of resources and even if the attacker was trying to just alter the blockchain by a single block, it would require a massive covert amount of brand new hardware being accumulated, but would have to be done quickly as the machines get a higher hash rate every year, preventing accumulation of idle machines over any long time period. This would be absurdly expensive and require a huge amount of secrecy. In the meantime while this 51% attack is occurring, more honest nodes could come online as they see the dishonest nodes starting to take control and if they are able to get just a bit more of the network and take majority again then the 51% attack is completely thwarted, the attackers are marked out and their machines are banned from the Bitcoin blockchain completely, so the billions of dollars worth of hardware becomes useless on the bitcoin network, and cannot be attacked with these machines ever again. Dishonest mining is just burning immense amounts of electricity and receiving no incentive for this, so while it may be able to be done for a short period of time honest nodes will quickly reclaim the network due to the financial incentive structure. To launch a 51% attack on the bitcoin blockchain, at the moment is virtually impossible thanks to the large amount of electricity being used to maintain its security. I believe it is a better use of our planet’s resources than to mine gold, as it can be done without significant harm to the environment. We need a form of money and in part three I will get into why proof of stake, although arguably more secure, violates a key property of what money is supposed to be