A Forking Catastrophe
4 August 2022

Ethereum is finally talking about completing “The Merge.” As seems to be the way in DeFi lately, there is a lot of trouble brewing because the ecosystem is not entirely decentralized. In fact, as we are about to see here, there looks to be some pretty thorny problems coming down the road that are likely to require breaking the decentralization again. We’ve talked about that before. But it’s likely to be a much bigger problem this time.

The merge is, more precisely, a hard fork of the Ethereum blockchain. This is widely acknowledged. The last hard fork of the Ethereum blockchain related to The DAO hack back in 2016 and resulted in Ethereum Classic. But there was no DeFi then. In some sense The DAO was an early attempt at some parts of DeFi. But forking the chain now…that’s problematic.

For now let’s just assume there might be several forks. We don’t care about the details of network operators arguing over the correct way forward. But simply accept there is a real chance of several forks coming up. This is quite novel for reasons many people have not noticed yet.

Forking chain

When a blockchain is forked we get two complete copies that match exactly up to block X and then diverge. If you held 100 ETH before the DAO-induced fork then you held 100 ETH and 100 ETH Classic afterwards. Similar stuff has happened repeatedly with Bitcoin and it’s many forks (BCH, BSV, etc.) And in all these cases users went on their merry ways with more tokens though not necessarily any more value. In pretty much every case a single dominant chain emerged and those are the things we today call Ethereum and Bitcoin.

But when you fork a chain you also fork the smart contracts and all that related state. This did not exist on a large scale in 2016. This does not exist on Bitcoin at all (Bitcoin has a tiny amount of smart contract-y stuff that we are going to round to zero here).

A simple illustration of a chain fork after block 6.

At first this looks like a minor problem. So your NFTs get duplicated just like your ETH. But you’d kind of expect the chain that ends up with the valuable ETH version to also get the valuable NFTs. That’s fine.

And maybe you staked some NFTs or other ERC20 utility tokens into Uniswap. Sure that whole complex gets cloned…but the valuable ecosystem will probably win out right?

Can you see where this is going? What about assets that live outside the Ethereum on-chain world and cannot just get duplicated? Assets like USD and Bitcoin. Forking the Ethereum blockchain won’t magically double the number of Bitcoin inside the WBTC bridge! If it somehow could then we could never have that 21 million cap. And, in the same way, this process cannot just mint dollars.

Off-chain assets

When we have off-chain assets we want to bring on chain, we wrap or bridge them. Both USD and BTC are “external” assets from the Ethereum perspective. What we end up with is a deposit locked somewhere (the WBTC bridge, Circle’s corporate bank accounts, whatever) and then some ERC20 token on Ethereum that lets us trade it.

Someone or some group maintains these bridges. And that person or group is going to need to decide how to handle the merge. They plainly do not have the resources to redeem twice and so must do something.

Ok this isn’t so bad is it? Each bridge facility publishes their own choice and then we move on right? Wrong.

Liquidity pools

The easiest way to see the problem is to consider liquidity pools within Automated Market Makers (AMMs). The precise details don’t matter here. Just know these are smart contracts that hold pools of assets and use them for trading. These smart contracts, and their associated pools, will get cloned as part of the merge.

So what is the problem? Let’s say we have a Uniswap pool that contains USDC and WBTC. What happens if the USDC folk choose fork 1 and the WBTC folk choose fork 2? What are we even trading then?

And it gets so much worse. Curve is a protocol that can AMM more than two tokens at once. Look at the Curve “3 Pool” here. This thing contains DAI, USDC and USDT. Clearly if the USDC and USDT folk choose different forks, we have a problem. But DAI? That comes out of MakerDAO via a mechanism where people deposit collateral to mint new stablecoins. And that collateral? It contains all manner of wrapped tokens. Go look for yourself.

For this single curve pool to still work sensibly we need USDC, USDT, the MakerDAO people who run DAI and the team behind every bit of wrapped collateral deposited into DAI to agree on the same fork. Oh wait, one more thing: DAI accepts Uniswap LP tokens. Which means we also need every token accepted into a MakerDAO-approved Uniswap liquidity pool to be on the same page too. And MakerDAO accepts GUSD so the Winklevoss twins must agree too for good measure.

Is this even possible?

It’s not clear we can quickly calculate how many projects must agree for just Uniswap, Curve, MakerDAO and Aave to keep working sensibly. And to be clear we do not mean working sensibly on all the forks. We mean working sensibly anywhere at all.

Oh and did we forget to mention: these bridges are the targets of ongoing attacks including one while this column was being written. The ecosystem needs to corral lots of these folks while they are under fire and being hacked.

This looks an awful lot like a tricky coordination problem in international relations. Seriously: the solution is clearly something like a diplomatic conference where projects send representatives and a collective decision is made. Except this would not only break the decentralization of some of these products but the entire system would clearly have a center so long as someone needed to force agreement.

And then there are the immutable protocols like Uniswap. That one is just gonna keep trading everything and prices will get wonky. Say all the tokens in a given liquidity pool go unbacked and are worthless. Uniswap won’t even notice. It will keep making prices based on xy=k at whatever level the liquidity pool supports.

An example of lunacy

Let’s work a “simple” example to see how horrible this can be. Say we have staked into a Uniswap pool with WBTC and USDC and they choose different forks. Then on one chain we can withdraw a useful WBTC and a useless USDC. On the other a useless WBTC and a useful USDC. Now we have to bridge one of those useful tokens over to the other chain to get back some semblence of order. OK, so we bridge our useful USDC back to the first chain. So now on the first chain we have a useful WBTC, a useful WUSDC and a useless USDC. Right.

Try this for a few forks and a few more tokens and then you go figure out how to use the resulting ecosystem. The environmental benefits of proof of stake may be entirely offset by increased Post-It consumption. And that is assuming some modicum of decentralization-breaking and coordination. Otherwise it’s just a messy free-for-all.

Jon Reiter
Jon Reiter

Jon is a long-time derivative trader and quant that’s done both modelling and market-making work in New York, London, Tokyo and Singapore. Lately he’s applying traditional finance techniques in the blockchain space.

Newsletter graphic

Info Blocks In Your Inbox.

If you want relevant updates occasionally, sign up for the private newsletter. Your email is never shared.

Subscribe to our newsletter