February 20, 2021: Optimistic vs ZK-Rollups, ELI5 π§π§βπ«
A short guide to Ethereum L2 solutions
Here are todayβs trends to watch from Curve Market Cap:
The crypto boom of 2021 is a bit different than the last bull run. Unlike the ugly block size debates and hard forks of yore, the Bitcoin fam are relatively harmonious this time around. Theyβre mostly arguing mostly about whether the laser eyes in their profile pictures should be red or blue.
Meanwhile silver and bronze medalists are fighting the great Chain Wars, $ETH vs $BNB. Binance Smart Chain is desperately trying to scale without becoming the next Mt. Gox. Meanwhile, Ethereum needs to hasten migration to L2 to solve their own scaling issues.
Of course, this raises a whole host of other questions about what L2 actually meansβ¦
Can the Ethereum community resolve this debate amicably? It couldnβt possibly be productive for Ethereum to fight a civil war while trying to fend off BSC on a second front.
Fortunately Curve, befitting its status as the best AMM, got a great discussion going on the topic. Itβs a tough question:
This great answer just raised further questionsβ¦
ELI5? Challenge accepted! Letβs see how simply we can explain the various L2 technologies.
Step one, letβs pretend weβre back in the US public school system and have to write a report basic enough for the teacher to understand. Thatβs why they built the βWikipedia for Dummiesβ Simple English section. Letβs see if we can just plagiarize from that.
What the heck? It hasnβt been updated since the DAO fork? Cβmon boomers, thatβs ancient history.
Looks like we have to actually write something from scratch. Weβll surely miss a lot of stuff and maybe get some points wrong, but getting stuff wrong on the internet is the easiest way to get feedback and quickly iterate towards something like truth.
L2 Solutions
So thereβs not just one βL2β solution. Thereβs a whole mix of proposed solutions, each with their own pros and cons. The Ethereum organization hosts a really good page explaining the various types of solutions, though some seem to be practically defunct already.
Most L2 solutions takes the form of moving activity off the main Ethereum network. Instead, computing and/or payment tasks are performed on a secondary layer (L2) of nodes. This secondary layer can be built as to best handle whatever task itβs trying to perform. The results then get written back to the main chain (L1) as needed.
Here are some of the specific flavors of L2 solutions being worked on you may have seen cited:
State Channels: A fixed number of participants lock the part of the L1 chain they want to use with a multisig contract. This opens a private channel, where they make a lot of moves, then write the data back to the L1 chain when they all sign off.
Plasma: Analogous to Bitcoinβs Lightning network in that itβs highly optimized for payments, but loses the computational abilities of Ethereum. (c/f OMG)
Sidechains: Donβt like Eth? Build your own Eth! Then build a bridge between your new chain and Eth, since nobodyβs using your chain.
The mechanics of how L2 activity is handled seems less contentious than the mechanics of how it gets posted back to L1. This brings us to the concept of βrollups.β
Roll-Ups
Whatever happens outside the main Ethereum chain, the activity needs to get summarized (rolled up) and written back on the main chain. There are two competing methods to do so:
Optimistic: No transactions validated. Everybody is assumed to be honest, with mechanisms in place to find and reverse fraud.
Zero-knowledge (βZKβ): All transactions validated. Proof of validation submitted to main chain.
This is where youβve seen the term SNARK. SNARK stands for βSuccinct, Non-Interactive Argument of Knowledge.β Itβs more or less the proof that is submitted to the main chain when requesting to write changes.
Both Optimistic Rollups and Zero Knowledge Rollups have benefits and drawbacks, described well here.
Optimistic Rollups (OR)
At the moment, proponents of Optimism solutions tout the quicker on-ramp to adoption. Unlike ZK solutions, Optimistic solutions are already compatible with the existing Ethereum Virtual Machine. This means existing dApps can quickly migrate to Optimistic solutions without too much overhead.
Additionally, a lot of computing power is saved in Optimism by not having to verify everything. ZK solutions have to spend extra time verifying each transaction. Optimism assumes the transaction is fine until somebody claims fraud.
The downside to Optimism is that the fraud mechanics mean that Optimism will always settle slower than ZK. Currently Optimistic solutions allow for fraud to be challenged for about a week. If you have to wait a week for every transaction to settle, you might find yourself turning quite pessimistic.
The mood of the community seems to be Optimism now, ZK eventuallyβ¦
ZK Rollups (ZKR)
A week withdraw time is considered to be too slow to be practical for real world implementations. As a result, some people feel you need a ZK rollups working in order to have a functional L2 solution.
For a while, it was thought to be impracticably difficult to write smart contracts in ZK. But weβre starting to see smart contract capability emerging:
Indeed, Curve has a working demo site built using ZK Sync.
It may still take a little time to get all dApps fully migrated onto ZK, but the technology appears to be close, if not already here.
Wen Cheap Gas?
At the moment, it looks like weβll see both Optimistic and ZK variety launching in 2021:
Once launched, itβs a question of when apps can migrate. Weβre probably not going to see either Optimism or ZK, but a hybrid of both:
This would mean that dApps could potentially use the solution that made the most sense for their operation. A game might use an Optimistic solution if they need heavier computation over instant settlement. Meanwhile a DeFi app might benefit from the quicker settlement times of ZK.
It doesnβt look as though the Optimism vs ZK will turn into a fractious debate, but rather two different types of solutions that will be integrated into the final landscape. Weβre hopefulβ¦ one might say even optimisticβ¦ that Ethereum can innovate quickly and harmoniously, avoiding the growing pains that faced the Bitcoin community several years back.
For more info, check our live market data atΒ https://curvemarketcap.com/Β or our subscribe to our daily newsletter atΒ https://curve.substack.com/. Nothing in our newsletter can be construed as financial advice. Author is a $CRV staker and perma-bull.