Blockchain programmers scrutinize and test their code numerous times before they implement them on their platform. But to err is human, and since programming is done by them, mistakes also happen. But some of these mistakes can have a large impact on the crypto community.
One small error can lead to the loss of millions of dollars or complete chaos on the Blockchain. These extensive consequences are an extra reason why you should make your project open-source.
Open-source projects have a large number of developers that check the code for errors, but even with a higher degree of verification there still can be programming mistakes.
In today’s article, we will be looking over some of the biggest crypto programming errors in history.
Ethereum and the Parity Wallet
As devops199 was programming a smart contract that accidentally granted him access to thousands of Parity multi-signature wallets. To fix this issue, he deleted the code. But by doing so, he also froze all of the funds in those wallets for an indefinite period. In the whole ordeal, $300 million worth of Ethereum were lost.
Ironically, the bug that led to this crypto programming disaster was not the same code that resulted in a hacker stealing $32 million on July 20th. By exploiting a flaw in the multi-signature wallet protocol the hacker managed to have control of the wallets. The Parity development team went into correcting the issue, but in early November another hack occurred using the same vulnerability. The second hack saw almost $155m worth of Ether being lost. In retrospective, the effects of both of the hacks combined were still less than the $300 million in Ethereum frozen forever.
Ninety-Two Billion Bitcoin Block
On August 8, 2010, while reviewing coding Bitcoin, developer Jeff Garzik noticed something was not quite right. He posted on bitcointalk.org to warn other developers of a grave issue he discovered. What Garzik noticed is “The ‘value out’ in this block is quite strange,” referring to a block which contained 92 billion Bitcoins. Seeing as the total maximum supply which will ever be created is 21,000,000 Bitcoin, this meant there were 91,979,000,000 more Bitcoins than they were supposed to exits.
The severe error made the developers rewind the blockchain to the block right before the one containing 92 billion Bitcoins. This restart left all transactions made after the hack, but before the fix, nulled.
The hack occurred due to a bug which allowed an unknown attacker to exploit a number overflow error called CVE-2010-5139 (CVE meaning ‘common vulnerability and exposures’). This type of error happens when the system restarts its counting protocols, instead of continuing in chronological order.
This bug can lead to all kinds of adverse effects on a network. In this case, the code was flooded and resulted in the creation of a ridiculous amount of Bitcoin. Bitcoin’s lead developer, Wladimir Van Der Laan, stated that the incident was the “worst.”
Mt. Gox Hacks
This is probably one of the most known hacks in the history of Bitcoin. Originally starting out as a trading card site, Mt. Gox became in time one of the largest Bitcoin exchanges that ever existed, at one point handling over 70% of all Bitcoin transactions worldwide.
The project was led by French-born Mark Karpeles who wrote all of the platform’s code by himself without being reviewed by other developers.
Due to this reckless development approach, Mt. Gox was hacked just a year later since its launch in 2011, with the attacker driving the price down to just fractions of a dollar from $30 by mass selling on the platform.
Then in 2014, announced that 850,000 Bitcoins belonging to customers and the company were missing and likely stolen, which were worth more than $450 million at the time. Although 200,000 BTC have since been “found”- this was the incident that made the exchange close its doors for good.
Evidence found by security company WizSec led them to conclude that “most or all of the missing bitcoins were stolen straight out of the Mt. Gox hot wallet over time, beginning in late 2011.”
Binance Trading Suspend
Binance is the world’s largest and one of the well-known crypto exchanges, and any coding errors can be lead to thousands of users losing their assets. In this February, Binance froze trading for almost two days because of a coding error. The trade block original was intended to be applied for only 24 hours, but Binance extended this freeze because of “unforeseen slowdowns.”
Considering the sheer number of crypto hacks experienced over the last few years, it’s no surprise that crypto traders started suspecting it was more than just a coding error. Many believed the exchange was hacked and the whole code issue was just a cover-up.
To respond to the community’s growing concern, Binance’s CEO, Zhao Chengpeng, posted a screenshot of the coding error. Eventually, the developers fixed the coding error without any funds being lost.
Bitcoin Upgrade Nightmare
Bitcoin, like all software, requires some upgrades from time to time. These upgrades are needed to ensure the efficient functioning of the blockchain. But when a Bitcoin update goes wrong, the results can be of catastrophic consequences.
In March 2013, Bitcoin was supposed to upgrade from Version 0.7 to Version 0.8. and increase the block size of the network.
The problem was that the update made the network incompatible with the current version of Bitcoin. Seeing as half the network upgraded and the other half was on the older version, the upgrade split the blockchain into two separate ones. The community forced a hard fork to the Version 0.7 while the problem was solved.
While blockchain technology has many benefits and has numerous use cases, certain upgrades can lead to serious losses. Upgrades are necessary to keep the blockchain functional and running smoothly. But as history has shown us, coding errors are some of the difficulties that blockchain developers face today. Now that you know some of the consequences of crypto programming errors, you are sure to appreciate good coding skills.