What is Blockchain 51% Attack?

2022-06-20, 03:08

TL: DR

- Essentially, a "51% attack" occurs when a single miner or mining group controls most of the coins on a Proof of Work blockchain.

- 51% attacks are probably the biggest threat to blockchain in general.

- A 51% attack occurs when one miner or mining group gains or purchases enough hash power to gain control of 51% or more of a blockchain network, resulting in a double-spend of the cryptocurrency involved.

- A 51% attack on Bitcoin has not been successful, but it has been possible on other altcoin networks with less hash power and poor network security.

Keywords: 51% attack, Bitcoin, blockchain, attack, Ethereum.


Blockchains are ledger systems that record and store data. A blockchain is essentially a list of constantly updated and reviewed transactions. The key feature of a blockchain is that it is made up of a decentralized network of nodes (an essential component of ensuring the decentralization and security of cryptocurrency).

A decentralized blockchain network is one in which no one person or group controls it. The blockchain must be decentralized because all participants must agree on its current state. The validity of a block's state can be guaranteed by requiring an entire network of distributed participants to agree.

You can think of it as asking for recommendations for movies. Someone can say yes to whether a particular movie is good, while the movie could still be terrible. If you asked 1,000 individuals about the movie, and they all said yes, then there would be a greater chance that the movie is good since it would have been unanimously validated. A proof-of-work blockchain, such as Bitcoin, uses consensus to ensure that miners can validate a new block of transactions only if all network nodes agree with the block's validity. Blockchain consensus algorithms are like picky movie critics: They'll watch a movie only if there is consensus that it is good. But the consensus algorithm only asks "everyone," regardless of the number of people. The algorithm will agree if the majority agrees that the movie was good.


What Happens During Mining


As mentioned above, "everyone" in a PoW blockchain refers to all the mining nodes, or "miners." A miner competes with another miner by using their machines to create a hash with an equal number of zeros as the target hash (the code the miner has to beat). In exchange for free crypto and transaction fees, the contest winner must be at the target hash to fill in a new block with transaction data.

Mining machines are more likely to beat the target hash if they have a higher hash rate (capable of processing more hashes per second). This is because they produce more hashes per second than the target hash. The system is similar to the lottery in that someone with 10,000 tickets has a greater chance of winning than someone with only five tickets.

But what happens if a malicious agent succeeds in gaining majority control over the hash rate?

In a 51% attack, one party controls the majority of the hash rate, potentially disrupting the blockchain network. If such were to occur, the attacker would possess enough mining power to modify or exclude transactions intentionally. In addition, a reversal of transactions made while they were in control could also result in double-spending.

An attacker who succeeds at a majority attack has the potential to prevent some or all transactions (transaction denial of service) from being confirmed or prevent any or all other miners from mining, resulting in a mining monopoly.

An attacker, however, would not be able to reverse a transaction from another user nor prevent transactions from being broadcasted to the network through a majority attack. A block's reward can also be changed in the future. In addition, coins can be created out of thin air or stolen that did not belong to the attacker in the first place.



What Is The Likelihood of A 51% Attack?


As a distributed network of nodes maintains a blockchain, it requires the cooperation of all participants to reach a consensus. As a consequence, they are often considered highly secure. As a result, data is more likely to be protected from attacks and corruption with a large network.

The higher the miner's hash rate, the more likely he is to find a valid solution to the next block. The reason is that mining involves a great deal of hashing, and more computing power means more trials per second. Several early miners contributed to the growth and security of the Bitcoin network. As Bitcoin's value grew, numerous new miners entered the system, trying to claim the block rewards (currently 6.25 BTC per block). Bitcoin's security is largely because of this competition. Minors are not motivated to invest large amounts of resources without acting honestly and striving to receive the block reward.

This makes it unlikely that a 51% attack will attack Bitcoin due to the network's size. In addition, the risk of a single person or group gaining enough computing power to overwhelm all the other participants drops rapidly once a blockchain reaches a large size.

As the chain grows, changing the previously confirmed blocks becomes increasingly difficult since they are all linked by cryptographic proofs. The higher the confirmation count of a block, the higher the cost of altering or reverting transactions within that block. Thus, a successful attack would probably only be able to affect transactions of a few recently completed blocks for a short time.

Let's imagine a scenario in which a malicious entity is not motivated by profit and tries to destroy the Bitcoin network at any cost. Whether the attacker disrupts the network, the Bitcoin software and protocol will be modified and adapted within seconds. If there's an emergency, the other nodes on the network would probably reach a consensus and agree on these changes very quickly. Bitcoin is among the most secure and reliable cryptocurrencies and is considered very resilient to attack.

