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.
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.”
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.