Coinbase, one of the world’s most popular cryptocurrency exchanges, has apparently had a nasty bug lurking in its system that would allow users to collect unlimited ether through a few simple steps. Thanks to a bug report, however, the company avoided disaster.
VI Company, a Dutch firm specialising in FinTech, publicly disclosed the vulnerability on its HackerOne account on Wednesday. According to the report, a string of digital wallets controlled by a smart contract could be manipulated to trick Coinbase into believing a transfer had occurred. The issue was first reported in late December, and Coinbase responded on 25th January saying the issue had been resolved and that the company would be rewarded with a $10,000 (£7,088) bounty.
Smart contracts have been touted as one of the main arguments for why the Ethereum blockchain technology could have more potential than Bitcoin. In the most basic terms, a smart contract is a set of if/then conditions regulating the transfer of cryptocurrency funds. VI Company wanted to give its employees a unique Christmas present last year, and familiarise them with smart contracts. It set up a smart contract that would distribute a small amount of ether to everyone on Christmas Eve, Christmas Day, and Boxing Day. But it noticed something weird.
The people handling the project realised that if one of the internal transactions of the contract failed, all the transactions were reversed, which is how the smart contract should work. But Coinbase’s internal accounts didn’t register the reversal. So, Coinbase thought the wallet had been credited with additional ether, but checking the wallet outside of Coinbase showed that no deposit had occurred. VI Company uploaded screenshots of its transactions and outlined the simple steps to collecting all the ether you could ever spend:
1. Setup a smart contract with a few valid Coinbase wallets and [one] final faulty wallet
2. Transfer appropriate funds to smart contract
3. Execute smart contract adding the set amount of ether to the Coinbase wallets without ever actually leaving the smart contract wallet because the complete transaction fails at the last wallet
4. Repeat until you have more than enough ethereum in your Coinbase wallet.
5. Cash out
Just to be clear, the Coinbase account would show the funds as being present even though they were never transferred to the wallets. So the “ether” that could be collected was just part of Coinbase’s records. A bad actor could then either transfer that out to a wallet not tied to Coinbase, or they could just convert that cryptocurrency to fiat money in a bank account. Had someone decided they wanted to get their hands on millions of pounds worth of Ether, red flags surely would have gone up at Coinbase. And if they managed to transfer the money out, they’d still have to go through a laundering process. Coinbase is also pretty strict about verifying your real-world identity.