โš ๏ธ

The Inflation Bug

5 min read

incidents educational
Share: X Bluesky Mastodon Reddit HN

Bitcoin's supply is supposed to cap at 21 million coins. On August 15, 2010, that property was briefly false. An attacker exploited an integer-overflow bug in Bitcoin Core to mint 184.467 billion BTC across two outputs in a single transaction in block 74,638. Then Satoshi shipped a fix in 5 hours, the network forked back to a clean tip, and Bitcoin's most existential bug was resolved before most of the world even knew it had happened.

The bad block is not on the chain you're querying right now. The canonical mainnet reflects the fixed history, and a node synced after the fix never stored the bad block. It survives off-chain, in the dump Jeff Garzik posted to the Bitcoin forum about an hour after it was mined and in public archives of invalid blocks. What's readable here: the replacement block at height 74,638, and all the blocks since that have validated under the post-fix rules.

The state at block 74,637

Right before the bug, the network was healthy. Block 74,637 looked normal: a single coinbase transaction paying the 50 BTC subsidy, and nothing else.

Open in playground → last clean block before the bug
Open in playground → aggregate stats: tx count, fees, sizes

Standard. Nothing remarkable.

What happened in block 74,638

On the original (now-orphaned) chain, block 74,638 contained a transaction with two outputs each paying 92,233,720,368.54 BTC. That's 9.22 × 1010 bitcoin per output, more than 4,000 times the entire eventual supply. The bug: Bitcoin Core's CTransaction::CheckTransaction verified that no single output was negative, but set no upper limit on an output's value and didn't verify that the sum of outputs didn't overflow a signed 64-bit integer. The attacker's two outputs summed to a negative number when the math wrapped, which slipped past validation.

The current canonical chain replaced this block with a different one (height 74,638 on the post-fix chain). You can fetch its hash:

Open in playground → post-fix height 74638, the replacement
Open in playground → confirms normal subsidy + outputs

Subsidy: 50 BTC. Total outputs: a normal range. Nothing wrong. The damaged block at this height was orphaned by the patched-client majority.

The fix

Satoshi's response, in five hours, in commit d4c6b90c, added an explicit check: each output must be non-negative AND no larger than 21 million BTC (a new MAX_MONEY constant), AND the running sum of outputs must not exceed 21 million BTC either. The fix shipped as Bitcoin v0.3.10 the same day. Within hours, the patched chain overtook the buggy one, the bad block was orphaned, and the supply was restored to its honest curve.

Look at any block from then to now: subsidy plus fees, all clean.

Open in playground → current chain tip height

The post-fix chain has been clean for 16 years. No output overflow, no inflation, no recurrence. The 21-million cap holds because it's been re-validated by every node, in every block, since.

The lesson

The first existential bug to be exploited on Bitcoin's main network was caught and patched in five hours. That's not because the code was perfect, it wasn't, but because the network was small enough, and Satoshi engaged enough, to coordinate a soft fork in real time.

Today, with Bitcoin Core mature and the network global, fixes look different. But the property the patch enforced, no inflation, has held for 16 years and 800,000+ blocks since. The chain you're querying right now is structurally clean.

That's the trust you're paying for when you run your own node, or use one that does, like ours. Run the queries. Verify the math. The numbers add up.

Sources

Corrected October 2, 2026. An earlier version said the pre-fix code capped each output at the maximum money limit and that the fix required the running sum to stay non-negative; the old code only rejected negative outputs, and the fix caps each output and the running sum at 21 million BTC. It also said the bad block survives in Bitcoin Core's testing data and described block 74,637 as holding ordinary payment transactions; the bad block survives only off-chain, and block 74,637 holds a single coinbase transaction. It called the overflow Bitcoin's first existential bug; an earlier critical bug was patched in July 2010, and the overflow was the first to be exploited on the main network.

Read more: The Genesis Block, 10,000 BTC for Two Pizzas, or The Halvings.