Consensus bug · August 15, 2010
The value overflow: 184 billion bitcoin out of nothing
A transaction in block 74,638 created more than 184 billion bitcoin. A fix was out the same evening, and within a day the chain without the bad block had overtaken it.
- Block
- 74,638
- Coins created
- 184,467,440,737 BTC
- Fixed in
- Bitcoin 0.3.10, the same day
- Repaired
- Block 74,691, about 15 hours later
- Identifier
- CVE-2010-5139
Timeline (UTC)
- Aug 15, 2010 · about 18:08 UTCJeff Garzik flags “Strange block 74638” on BitcoinTalk: one transaction has two outputs of 92,233,720,368.54 BTC each, spending an input of 0.5 BTC.
- About 5 hours 40 minutes laterBitcoin 0.3.10 is released with two new checks.
- About 15 hours after the bad blockThe chain built by upgraded nodes passes the bad chain at block 74,691, 53 blocks later, and the bad block drops out of the main chain.
What broke
Bitcoin checked that a transaction did not spend more than it received, but it added up the outputs in a 64-bit number without checking for overflow. Two enormous outputs wrapped the sum around to a small value, so the transaction looked valid and created about 184 billion bitcoin.
How it was fixed
The fix added two rules: no single output may exceed 21 million BTC, and neither may the sum of all outputs. Because it only tightened the rules, it was a soft fork. Nodes that upgraded rejected block 74,638, and miners built a new chain from the block before it until that chain was longer.
Why it matters
It remains the clearest case of Bitcoin’s supply rule being broken by code, and of how it was restored: by people choosing to run different software, not by any authority reversing a ledger.