Glossary
51% attack
An attack in which one party controls most of a blockchain's mining or staking power and can rewrite recent transactions.
On this page
A blockchain treats the longest valid chain of blocks as the true record. In a 51% attack, a party with more than half of the network's hash rate can produce blocks faster than everyone else and so decide which chain wins.
What an attacker can do
- Double-spend. Send coins to an exchange, trade them for another asset and withdraw it. Meanwhile, secretly mine an alternative chain in which the original payment never happened, then publish it. The network adopts the longer chain, and the attacker has both the withdrawn asset and the original coins.
- Censor. Refuse to include particular transactions.
- Reorganize recent blocks, undoing transactions others thought were final.
What an attacker cannot do
- Spend coins that belong to someone else, which would need the owner's private key.
- Create coins beyond the protocol's rules.
- Easily alter transactions buried deep in the chain's history.
Who is at risk
The cost depends on how much computing power must be matched. For Bitcoin, that would mean buying and powering a large part of the world's specialized mining hardware. For small coins, enough power can be rented by the hour.
Defenses
- Waiting for more confirmations. Exchanges require many more blocks before crediting deposits of small coins.
- Checkpoints that prevent deep reorganizations.
- Proof of stake, where an attacker must own a majority of staked coins and can have that stake destroyed as a penalty.
Limits
The label is loose. An attacker with somewhat less than half the power can still succeed some of the time, and the risk falls with every block added. For large networks the threat is theoretical. For small proof-of-work coins it has happened repeatedly.
