What Is a 51% Attack?

A 51% attack is when a party controlling more than half of a blockchain’s block-producing power reverses recent transactions or blocks new ones from being confirmed. Its best-known consequence is double spending.

On this page 6
  1. How does a 51% attack work?
  2. What can’t an attacker do?
  3. Real-world examples
  4. Can proof-of-stake networks be 51% attacked?
  5. Frequently asked questions
  6. Sources

A 51% attack is when a party controlling more than half of a blockchain’s block-producing power reverses recent transactions or stops new ones from being confirmed. On proof-of-work networks, that power means a majority of the total mining hash rate. The best-known consequence is double spending: spending the same coins twice.

How does a 51% attack work?

On proof-of-work networks, nodes treat the chain with the most accumulated work as the valid one. An attacker with majority hash power turns that rule to their advantage:

  1. The attacker deposits coins on an exchange, and the deposit is confirmed on the public chain.
  2. At the same time, they secretly mine an alternative chain that leaves the deposit out.
  3. Once the exchange credits the deposit, the attacker trades the coins and withdraws a different asset.
  4. When the secret chain overtakes the public one, the attacker broadcasts it. The network switches to the longer chain, and the deposit vanishes from history.

The attacker ends up with both the withdrawn asset and the coins they “deposited”. This rewriting of recent blocks is called a chain reorganization, or reorg.

What can’t an attacker do?

Majority power isn’t unlimited power. An attacker can’t spend other people’s coins without their private keys, can’t change the protocol’s supply rules and can’t make invalid signatures valid. Blocks that break the rules are rejected by full nodes no matter how much hash power produced them. The real risks are reversal of recent transactions and censorship of specific ones. And the attack only works for as long as the attacker holds the majority; once honest miners regain control, the chain returns to normal.

Real-world examples

Smaller networks are more vulnerable because renting a majority of their hash rate is relatively cheap. Ethereum Classic suffered reorg attacks in 2019 and 2020, and Bitcoin Gold in 2018, with exchanges losing funds to double spends.

Part of what makes small networks fragile is that hash power can be rented. An attacker doesn’t need to buy hardware; they can rent a majority for a few hours from hash-rate marketplaces. If a much larger network uses the same mining algorithm, its miners can also easily redirect their power to the smaller chain.

Bitcoin has never been 51% attacked, but in 2014 the GHash.io mining pool briefly approached half of the network’s hash rate, prompting widespread concern and some miners moving to other pools. At Bitcoin’s current hash rate, the hardware and energy cost of such an attack would be enormous.

Can proof-of-stake networks be 51% attacked?

On proof-of-stake networks, the equivalent risk involves controlling a majority of staked assets. On Ethereum, finalizing blocks requires votes from two-thirds of the stake, so a party controlling more than one-third could stall finality. Because validators who break the rules can have their stake slashed, an attack would put the attacker’s own funds at serious risk.

Frequently asked questions

How do exchanges protect themselves? They require more confirmations for deposits on smaller networks, monitor for unusual reorgs and pause deposits and withdrawals when needed.

Can a 51% attack steal my coins? No. An attacker can’t spend your coins without your private key. The main risk is to exchanges and merchants accepting payments, which can fall victim to double spends.

Sources

Read next