What Is a 51% Attack?

Bitcoin SV, Verge and Ethereum Classic are all examples of projects that have suffered 51% attacks. But what is it, how does it work, and what damage can it do?

Updated May 11, 2023 at 3:49 p.m. UTC

An attack on a blockchain by a group of miners controlling over 50% of a network’s mining hashrate – the sum of all computing power dedicated to mining and processing transactions – is called a 51% attack.

A blockchain is a type of ledger technology that stores and records data. Put simply, a blockchain is a distributed list of transactions that is constantly being updated and reviewed. One of the key features of a blockchain is that it is made up of a decentralized network of nodes (a crucial piece of ensuring that a cryptocurrency remains decentralized and secure).

Understanding decentralization

A blockchain is decentralized in that no single person or select group of people controls the blockchain network. That decentralization is important because all participants on the blockchain need to agree on the current state of the blockchain. By requiring an entire network of distributed participants to come to the same agreement, the validity of the block’s state can be certain.

Think of it as asking for a movie recommendation. If you were to ask someone if a particular movie was good and they reply yes, it could still be terrible. But if you were to ask 1,000 different people about the movie and they all said yes, then there’s a far better chance the movie is, in fact, good because it’s been unanimously verified. For proof-of-work (PoW) blockchains like Bitcoin, this “consensus” assures that a miner can validate a new block of transactions only if the network nodes agree on the block’s validity. Such consensus algorithms are the picky movie critics of the blockchain world: They will see the new movie only if everyone agrees that it was good. The consensus algorithm, however, merely asks “everybody,” regardless of whether everybody is 10 people or a billion. If a majority agree that the movie was good, then the algorithm will agree with it.

Crowd thumbs up (Getty)
Crowd thumbs up (Getty)

The mining process

In our example above, “everybody” for a PoW blockchain means all the mining nodes, or “miners.” These miners are competing against each other by using their machines to generate a code (known as a hash) that has an equal or higher number of zeros at the front than the target hash (the code every miner needs to beat). Whoever produces the winning hash that beats the target hash wins the right to fill a new block with transaction data and earn free crypto and transaction fees in return.

Miners with more machines or those with machines that have a higher hashrate (capable of producing more hashes per second) have a greater chance of beating the target hash and winning the right to fill the next block with transaction data and adding it to the chain. This is similar in a way to a lottery system where a person with 10,000 tickets has a greater chance of winning versus someone who has only five tickets.

But what happens when a malicious agent manages to gain majority control of the hashrate?

The 51% Attacks!

A 51% attack, also known as a majority attack, occurs when a single person or group of people gains control of over 50% of a blockchain’s hashing power. That is usually achieved by renting mining hash power from a third party.

Successful attackers gain the ability to block new transactions from being confirmed as well as change the ordering of new transactions. It also allows the malicious agents to essentially rewrite parts of the blockchain and reverse their own transactions, leading to an issue known as double spending. This problem was traditionally an issue faced mostly by electronic payments where a network was incapable of proving that two or more people didn’t spend the same digital asset.

A 51% attack, however, is theoretically limited in the amount of disruption it can cause. While the attacker could trigger the double-spending problem, they cannot reverse others’ transactions on the network or prevent users from broadcasting their transactions to the network. Additionally, a 51% attack is incapable of creating new assets, stealing assets from unrelated parties or altering the functionality of block rewards.

Likelihood of a 51% attack

As a blockchain network grows and acquires news mining nodes it makes the chances of a 51% attack taking place less likely. That is because the cost of performing a 51% attack rises in tandem with the network hashrate (the amount of computational power committed to the network). Essentially, the bigger the network and the more nodes there are participating in it, the more hash power is needed to control over 50% of it.

But even if an attacker were to reach above 50% of the hashrate, the size of a blockchain could still provide security. Because blocks are linked together in the chain, a block can be altered only if all subsequently confirmed blocks are eliminated.

While possible, doing so would be incredibly costly for the attacker for two reasons:

  1. The attacker would have to expend great amounts of computing power (cost of electricity) to achieve a 51% hashrate, particularly on larger more established networks
  2. Because the miner is not acting in a way that participates appropriately, they would no longer be receiving the blockchain rewards that come with mining

Thus, the more significant number of transactions there are, the more blocks are on the chain and the more difficult it is to alter a block.

While the threat of a 51% attack still exists (albeit extremely unlikely) on big blockchains like Bitcoin, the financial costs would far outweigh the benefits. Even if an attacker were to expend all of its resources to attack a blockchain, the constant addition of blocks to the chain would give only a relatively small window to a number of transactions for the attacker to alter.

This article was originally published on Oct 12, 2021 at 9:20 a.m. UTC

Disclosure

Please note that our privacy policy, terms of use, cookies, and do not sell my personal information has been updated.

CoinDesk is an award-winning media outlet that covers the cryptocurrency industry. Its journalists abide by a strict set of editorial policies. In November 2023, CoinDesk was acquired by the Bullish group, owner of Bullish, a regulated, digital assets exchange. The Bullish group is majority-owned by Block.one; both companies have interests in a variety of blockchain and digital asset businesses and significant holdings of digital assets, including bitcoin. CoinDesk operates as an independent subsidiary with an editorial committee to protect journalistic independence. CoinDesk employees, including journalists, may receive options in the Bullish group as part of their compensation.

Griffin Mcshane

Griffin McShane is a freelance writer for CoinDesk, currently living in Brooklyn, NY. Griffin has also written the Inside Crypto newsletter for Jason Calacanis' Inside.com and is a member of the International Association of Privacy Professionals (IAPP).


Learn more about Consensus 2024, CoinDesk's longest-running and most influential event that brings together all sides of crypto, blockchain and Web3. Head to consensus.coindesk.com to register and buy your pass now.