Introduction
The Layer 2 narrative has been heating up. Last week, my esteemed colleague, Oliver Grah, eloquently laid out all of the details surrounding the Layer 2 boom in this article. Since September the TVL of L2s have gone up over 8x – and this is only the beginning.
As the space advances, so will the development of L2s. A big advantage of rollups is that they get cheaper the more people use them – and not the other way around as with L1s…
Particularly at the center of attention lately have been ZK-Rollups, since they promise to finally solve the blockchain trilemma of scalability, security, and decentralization. However, ZK-Rollups are not the only rollup solution that exists. There is another type of rollup called Optimistic Rollups that is also vying for the number one spot – at least in the short- to mid-term. Today we’ll be analyzing ZK-Rollups and Optimistic Rollups. We will then compare the two to see which technology has the most promise of being the best scaling solution.
Ok, that’s enough for the intro, let’s jump into it.
What Are Rollups?
Rollups are Layer 2 solutions that execute transactions outside of the Ethereum base layer.
Even though the transactions are executed outside of the base layer (Layer 1), the data is still posted to the Layer 1 protocol. Consequently, the rollups are being secured by the L1.
In order for the transactions to be correctly verified and executed, operators must stake a bond in the rollup contract.
Rollups are useful because they
Increase transaction speeds.
Reduce gas fees.
Here is an illustration of how Rollups work:
Now that we’ve outlined the purpose of Rollups, let’s dive into ZK and Optimistic Rollups.
ZK-Rollups
ZK-Rollups (short for Zero Knowledge Rollups) is a scaling solution that increases transaction volume and speed by bundling hundreds of transactions into one transaction per transfer. So, instead of transactions being validated one at a time, the smart contract verifies all of the bundled transactions at once. ZK-Rollups use a combination of on-chain and off-chain functions to validate transactions.
The great thing about ZK-Rollups is that all of the transaction data is not needed in order to reach a consensus (verify the transaction). Only the validity proof is needed to validate a block.
Requiring less data to validate a transaction is what helps make the transaction faster and cheaper. But wait, there’s more!
With ZK-Rollups there are also no delays in transferring funds (in contrast to Optimistic Rollups) because the accepted validity proof’s fund data has already been verified. This is made possible through the use of Merkle trees.
Here’s a brief explainer on how Merkle Trees work:
With different ZK-Rollup solutions soon ready for prime time, the excitement around them is understandably building up.
ZK-Rollups also have a healthy ecosystem that is growing by the day. Some of the notable projects are:
Now is the time to be on the lookout for alpha in order to benefit early from this massive trend…
Even with all of the excitement brewing, ZK-Rollups aren’t without fault or competition – at least for the near future. The biggest rival to ZK-Rollups are Optimistic Rollups.
Optimistic Rollups
Optimistic Rollups are a scaling solution that do not run on the base layer of Ethereum. Instead, they sit parallel to ETH on Layer 2.
ORs are unique in the fact that they notarize transactions instead of performing computations. A merkle root of the rolled-up transactions is published and checked by external validators to ensure that the data is correct.
If there is suspicion of fraud, the transaction is disputed. The OR will run a fraud-proof:
There is a gas cost associated with running a fraud-proof, but it is reimbursed once the proof is complete.
The biggest drawback of Optimistic Rollups is undoubtedly the 7-day waiting period for withdrawals!
There are currently two main iterations of Optimistic Rollups and a thriving ecosystem:
Which Rollup Is Better?
ZK-Rollups and Optimistic Rollups both have their pros and cons. Let’s compare them below.
ZK-Rollups pros and cons are:
Optimistic Rollups pros and cons are:
When you compare the two, neither one is a bad Layer 2 solution. However, the 7-day finality time for Optimistic Rollups is a huge pain point. Everyone knows that trading and investing in crypto projects can be a very time-sensitive process. Having to wait seven days to complete a transaction can be the difference between a gain or a loss on your investment. There are “fast bridging” services like Hop Protocol trying to alleviate the problem but it’s still not an ideal constellation.
It’s not all bad for Optimistic Rollups as they have some key benefits.
However, transaction speed, fast withdrawals, and practically limitless scalability will give ZK-Rollups a huge edge over Optimistic Rollups once they are fully rolled out.
Conclusion
We can debate about which Layer 2 solution is better, but I would encourage to support both solutions. Especially in the short-term, Optimistic Rollups have their place because, in contrast to ZK-Rollups, they are already fully functional. In the long-term, however, there is no question that ZK-Rollups are the superior approach.
Thanks guys, and thanks Daton for everything you post, truly a newsletter to look forward to.