TeachMeBitcoin

51% Attack Theory

From TeachMeBitcoin, the free encyclopedia Reading time: 3 min

The 51% Attack: Understanding Majority Hashrate Control

A 51% Attack is a theoretical situation where a single entity or group gains control of more than half of the total hashrate on a Proof-of-Work (PoW) blockchain. In the context of Nakamoto Consensus, control over the majority of the "votes" (hash power) allows an attacker to dictate the content and ordering of the most-work chain.

This guide explores the theoretical boundaries of a majority attack and what it means for network security.


⚖️ 1. The Majority Rule

Bitcoin's consensus is based on the principle that the chain with the most cumulative work is the one true ledger. This system is secure as long as more than 50% of the nodes (weighted by CPU power) are honest.

If an attacker controls $q > 0.5$ of the hashrate: * Their expected rate of block discovery is higher than the rest of the network combined ($q > p$). * They can, given enough time, outpace any branch created by the honest network. * They can create a private "shadow chain" and reveal it only when it has more work than the public chain.


2. What an Attacker CANNOT Do

Even with 51% (or even 100%) of the hashrate, an attacker is still bound by the laws of Digital Signatures and Fixed Supply.

An attacker CANNOT: * Steal Coins: They cannot spend coins from an address they don't own, because they cannot forge the ECDSA/Schnorr signatures required for valid transactions. * Change Supply: They cannot change the 21 million cap or create coins out of thin air (inflation), as honest nodes would see these blocks as invalid and reject them instantly, regardless of the work invested. * Reverse Old History: While they can reorg the chain, reversing a block from years ago would require re-mining every block since then at the current difficulty—a feat requiring unimaginable energy.


✅ 3. What an Attacker CAN Do

A majority attacker has the power to manipulate the ordering and inclusion of transactions.

An attacker CAN: * Double Spend: They can send coins to an exchange, wait for confirmations, and then reveal a private chain that never included that transaction, effectively getting the coins back. * Censorship: They can refuse to include specific transactions in their blocks, effectively freezing certain addresses from the ledger. * Starve Other Miners: They can ignore blocks found by other miners, ensuring that only their own blocks become part of the most-work chain, collecting 100% of the rewards.


️ 4. Historical Context: The Ghash.io Incident

In 2014, the mining pool Ghash.io briefly reached 51% of the total Bitcoin hashrate. * Reaction: The community panicked, and users moved their hashrate away from the pool to preserve the decentralized nature of the network. * Outcome: Ghash.io voluntarily capped its hashrate at 40% and eventually collapsed. This demonstrated that the "Social Consensus" and economic incentives of the participants can act as a powerful deterrent against centralized control.

☕ Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!