Mining and Network Security

What Is a 51 Percent Attack

How a majority attack on a blockchain works, what an attacker can and cannot do, why it is expensive on large chains, and examples from smaller networks.

On this page
  1. The idea in plain terms
  2. How the attack works
  3. What an attacker cannot do
  4. Why it is costly on large chains
  5. Examples on smaller chains
  6. Variants and related attacks
  7. Practical takeaways for users

The idea in plain terms

A blockchain is secured by the competition among participants who add blocks. In a proof of work network, the participants with the most computing power find blocks most often. A 51 percent attack, also called a majority attack, happens when one party controls more than half of that power, or in proof of stake, more than the required share of the stake, and uses it to override the honest participants. The number 51 is shorthand: the real thresholds are more subtle, as described below, and an attack can sometimes succeed with less.

How the attack works

Nodes follow the valid chain that has the most accumulated work. An attacker with a majority of mining power can secretly build a private chain, alongside the public one, from some earlier point. Because they have more power, their private chain will on average grow faster. When it becomes longer than the public one, they publish it, and the network switches to it. This is called a reorganization, or reorg, and the blocks on the former public chain are discarded.

The classic goal is a double spend:

  1. The attacker sends coins to an exchange or merchant on the public chain, and receives something of value after some confirmations, such as another asset.
  2. Meanwhile the attacker secretly mines a chain in which those same coins were never sent, instead being sent back to the attacker.
  3. After withdrawing the other asset, the attacker publishes the longer private chain. The payment disappears, and the attacker keeps both.

This is why exchanges and merchants require more confirmations for large payments, and why smaller chains need more. The wait time matters: the deeper a transaction is buried, the more blocks an attacker would have to produce in secret. Confirmation times for transfers are discussed from the user’s side elsewhere.

What an attacker cannot do

The limits are as important as the capabilities.

  • They cannot create coins out of nothing or exceed the supply cap, since nodes reject invalid blocks regardless of how much power produced them.
  • They cannot spend coins from other people’s wallets, because they lack the private keys and signatures.
  • They cannot change the rules of the protocol that full nodes enforce.
  • They cannot reverse old history beyond what they can outwork; going deep needs a sustained advantage.

What they can do is reverse their own recent transactions, and refuse to include other people’s transactions, which is a form of censorship. The most common practical harm is double spending against exchanges and merchants.

Why it is costly on large chains

Mounting the attack means controlling more than half of the hashing power, which for a big network requires a very large amount of specialised hardware and electricity. Buying that hardware would be expensive and could raise its price as a side effect; renting it, where hash power is rentable, is limited by what is on offer. Meanwhile, the network’s own difficulty adjustment means the target is calibrated to the honest total, so the attacker’s chain has to out-produce a huge competing effort.

There is also an economic argument. A successful attack on a major chain would likely damage trust and the coin’s price, reducing the value of anything the attacker gained and of any coins they hold. That does not make it impossible, and no figure for the cost can be stated with confidence, since it depends on hardware availability, electricity and whether an attacker could take over existing facilities. Mining pools sometimes raise the concern that a small number of operators might coordinate; that topic is covered in the mining pools article.

Examples on smaller chains

Attacks have occurred against smaller proof of work networks, where the cost of reaching a majority is much lower. Bitcoin Gold and Ethereum Classic are among the networks that reported reorganizations and double spends in 2018 to 2020. The pattern was similar: a smaller chain sharing a mining algorithm with larger ones, where rented or redirected hash power could be enough. Exchanges responded by raising confirmation requirements or pausing deposits. The details of individual incidents are best checked in contemporary reports, since figures differ between sources. Such events are one type of the security incidents that can affect a coin’s price.

Selfish mining. A miner withholds blocks to gain an unfair share of rewards, a strategy that, in theory, can pay off with less than a majority. Real-world evidence of it is limited.

Proof of stake. Attacks require acquiring a large share of the stake. Such designs add penalties: an attacker who is caught can be slashed, and the community may coordinate a response. The trade-offs are summarised in the proof of work and proof of stake comparison.

Eclipse and network-level attacks. These isolate a victim from the honest network. They are separate from a majority attack, though they can compound the effects.

Practical takeaways for users

  • Larger, more widely mined chains are much harder to attack than small ones.
  • A payment with more confirmations is safer, and the right number rises with the amount.
  • Be cautious with small coins that share mining algorithms with larger ones.
  • A reorganization does not usually mean funds were stolen from wallets, but it can mean a payment you saw was reversed.

Cryptocurrency prices are volatile and people can lose all they invest. This article is educational and is not financial, tax or legal advice.

The complete guide to mining and network security

How Bitcoin Mining Works From Hashing to Block Rewards
Read the guide

Keep exploring

Guides from other topics

All topics →