51% Attack

A 51% attack is when one party controls most of a blockchain's mining or staking power and uses it to reorder or reverse recent transactions, for example to spend the same coins twice. Small proof-of-work chains are the most at risk.

Blockchains such as Bitcoin stay honest because no single party controls most of the work, or stake, that decides which blocks count. If one party does gain that majority, it can rewrite recent history: undo its own payments, block other people's transactions or decide the order of new blocks. This entry explains what a 51% attack can and cannot do, why waiting for confirmations protects you, and how the risk differs between proof-of-work and proof-of-stake.

Category
Cryptocurrency and Blockchain
Reading time
6 min
Also called
Majority attack, Double-spend attack, Double spending
Updated

A 51% attack in plain words

In proof-of-work, nodes treat the chain with the most work behind it as the true one.1 As long as honest nodes control most of the computing power, their chain grows fastest and outpaces any attacker.1

An attacker with a majority of the hashing power can build a competing chain in secret and then release it, replacing recent blocks.2 That lets them reverse their own recent payment and spend the same coins again, a double spend.1

The attacker still cannot create coins from nothing or take coins that were never theirs, because honest nodes reject invalid transactions.1

How a double-spend attack works, step by step

  1. Gain the majority

    The attacker controls more hashing power than the rest of the network combined.3

  2. Pay someone

    They send coins to a victim, often an exchange, on the public chain.

  3. Mine in secret

    At the same time they build a private chain in which that payment never happened.

  4. Collect the goods

    Once the victim accepts the deposit, the attacker trades or withdraws the value.

  5. Release the longer chain

    Nodes switch to the chain with more work, so blocks on the shorter fork are dropped.2

  6. Payment disappears

    Transactions on the dropped fork may not appear in the new chain, so the payment is reversed.3

Worked examples

Example 1 — Why confirmations help

Wait for blocks

The Bitcoin white paper estimates how often an attacker with 10% of the hashing power could catch up after z blocks.

Example 1 — Why confirmations help — calculation
After 0 blocksP = 1.0000000
After 1 blockP = 0.2045873
After 5 blocksP = 0.0009137 ≈ 0.09%

The odds fall exponentially with each block; to push them below 0.1% the paper lists 5 blocks at 10% and 24 blocks at 30%.1

Example 2 — The attacker's maths

Exchange pays

Hypothetical: an attacker deposits 1,000 coins worth $5 each on an exchange and rents hashing power for $2,000.

Example 2 — The attacker's maths — calculation
Value withdrawn1,000 × $5 = $5,000
Attack cost$2,000
Attacker gain$5,000 − $2,000 = $3,000
Exchange loss$5,000

When renting power costs less than what can be double spent, a small chain becomes a target. A large chain makes the cost far higher.3

Example 3 — Thresholds in proof-of-stake

Stake needed

Hypothetically 30 million ETH is staked. ethereum.org describes what different shares allow.

Example 3 — Thresholds in proof-of-stake — calculation
34% (double finality)30M × 0.34 = 10.2M ETH
Over 50% (fork choice)more than 15M ETH
66% (finalised blocks)30M × 0.66 = 19.8M ETH

Over 50% lets an attacker censor and reorder recent blocks; around two-thirds lets them control finalised blocks.4

51% attacks in proof-of-work vs. proof-of-stake

AspectProof-of-workProof-of-stake (Ethereum)
What is neededMajority of hashing powerMajority of staked ETH
FinalityProbabilistic, grows with blocksExplicit at checkpoints
Main deterrentCost of hardware and energyStake can be slashed or burned
RecoveryHonest miners outpace attackerSocial layer can pick honest fork

Why the 51% attack matters

  • Choosing confirmations

    Exchanges wait for more blocks on smaller chains before crediting deposits. See Block Time and Block Height.

  • Judging a coin's security

    A chain with little hashing power or stake is cheaper to attack. See Mining and Hash Rate.

  • Watching concentration

    Large mining pools can concentrate power and create security risks.3 See Mining Pool.

  • Understanding finality

    It explains why a payment is only safe once it is buried or finalised. See Finality and Reorgs.

Advantages and disadvantages

Advantages

  • Explains why waiting for confirmations protects you.
  • Shows why hash rate and stake size signal security.
  • Clarifies the limits: an attacker cannot steal coins from other wallets.
  • Helps compare the security of different chains.

Disadvantages

  • Small chains can be attacked more cheaply than many expect.
  • Even less than 50% of the power can sometimes succeed against short waits.2
  • Recovery on proof-of-stake may need off-chain social coordination.4
  • A successful attack can damage trust and the coin's price.

Going deeper

Read as far as you need. Each level builds on the one before it.

Rewriting the newest pages

Beginner

A blockchain is like a ledger where each page is sealed to the previous one. Rewriting a page means redoing it and every later page, so old pages are much harder to change than new ones.2

Probabilistic vs. explicit finality

Intermediate

In proof-of-work, each block mined on top of a transaction makes reversal less likely, but never impossible.3 Ethereum's proof-of-stake finalises checkpoints once two-thirds of validators agree, and validators put their stake behind that vote.3 See Proof of Work and Proof of Stake.

Attacks below and above 51%

Advanced

In Ethereum proof-of-stake, about a third of the stake is enough to stop finality, which the inactivity leak slowly repairs by draining non-voting validators.4 Reversing finalised blocks requires more than a third of all staked ETH to be destroyed, which is the basis of its economic finality.4 See Slashing.

Common mistakes

  1. Thinking attackers can take any coins

    They can only reverse their own recent transactions.

  2. Trusting zero confirmations

    An unconfirmed or one-block-deep payment can still disappear.

  3. Assuming 51% is a hard line

    Smaller shares can still win short races; larger shares do more damage.

  4. Ignoring chain size

    The same attack that is impractical on a large chain may be cheap on a small one.

Check your understanding

Test yourself before moving on. Each answer comes with an explanation.

Q1Which of these can a 51% attacker on a proof-of-work chain do?
Q2Why does waiting for more confirmations reduce the risk?

Key points to remember

  1. A 51% attack means controlling most of the mining or staking power.
  2. It allows reversing one's own recent transactions and double spending.
  3. It does not allow stealing coins from other people's wallets.
  4. More confirmations make a reversal exponentially less likely.
  5. Small chains are cheaper to attack than large ones.

Frequently asked questions

Why are large chains hard to attack?

An attacker would need more computing power or stake than all honest participants combined, and on a large chain that costs an enormous amount.

Can a 51% attack happen on proof-of-stake?

In principle, yes, but the attacker must hold a majority of the stake, and the stake can be slashed or the attack rejected by an honest minority fork.

How can I protect myself as a trader?

Wait for the number of confirmations your exchange or wallet recommends, especially for coins on small chains.

Further learning

Sources

This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.

  1. Satoshi Nakamoto. Bitcoin: A Peer-to-Peer Electronic Cash System (opens in a new tab) Checked .
  2. Bitcoin Project (developer.bitcoin.org). Block Chain developer guide (opens in a new tab) Checked .
  3. ethereum.org. Proof-of-work (PoW) (opens in a new tab) Checked .
  4. ethereum.org. Proof-of-stake attack and defense (opens in a new tab) Checked .

Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.