Time Warps, Mining Exploits, Denial of Service, and More!
Cryptocurrency enthusiasts are keen on telling ordinary civilians how safe and secure the Blockchain protocols powering their favorite coins are. Indeed, major cryptocurrencies like Bitcoin and Ethereum have maintained their security quite well — better, arguably, than any other digital asset/payment system in history — which is pretty remarkable, considering that they are unbacked digital money free from any single party’s control with an effective multi-billion dollar bounty on their proverbial heads.
Many, however, will go a step further, and declare said cryptocurrencies to be literally “unhackable.” This is, at the very least, a tactical error, since the proliferation of the “unhackable” meme forces the enthusiast into some awkward positions when and if certain events unfold. Like, say, a hack.
In such an event, it seems that, if nothing else, an explanation is in order.
Last month, an as-of-yet unidentified attacker was able to severely compromise Verge, a relatively small, privacy-focused cryptocurrency. The mystery hacker managed to dominate the network on three occasions for intervals of several hours at a time over the course of April 4th-6th, preventing any other user from making any payments. Worse, in that interval, they were able to generate what is effectively counterfeit Verge at a rate of 1,560 Verge coins (roughly $80) per second, minting what amounted to over a million dollars worth of the currency.
No need to beat around the bush — this was a disaster. The thing was hacked to high heaven.
But who’s to blame? Is this a case of human error on the part of the Verge developers, an undermining of crypto fundamentals, or something in between? Could such a thing happen again, perhaps to larger currencies, and if so, what can be done to prevent it?
With these sorts of breaches, many details inevitably remain murky. However, in this case, the fundamental exploits can be fairly clearly understood. Onward:
Timestamp Spoofing (Or: Honest Mistakes vs. Dangerous Lies)
The root of the exploit is something that would appear, prima facie, to be a bug, but is actually a deliberate feature: the ability to create “inaccurate” timestamps. In blockchain protocols, individual transactions (usually payments from one party to another) are grouped together into a single block, which is then confirmed as a whole. Every block comes with a timestamp of its creation date. Even when a blockchain protocol is functioning properly, the ordering of these timestamps may sometimes be out of sequence; i.e., block 100 may have a timestamp that actually comes after block 101. This is because, in decentralized networks that obstinately refuse to grant any special authority to third parties, accurately enforcing time synchronization is no simple matter. Given the unpredictable variance in the time it takes for data to propagate through the peer-to-peer network, it’s entirely possible for block times to appear “out of order,” even when all parties are being perfectly honest. In other words, it’s only fair to allow some degree of flexibility; in the case of Verge (before the hack, anyway), the protocol allowed nodes to “disagree” about the current time by a window of, at most, two hours.
The entry point for the hacker was to start spoofing timestamps, submitting blocks that appear to be from the past, but are still within the allotted two-hour window, and thus eligible for acceptance by the other nodes.
Why this would ultimately matter for network security has to do with the nature of proof-of-work mining.
Source/More: The Verge Hack, Explained – The Abacus Crypto Journal