A few weeks ago Dan Robinson wrote a gripping tale of what it is like to live in the Ethereum blockchain or, worse, the Ethereum mempool. A highly adversarial environment where every small mistake is mercilessly punished.
Here is the story:
By mistake, someone had sent tokens to a smart contract. Perhaps they had simply pasted the wrong address to the recipient field. Usually this means the tokens are not recoverable, but in this case there was a way to work around the difficulty. In a Uniswap liquidity contract, you burn liquidity tokens by sending them to the contract and calling burn, receiving the underlying tokens in return.
So you see, by sending the liquidity tokens to the contract, our victim had unintentionally performed the first part of the process. Anyone could now execute the burn call and claim the tokens for themselves.
As Dan recently put it to me, this was the setup for the problem.
What happened, though, when Dan and his partner in crime Georgios Konstantopoulos tried to recover the funds? In the brief seconds after their transaction orders entered the mempool, generalized frontrunning bots executed the call and swept the funds. As Dan wrote, “if these monsters were really in the mempool, they would see, copy, mutate, and frontrun my transaction, taking the money before my transaction was included.” That is exactly what happened.
Read the whole thing here.
I will interview Dan in the coming days. Let me know what you would like me to ask him. One initial thought:
• Ethereum aims to eliminate every hint of arbitrariness from human exchange. That means that ideally the network will work with metronomic efficiency. Every mistake will be punished. Every mistake will be predictably punished. There is something both appealing and scary about this. Human sins will be eliminated but only because nothing in the network follows a recognizably human logic.