Though it is difficult for an attacker to acquire more computing power than the rest of the Bitcoin network, it isn't so difficult on smaller cryptocurrencies. The amount of computing power that secures the blockchain of altcoins is relatively low compared to Bitcoin. 51% attacks are possible when the threshold is low enough. Monacoin, Bitcoin Gold, and ZenCash are a few examples of cryptocurrencies that have been subjected to majority attacks.


Examples of 51% Attacks


Since it is prohibitively expensive to acquire that much hashing power, major cryptocurrencies, such as Bitcoin or Ethereum, are unlikely to suffer from 51% attacks. That is why 51% attacks can only be successful on smaller cryptocurrencies with fewer mining nodes.

Another factor is the type of mining equipment, with ASIC-secured networks being less vulnerable than those that GPUs can mine. With NiceHash, 51% attacks are possible with only rented hash power, particularly on smaller, solely GPU-powered networks.

As an example, Bitcoin Gold, the 26th most popular cryptocurrency at the time, suffered a 51% attack in May of 2018. Even though Bitcoin Gold repeatedly attempted to raise the exchange thresholds, the attackers managed to double-spend for several days, stealing over $18 million in Bitcoin Gold. Bitcoin Gold was hacked again in 2020.

In the same year, Ethereum Classic, a smaller version of the smart contract blockchain, was attacked three separate times with a 51% attack. Vitalik Buterin, Ethereum's founder, noted this as a disadvantage of PoW networks, suggesting that Proof-of-Stake networks would be less vulnerable.


GHash.IO: The incident


At the end of June 2014, the mining pool GHash.IO reached a hash rate level of around 55% of Bitcoin's during a 24-hour period. The threat of a 51% attack was purely hypothetical until this point, especially when it came to Bitcoin. But suddenly, it had become a reality. In one month, while GHash.IO's share of the network's hash rate remained over 38%, the risk of control being taken over by one single miner or mining pool remained. As a result of this, GHash.IO agreed to keep itself down.

Most attacks (51%) fail or do not last long. Since the mining group did not withhold blocks and/or double-spend on the network, the GHash.IO incident was not a 51% attack. But since then, numerous 51% attacks have been discovered on smaller networks, including Ethereum Classic. Bitcoin has remained secure to date due to its sheer size and the community's commitment at all costs to preserve the network.


What is 34% Attack.


It is possible for an attacker who deploys over a third of the network's computing power to take down the tangle, a distributed ledger used for cryptocurrency such as IOTA. An attack of this type is known as a 34% attack.


What Are the Chances of a 51% Attack on Bitcoin?


Since it is prohibitively expensive to assemble enough hash power and electricity to hijack a network, a successful 51% attack is highly unlikely. A successful Bitcoin attack would require approximately ten thousand of the most advanced mining rigs as of April 2022. A party capable of a similar attack would probably have more to gain by mining honestly and collecting block rewards.


Are There Any Ways To Prevent 51% Attacks On Networks?


A 51% attack can be mitigated in several ways in proof-of-work networks, although the risk cannot be eliminated. Whenever a 51% attack is successful, ASIC miners become substantially more expensive, assuming the same algorithm mines no larger cryptocurrencies. Transactions become irreversible after Bitcoin Cash introduced its ten-block checkpoints at a certain time. Other cryptocurrencies have used ASIC miners, ChainLocks, or changed their consensus algorithms to secure their networks.


Is Ethereum Vulnerable To A 51% Attack?


The same factors mentioned above for Bitcoin prevent Ethereum from being a target for a 51% attack. While Ethereum is a smaller network, it's still too big to be a simple 51% attack target. Furthermore, as Ethereum migrates to proof-of-stake, this risk will disappear.


Final Thoughts


As a quick recap, DPoS (Proof of Stake) enables any user who holds the minimum stake in the network to validate blocks - the equivalent of a miner in a Proof of Stake network.

In the case of the cryptocurrency EOS, validators are elected by the community itself. Twenty-one validators govern EOS. The network's community can quickly remove them if twelve or more of them start collaborating to take control of the network. This method helps in preventing 51% attacks. It also prevents double-spending because the rules for removing them are also written into the blockchain.

Ultimately, 51% attacks remain possible. A secure network relies on the community behind it to support immutability and maintain decentralization.






Author: Gate.io Observer: M. Olatunji
Disclaimer:
* This article represents only the views of the observers and does not constitute any investment suggestions.
*Gate.io reserves all rights to this article. Reposting of the article will be permitted provided Gate.io is referenced. In all other cases, legal action will be taken due to copyright infringement.
分享一下
gate logo
Credit Ranking
Complete Gate Post tasks to upgrade your rank