Imagine Alice pays you, then secretly builds a competing chain that sends the same funds elsewhere. If her miners control slightly more computational power than everyone else, they can make that hidden chain longer. The network accepts it, discards your transaction, and Alice double-spends. section 12.2.3
A 51% attack works by:
- Rewriting part of the ledger’s recent history. section 12.2.3
- Using dominant hashing power to produce the longest chain. section 12.2.3
- Replacing earlier payments with conflicting transactions and invalidating prior payees’ coins. section 12.2.3
Real attacks
Vertcoin suffered a double-spend attack in 2018; Ethereum Classic lost more than $1 million in 2019 after reorganizations exceeding 100 blocks; Bitcoin Gold lost 29 blocks and more than $70,000 in 2020. section 12.2.3
Figure 12.6 A fork in the blockchain: two miners publish a valid block at height 3 (meaning 3 blocks after genesis). Later, another miner mines a block at height 4 that points to the second block at height 3. As the second fork is now longer, it is the valid fork that miners should continue to extend. Note that arrows coming out of a block point to the parent block (the block they extend).
A fork diagram shows two valid branches and why miners continue extending the branch that becomes longer—the mechanism an attacker exploits. section 12.2.3
