Smart contract implementation risks remain the biggest unsolved problem of Defi. L2s are equally affected.
Let me pitch an idea: L1 Fork as the Court of Final Appeal.
First, why existing solutions don't work:
1) Time-locked upgrades are great for scheduled changes, but obviously don't work for emergency situations.
2) Converting to an alt L1s only adds more problems and solves nothing. Even though an alt L1 can be forked, assets bridged over from Ethereum cannot, and the fork choice resolution is no different than an upgrade problem. See this thread for example:
nitter.net/gluk64/status/16…
3) Security councils can mitigate the problem, but not solve it. Any gov multisig empowered with emergency upgrade rights poses regulatory and security risks of a different kind, rendering a Defi system immature (
@ChrisBlec won't let us forget about it).
4) Combined gov mechanisms are better: a security council could only freeze the contract temporarily, requiring a token governance approval for an emergency upgrade. But now a malicious majority of undercollaterized stakers could perform an evil take-over upgrade and steal all the assets.
L1s don't face the same problem because they are forkable: any user can opt-in into the fork branch which they subjective believe to be correct and canonical. This doesn't work for L2s and Defi protocols, unfortunately, because we can't fork underlying native assets bridged from L1 (such as ETH).
Or can we? What if we forked the L1 itself and let the L1 social consensus resolve an issue for a specific protocol?
This is tempting and perfectly possible technically, but creates two problems. First, it would only work for large protocols – for the smaller ones, L1 users will likely not bother to take any action. But second, even with the big protocols, we run into a risk of overloading L1 social consensus, which Vitalik has explicitly warned against:
vitalik.ca/general/2023/05/2…
Now, hear me out. What if we built a hierarchical system of onchain courts similar to the real-world judiciary?
Every protocol will have its own governance with normal and emergency upgrade mechanisms defined. The protocol must also designate a special contract that serves as an instance of appeal. We'll need a standard ERC interface for it.
For an emergency upgrade there must be an appeal period, during which anyone can submit a challenge to the higher court. They will have to put a pre-defined bail deposit.
This court can then cancel the emergency upgrade (and do nothing else). Different courts will have different members, prices and reputation, in a completely decentralized manner.
Each court will also have to specify the a higher court where any decision can be appealed – until at some point we reach the Ethereum Supreme Court. The decision of this smart contract can only be determined by a (technically soft) fork of the L1.
Of course, anyone can deploy a contract like this, and there is no guarantee that the users will bother to soft-fork. So the idea is to form a social consensus argound this idea, and deploy a "canonical" instance of the court that be configured to be so expensive to use, that only truly extrodinary cases will be brought before it, and thus will likely be worthy of the attention of the entire Layer-0 (the social consensus) of Ethereum. Think of a bug in
@Uniswap, a major L2, a Defi protocol with a systemic risk, etc.
The most important function of such a system will be to protect protocols against political inference from the outside. It will serve as a great deterrence mechanism, and will elevate the role of Ethereum as a powerful network state.
What do you all think? Is anyone working on something like this already? We at
@zksync will be more than happy to fund such a research.