#092: Spending Cryptocoin Twice
If you have a bill, let’s say a nice, crisp €20 one, and you buy yourself something nice with it, then the money has changed from you to the merchant you bought something from. You cannot use the same €20 to buy something else, unless you somehow stole it back, which is obviously illegal.
The Blockchain™ is supposed to work like that as well. If you have Bitcoin, or Monero, or Ethereum, or whatever other cryptocoin, you place your transaction in the blockchain, and once that block has been “mined”, the transaction is forever enshrined in the public, immutable record of that coin’s blockchain.
Except not really. Which is how attackers stole almost $500,000 in Ethereum Classic coin. What they did was exploit a weakness of the blockchain, something called a 51% attack. Back in Issue #42, I described how a block is mined: Nodes announce their transactions, everyone else adds that transaction to their block, and once the block is full, the race to mine it starts. In order to mine it, nodes have to solve a mathematical puzzle, and the first node to do so gets a reward for its work. But as I also pointed out, the problem here is that even if a node solves that puzzle, you don’t actually know if you can trust that block1. Only when the majority of nodes reach a consensus can this dilemma be solved2.
And herein lies the rub: If you control the majority of the nodes, you can control which transactions go into the blockchain. Here’s how you can double-spend your cryptocoin:
- Pay for something, like that fancy new TV you’ve always wanted, using your cryptocoins. This creates a new transaction that is added to the upcoming block.
- Wait until the block with that transaction has been mined.
- Now that the transaction has been accepted into the blockchain, wait for the merchant to do what you paid them for: ship that new TV to you.
- Once that’s happened, you create and mine a new, identical block, with only one difference: It doesn’t contain your transaction. In this block, you never paid for your TV.
- Once you’ve done that, keep adding transactions and mining blocks based off of your own block as usual.
- Since you control the majority of the nodes, eventually your version of the blockchain will be accepted as the actual one, true blockchain.
- You now have a fancy new TV without having spent the cryptocoin, according to the one, true blockchain.
It’s not that the transaction never happened. It did, and it has been recorded in a blockchain, but that version of the blockchain is no longer “true”, since the consensus went with your version, where you never spent that money.
In other words, Bitcoin, and every other cryptocurrency that use the same model, rely on the assumption that “honest miners” will be the majority. If that’s not the case, then it is fairly easy to run tricks like these.
Deep Shit Diving
Sewers and water treatment plants sometimes clog up, be it due to some trash, or maybe a tree that has been unearthed by a storm. If that happens, someone has to go in and remove it. Meet Julio César Cú Cámara, who spends his life diving in sewage — and loves it (YouTube) (via kottke.org).
Weaponized Memes
There are meme accounts on Instagram run by teenagers, who do nothing but share memes all day long. But when one of them discovered that Instagram accounts where soliciting for child porn using certain hash tags, he put out a rallying cry for the meme community to get involved and stop them: The Teen Spam Campaign Against Child Porn on Instagram.
Medieval Children
There’s a lot we don’t know about the middle ages. Conversely, there are a lot of myths about that time. One claims that childhood “didn’t exist” in the Middle Ages and that parents had a “relative lack of interest” in their offspring. But was it actually like that? What You Didn’t Know About Children In The Middle Ages.
📖 Weekly Longreads 📚
Donald Knuth, master of algorithms, reflects on 50 years of his opus-in-progress, “The Art of Computer Programming”: The Yoda of Silicon Valley
🦄 Unicorn Chaser 🦄
Most satellite pictures are taken straight down. But sometimes, satellite images taken at an angle, creating beautiful new perspectives.