What is a 51% attack?

Blockchain technology has become very popular because it can store data and make it immutable. CryptocurrencyIt is a digital currency which is an alternative form of payment made using encryption techniques. blockchains make use of this feature to store transactions and avoid double-spending.

What is double spending?

If a user can reacquire the local currency of the network, they spend in one transaction and spend it again in another transaction. It is known as a double spending attack.

To double spend the local currency of the blockchain, such as Bitcoin, we need to make changes to a previous block. It's not possible if the person has average computing power. However, if the person has more than 51% of the network's compute power (in case of proof of work) or has staked 51% of the local currency (proof of stake). In that case, they can take over the entire network as they can process transactions and mine blocks faster than any other node on the network.

51% attack

Usually, a 51% attack follows the following steps:

  • The malicious node (with 51% computation power) spends some cryptocurrency to purchase an item.

  • A miner includes their transaction in their block.

  • Then the malicious miner also mines the same block, excluding the transaction in which they spent those Bitcoins. They do not broadcast this block to other nodes and keep it private.

  • The malicious miner keeps mining new blocks and adding them to their private blockchain.

  • Meanwhile, the honest nodes keep adding new blocks to the original blockchain.

  • When the malicious miner receives that item, they broadcast their private blockchain, and as they have more computing power than the entire network, they would have mined more blocks than the whole network during that time.

  • All blocks are added to the blockchain with a majority vote, and the malicious miner has the majority vote (51%). Thus, their private blockchain will now replace the pre-existing blockchain of honest miners.

A typical 51% attack is shown below:

Initial state of the blockchain
1 of 7

Possible effects of a 51% attack

Malicious users can use the 51% attack to carry out the following activities:

  • Stop the confirmation of new transactions on the network.

  • Stop the generation of new blocks.

  • Rewrite parts of the blockchain (change transactions).

  • Take over the entire network.

Conclusion

Blockchain networks are usually considered very secure, but 51% attack poses a significant threat to the entire network's security. The attacker can take control of the whole network and stop all activities happening on the network. The 51% attack is a bigger threat to the smaller blockchain networks with a small amount of hash power and very little currency to acquire. It is not a threat to bigger networks, such as Bitcoin and Ethereum, because these are very big networks with hundreds and thousands of miners worldwide and very high hash rates.

Free Resources

Copyright ©2024 Educative, Inc. All rights reserved