51% Attack
A 51% attack occurs when a single entity gains control over more than half of a blockchain's mining power, allowing them to manipulate the network's ledger.
The feasibility of a 51% attack depends heavily on the total hash rate of the network. On a small, niche PoW chain with low total mining power, an attacker could potentially rent enough hash power (via services like NiceHash) to execute the attack for a few hours. On a major network like Bitcoin, the physical acquisition of enough ASICs (Application-Specific Integrated Circuits) and the necessary electricity would cost billions of dollars, making the attack financially irrational—the attacker would essentially destroy the value of the network they just invested billions in to control.
graph LR
Center["51% Attack"]:::main
Pre_consensus_mechanisms["consensus-mechanisms"]:::pre --> Center
click Pre_consensus_mechanisms "/terms/consensus-mechanisms"
Pre_proof_of_work["proof-of-work"]:::pre --> Center
click Pre_proof_of_work "/terms/proof-of-work"
Pre_proof_of_stake["proof-of-stake"]:::pre --> Center
click Pre_proof_of_stake "/terms/proof-of-stake"
Rel_double_spending["double-spending"]:::related -.-> Center
click Rel_double_spending "/terms/double-spending"
Rel_sybil_attack["sybil-attack"]:::related -.-> Center
click Rel_sybil_attack "/terms/sybil-attack"
Rel_hard_fork["hard-fork"]:::related -.-> Center
click Rel_hard_fork "/terms/hard-fork"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧒 Explain Like I'm 5
Imagine a [class](/en/terms/class) where everyone votes on who get to play with the ball. If one kid manages to bring 51 friends into the room, they can always outvote the rest of the class. In crypto, if someone has 51% of the 'voting power' (computer power), they can decide which transactions are real and which ones aren't, even if they're lying.
🤓 Expert Deep Dive
Technically, a 51% attack is an exploit of the Nakamoto Consensus 'Longest Chain Rule'. When an attacker controls >50% hashrate, they can generate a private version of the blockchain faster than the rest of the network combined. By keeping this fork secret and then 'releasing' it once it is longer than the public chain, the network is forced to follow the attacker's chain due to the rules of 'Chainwork'. This results in a 'Chain Reorganization' (reorg). The primary damage is the ability to 'Double-Spend' by broadcasting a transaction on the public chain, waiting for confirmation, then releasing the private chain where that transaction never happened.