In short: On August 15, 2010, the Bitcoin network block 74638 brought a transaction that created out of the blue 184,467,440,737,09551616 bitcoins, more than 8,000 times the limit of 21 million. It was an integer overflow bug in the check of values, today registered as CVE-2010-5139. The failure was noted on the same day, Satoshi Nakamoto published a correction in a few hours, and the "good" block chain surpassed the "bad" in block 74691, on August 16. Fake Bitcoins ceased to exist.
The incident in numbers
Those who defend Bitcoin often say that no one can print more coins beyond the 21 million limit. In August 2010, someone printed more than 184 billion. The episode, known as "Value Overflow Incident", is the most serious bug in the history of Bitcoin and also one of the best demonstrations of how the network fixes errors. This page explains, without jargon, what happened, how the bug worked, how it was fixed and what it teaches about the security of Bitcoin.
Bug timeline
- 15/08/2010Block 74638 is mined with a transaction that generates 184,467,440,737.09551616 BTC for two addresses.
- Same dayDeveloper Jeff Garzik opens the topic "Strange Block 74638" (Strange Block 74638" on the BitcoinTalk forum (74638).
- Same dayUsers identify the entire overflow. Satoshi Nakamoto asks the miners to stop mining and publish a first patch.
- A few hours laterThe correction enters the code repository (review 132). Client version 0.3.10 begins to circulate.
- 16/08/2010The correct current, without the invalid transaction, exceeds the bad current in block 74691. The entire network starts to follow it.
- AfterThe incident is cataloged as CVE-2010-5139.
- September 2018Another failure with inflation risk, CVE-2018-17144, is discovered and corrected before any known exploitation.
What happened on August 15, 2010
Bitcoin was just over a year and a half old and was used by a small group of enthusiasts. On August 15, 2010, block 74638 was mined. Inside it was a common transaction in appearance, but with absurd outputs: two addresses received about 92.2 billion bitcoins each, and the miner of the block took 0.01 BTC more, according to the Bitcoin Wiki. Added together, the outputs reached 184,467,440,737.09551616 BTC.
The transaction spent only 0.5 BTC coming from a "faucet bracket", a site that distributed small amounts of Bitcoin for free to publicize the currency. That is, someone turned half Bitcoin into more than 184 billion. The software of the network nodes, which should reject this, accepted the block as valid.
| Given | Value |
|---|---|
| Date | August 15, 2010 |
| Block | 74638 |
| Total created | 184,467,440,737,09551616 BTC |
| Division | About 92.2 billion BTC for each of two addresses plus 0.01 extra BTC to the miner |
| Spent entry | 0.5 BTC from a faucet |
| Official registration | CVE-2010-5139 |
| Correct current assumed | Block 74691, on August 16, 2010 |
Source: Bitcoin Wiki.
How the bug worked (explained simply)
In the Bitcoin code, the values are not stored in Bitcoins, but in Satoshis, the smallest unit, which is worth 0.00000001 BTC. understand the unit in What are Satoshis?. These values are in 64-bit variables with a signal, a type of number that has a maximum limit of just over 9.2 quintillions. In Satoshis, this is equivalent to about 92.2 billion BTC, precisely the value of each of the two outputs of the transaction.
When such a number goes from the maximum, it "turns around", like an old odometer that goes back to zero after 99,999 km, and becomes a negative number. That's what happened: each exit, alone, was within the limit, but the sum of the two burst. The LFM user explained on the forum that the total transaction was negative and that the check was not applied to the sum of two outputs, according to the Original Topic on BitcoinTalk.
The rule that should stop fraud was simple: the value that comes out of a transaction cannot be greater than the amount that enters. With the negative sum, the software account showed that the transaction spent less than it received, and it passed. The Bitcoin Wiki Summarizes: The verification code did not deal with the case of exits so large that they burst when added together.
The discovery on the forum
The first public alert came from Jeff Garzik, then one of the most active developers on the project. In the topic "Strange Block 74638", he asked about the absurd output value of the block and if the number would not be the maximum of a 64-bit integer, according to the BitcoinTalk. In minutes, other users confirmed that it was an attack exploiting the flaw. The user Theymos predicted the path: a new version of the program would reject the block and start a new valid current. Some miners stopped on their own.
Satoshi's correction
Satoshi Nakamoto acted in the development topic open by the user LFM, with the title "Overflow bug SERIOUS" (SERIOUS Overflow Bug). According to the messages filed in the BitcoinTalk, he first published a preliminary version of the change in the function that checks transactions and asked for review. Then he asked the miners to stop mining, because a new branch would have to be built and "the less you generate, the faster it will be". He then warned that the fix was in the repository, in revision 132, and gave instructions for users to exchange blockchain files for a copy before block 74000 and download the rest again.
A Bitcoin Wiki It records that a new customer was published within five hours of the discovery. The fix changed the consensus rules compatible, in the format called Soft Fork: From there, the network went on to reject transactions with overflow and any output greater than 21 million BTC. The official version 0.3.10 came out in the sequence; A forum participant wrote down after the first patch was available about four hours after the block and that the official launch only took place the next day.
"The less you generate, the faster you'll be."
Satoshi Nakamoto, asking the miners to stop during the correction, on August 15, 2010, according to the BitcoinTalk. free translation.
Learn more about the Bitcoin creator at who is satoshi nakamoto and see other lines of his in Satoshi Nakamoto quotes.
The race between two block chains
Correcting the code wasn't enough. The blockchain There was already the bad block, and many of us still not updated continued to mine on top of it. The network was divided into two: the "bad" current, which included the 184 billion bitcoins, and the "good" current, resumed from the block before the problem by the nodes with the software corrected.
In Bitcoin, the nodes follow the valid current with more accumulated work. As the miners upgraded the program, the good current gained strength. according to Bitcoin Wiki, it surpassed the bad at time 74691, on August 16, 2010, and all the knots began to accept it. In practice, dozens of blocks already mined in the bad current were discarded. To understand the role of miners, see bitcoin mining.
What happened to the 184 billion bitcoins
Ceased to exist. As the invalid transaction is not in the longer chain, the coins created by it do not exist either. The original 0.5 BTC from the faucet was never spent after that, according to the Bitcoin Wiki. Those who mined in the bad chain during those hours also lost the rewards of the discarded blocks.
For today's investor, the most important consequence is that the incident left no mark on the offer. The 21 million limit is still valid, and anyone who runs a knot can check the amount of coins in circulation. Vide How many bitcoins are there e How much bitcoin mining.
The 2018 Bug: CVE-2018-17144
The 2010 case was not the only risk of inflation. In September 2018, an anonymous report sent to developers on September 17 pointed out a flaw that knocked us down. Hours later, developer Matt Corallo realized that the same problem allowed something worse: a miner could spend the same output twice within a transaction and thus create coins, according to the Bitcoin Core official notice.
The difference in relation to 2010 is that the failure was found before being exploited. The corrected versions, 0.16.3 and 0.17.0RC4, came out on September 18, 2018, and the full disclosure came on September 20th. The statement states that the developers were unaware of exploitation attempts. according to the list of vulnerabilities of the Bitcoin Wiki, CVE-2010-5139 and CVE-2018-17144 are the only two flaws in the history of Bitcoin classified as inflation.
The two bitcoin inflation failures
| CVE-2010-5139 | CVE-2018-17144 | |
|---|---|---|
| Date | 15/08/2010 | 17/09/2018 |
| Explored? | Yes, in block 74638 | No known exploitation |
| Cause | Overflow in the sum of the outputs | Lack of checking duplicate entries |
| Correction | New customer in hours and Soft Fork | Versions 0.16.3 and 0.17.0RC4 |
Sources: Bitcoin Wiki and Bitcoin Core.
What the 2010 bug teaches
- Code can have flaws. Bitcoin is not infallible. Security comes from open source, constant review and many people watching over the network.
- The network reacts fast. In 2010, between discovery and correction passed a few hours, and in about a day the correct current came back to dominate.
- Consensus is social and technical. The fix only worked because miners and users updated the software and followed the same rule. Rotating a knot is the way for each one to check the rules on their own.
- Today would be more difficult. With thousands of us, companies and billions of dollars involved, a reversal like the one in 2010 would be much more complicated. That's why the care with changes in the code is so great.
- Attack and blow are different things. The 2010 bug was a protocol failure. Most of the losses of investors, however, come from scams and brokerages, as shown by The biggest crypto hacks in history e a Breaking Mt. Gox.
Common myths about the incident
- "Someone got a billionaire with the bug." No. The coins were erased when the correct current took over.
- "The limit of 21 million is just a promise." The limit is a rule verified by each node. The incident showed that an error in the code can puncture the rule, and also that the network discards blocks that violate it as soon as the software is corrected.
- "Satoshi deleted transactions when he wanted to." The correction changed the validation rules, and it was the miners and we, when updating the program, made the correct current prevail.
Want to test what you learned? do the Bitcoin History Quiz. For another curiosity of the same year, read The history of Bitcoin pizza, of May 2010, and, for the technical context from the beginning, the Bitcoin whitepaper explained.
This content is informative and is not an investment recommendation.
Frequently asked questions
What was the 184 billion bitcoin bug?
It was a flaw in the Bitcoin code exploited on August 15, 2010, in block 74638. A transaction created 184,467,440,737,09551616 BTC because the sum of Outputs blew the limit of a 64-bit number and turned negative, tricking the check. The case is registered as CVE-2010-5139.
The 184 billion bitcoins still exist?
No. Satoshi Nakamoto published a correction in a few hours, the miners updated the software and the block current without the invalid transaction exceeded the bad current in block 74691, on August 16, 2010. How the Transaction is not in the valid current, the coins do not exist.
Who discovered the bug?
The first public alert was from Jeff Garzik, who opened the Strange Block 74638 forum on the same day on the BitcoinTalk forum. Other users, such as LFM and Theymos, explained the burst and path of correction, and Satoshi Nakamoto published the patch.
How long did it take to fix the bug?
According to Bitcoin Wiki, a new customer was published within five hours of the discovery. A forum participant recorded that the first patch came out about four hours after the block and that the official 0.3.10 version was released the next day.
What is integer overflow?
It is when a number passes from the maximum value that the variable can keep and turns, turning a very small or negative number. In Bitcoin, the values in Satoshis are 64-bit variables. The sum of two outputs of about 92.2 billion BTC each blew this limit.
Has the bug affected the 21 million bitcoin limit?
Not permanently. The fix went on to reject any output above 21 million BTC and overflow transactions, and the created coins were discarded with the invalid current. The limit is verified by each node in the network.
Has there ever been another similar bug in bitcoin?
Yes. In September 2018, the CVE-2018-17144 failure could allow a miner to create coins by spending twice the same output. It was corrected in versions 0.16.3 and 0.17.0RC4, and Bitcoin Core said it had no knowledge of exploitation.
References
This content is informative and is not an investment recommendation. found an error? Write to contato@boletimbitcoin.com.