Join Nostr
2026-10-21 22:05:09 UTC

LordFestival on Nostr: people say bitcoin has never been hacked. mostly true, but in august 2010 someone ...

people say bitcoin has never been hacked. mostly true, but in august 2010 someone created 184 billion BTC out of thin air and it sat in the chain for about a day

block 74638. one transaction, two outputs, each worth around 92 billion BTC

the bug was simple. the node checked that every output value was non-negative, and that total outputs didn't exceed total inputs. what it didn't check was what happens when you add two huge int64 values together. the sum overflowed, wrapped around to a negative number, and a negative number is obviously less than the inputs. check passed. block valid

so for a few hours the actual consensus rules of bitcoin said this was fine

jeff garzik spotted it, satoshi pushed a patch within roughly 5 hours, and 0.3.10 added range checks so no single output and no total can exceed MAX_MONEY (21M BTC). nodes that upgraded rejected the bad block, miners started building a new chain from before it, and once that chain got longer everyone reorged onto it. the 184 billion coins just stopped existing

what i find interesting looking back:

the fix was a soft fork. it only made the rules stricter, so it didn't need everyone to agree on anything new, just enough hashrate to outpace the bad chain

it only worked because the network was tiny. a handful of people, most of them reading the same forum. try coordinating that today with exchanges, custodians, lightning nodes and thousands of independent node operators. you'd get a mess

and it's the reason MAX_MONEY checks are all over the codebase now. a lot of "boring" defensive code in bitcoin core exists because something like this happened once

sanity checks on value ranges are not optional. learned the hard way at block 74638

#bitcoin #bitcoindev #history