- Rollups are layer 2 independent projects providing scaling solutions for Ethereum
- Rollups are needed to help reduce costs and increase transactional speed during high congestion time on Ethereum Mainnet.
- Optimistic rollups are slow and are less scalable while zero-knowledge are faster and provide more scalability
- Optimistic rollups have gained popularity and zero-knowledge rollups have started to gain momentum
- More L2 rollup adoption has taken place and total transactional fees in Ethereum continue to grow across different protocols offering rollup technology
What are rollups?
Ethereum network blocks have a capped limit on the amount of data they can carry. When demand to transact on the network is high, Ethereum picks the highest bids first, consequently fees spike yet the amount of data that can be transmitted is capped. Rollups are layer 2 scaling solutions which operate off the Ethereum network while posting transactional data onto Ethereum still. Data is compressed into one transaction block allowing for scalability. Despite operating off Ethereum, rollups are secured by the network of the Layer 1 (Ethereum security measures). Examples of common rollups include:
These rollups assume that transactions are legitimate by default and solely run computational work via fraud-proof. In short, these rollups only show evidence that confirms if a transaction was incorrect should someone choose to challenge the transaction. Optimistic rollups can be seen as a notary system that approves and validates transactions to the Ethereum Mainnet.
“ZK” rollups as they are known bundle hundreds and thousands of data transactions off Ethereum and create a validity proof (also known as “SNARK” [succinct non-interactive argument of knowledge]). The validity of proof is simply a cryptographic verification that is posted to the Ethereum Mainnet. ZKs keep all the data transferred on Layer 2 and can only be edited with validity proof, resulting in lower transaction costs due to less data being sent over the network. Another feature is “STARKs” (scalable transparent arguments of knowledge) require less time than SNARKs for verifying and proving large datasets which make them extremely useful for high-volume applications. Unfortunately, STARKs produce large proof sizes that eventually become expensive to verify on Ethereum Mainnet, and don’t support recursion, a key component to help scale off-chain computation with ZK proofs.
Why are rollups needed?
Rollups are powerful and needed as they are intended to decrease gas fees and increase transaction throughput. Optimistic rollups deploy smart contracts on Layer 1 that carry the task for processing deposits and withdrawals with verifying proofs. Zero-knowledge rollups bundle thousands of transactions and create validity proof.
During high network demand, gas prices on Ethereum can become expensive. Creating an essential scaling solution for high gas prices has been one of the primary priorities for the Ethereum community. The viral project CryptoKitties, the NFT boom and DeFi summer were clear examples of network congestion and high gas prices making transactional costs higher than the transacted asset at times. Rollups make transactions faster, cheaper, all while providing top-level security features from the Ethereum Mainnet.
What are the transactional speeds of rollups?
Optimistic rollups: These rollups are quite slow. Typically, users who transact using optimistic rollups will have to wait nearly a week to withdraw their assets. The waiting time creates a major problem as malicious users could have enough time to publish a fraud proof in the event a user tries to withdraw assets they do not own on the rollup layer. Fortunately, there is a way to circumvent this problem by using fast withdrawals which is done by using liquidity providers who maintain funds on the mainchain. This can be seen as letter of promise that the user gives to the liquidity provider to get fund from mainchain immediately in exchange for a determined fee.
Some bridges like Hop and Celer take on the week-long risk of malicious transactions and in return offer instant withdrawal ability from optimistic rollups. Optimistic rollups are simpler as the fraud proofs system has been around for a long time and the solution it provides is quite straightforward.
ZK rollups: These rollups are fast. Typically, asset withdrawal from users can happen in less than 10 minutes. Speed will depend on how fast the current withdrawal batch is processed as all rollup data is already verified. ZK rollups are more complicated in nature as computation can be extensive. ZK-SNARKS are relatively new and are mathematically complex.
Technicalities for rollups?
Optimistic rollups have less scalability as they require a “witness” for every transaction so that users can prove fraud later. These witnesses per transaction consume a lot of additional storage space, on average 3x – 10x the amount of traditional transactional data. Optimistic rollups have less security as they rely on cryptoeconomics to guarantee the security of the chain. For the security to become top-notch, users must be incentivized to monitor the data and detect fraud.
ZK rollups are far more scalable. The mechanics of the code do not require witnesses for every transaction as all necessary permissions and signatures were verified at the time the ZK-SNARK was computed. This allows it to only have one witness per batch of data, thus significantly reducing the data storage necessities on-chain and allowing for greater scalability. ZK rollups have more security parameters, and rely on mathematical computations that do not require incentivizing users. Logical and mathematical cryptography is used instead of cryptoeconomics.
Figure 1. Optimistic Rollup vs Zero-knowledge rollup numerical and technical comparison:
¹Based on multiple media and community channels. No exact public metrics available, dependent on rollup and protocol used
²Based on L2 fee comparison: https://l2fees.info/
³Based on Zk protocol Loopring on-chain data dashboard: https://dune.com/Brecht/loopring
⁴Based on 21TPS *60 seconds * 60 minutes * 24 hours from on-chain metrics: https://dune.com/Brecht/loopring
Figure 2. Optimist rollups vs Zero-knowledge rollups characteristic specific comparison:
|Property||Optimistic rollups||ZK rollups|
|Fixed gas cost per batch||~40,000 (a lightweight transaction that mainly just changes the value of the state root)||~500,000 (verification of a ZK-SNARK is quite computationally intensive)|
|Withdrawal period||~1 week (withdrawals need to be delayed to give time for someone to publish a fraud proof and cancel the withdrawal if it is fraudulent)||Very fast (just wait for the next batch)|
|Complexity of technology||Low||High (ZK-SNARKs are very new and mathematically complex technology)|
|Generalizability||Easier (general-purpose EVM rollups are already close to mainnet)||Harder (ZK-SNARK proving general-purpose EVM execution is much harder than proving simple computations, though there are efforts (eg. Cairo) working to improve on this)|
|Per-transaction on-chain gas costs||Higher||Lower (if data in a transaction is only used to verify, and not to cause state changes, then this data can be left out, whereas in an optimistic rollup it would need to be published in case it needs to be checked in a fraud proof)|
|Off-chain computation costs||Lower (though there is more need for many full nodes to redo the computation)||Higher (ZK-SNARK proving especially for general-purpose computation can be expensive, potentially many thousands of times more expensive than running the computation directly)|
Growth across Optimism rollups and zero-knowledge
Both optimistic and ZK rollups are relatively new. Optimism has historically been more adopted due to the simpler nature of language, integration, and usage for general purpose computation. ZK rollups are not as adopted by developers yet as the programming language and mathematical computations could be harder to develop yet make ZK rollups a far superior technology.
Over time, optimistic rollup projects have grown in popularity, and this can be seen in daily transactions and user growth for protocols like Arbitrum, Optimism and Boba Network. Developer and user sentiment has been positive as more transactions get carried out by Layer 2 protocols as market participants see benefits in using these platforms to transact value.
ZK rollups have started to gain momentum. Polygon has been an active buyer of ZK technology. In August 2021, Polygon acquired Hermez Network for $250 million and in December 2021, it acquired Mir Protocol for $400 million. Additionally, other protocols such as Loopring, Immutable X, Aztec Network, zkSync, Starkware and other Layer 2 technologies have seen a substantial growth in users over the last months.
On an eight-month rolling basis, we analyze the daily transactions on the Optimism Protocol, an optimistic rollup-based protocol, over nearly three quarters, the daily transactions have ~10x with major peaks surpassing 20x daily transactions from end of year 2021. Comparably, we contrasted zkSync, a zero-knowledge protocol and since January 2022, zkSync has fluctuated with user growth and currently stands at a ~2x growth over a seven-month period. At transactional peaks, zkSync 6x grew in daily transactions (reference Figure 3).
On a total user growth since December 2021, Optimism Protocol has grown total users ~50% while zkSync since December 2021 has grown ~430%. This comparison only shows two of the several rollups in their respective categories and growth across both optimistic and zero-knowledge has nonetheless grown substantially over the same period (reference Figure 4).
Figure 3. Optimism Protocol historical daily growth in transactions vs zkSync. Growth comparison between an optimistic protocol vs a zero-knowledge protocol:
Figure 4. Optimism protocol historical total user’s vs zkSync historical total users (12-month basis):
Big picture gas expenditures to settle or proof layer 2 transactions on Ethereum
Zk rollups, both optimistic and zero-knowledge have seen a tremendous aggregate growth across protocols. Since the beginning of 2020 until July 2022, the total weekly Ethereum gas fees spent by rollup protocols has increased north of 10x. Relatively, monthly from June 2020 until July 2022, the growth has more than 40x. Gas expenditures on Figure 5 show the high user demand for both optimistic and zero-knowledge rollups to be able to transact on these layer 2 protocols.
Figure 5: Historical weekly and monthly gas spent to settle or proof layer 2 transactions on Ethereum:
A deep dive into total transactions fees across rollup protocols
From September 2021, protocols that dominated total transaction fees based on transactional volumes were Arbitrum and Optimism, both optimistic rollup protocols. Since January, the transactional volumes from Optimism have declined and with it the total transaction fees generated in Ethereum. From the zero-knowledge protocol base, zkSync has been the dominant transactional protocol that generated the most total transaction fees in Ethereum. During November and December of 2021, zkSync processed the largest number of transactions and since then has faced a decline. (Reference Figure 6).
DeFi and NFT market peaks were seen September through November before the market started to slowly decline. At network heights seen September through October, data suggest that users heavily used rollup layer 2 protocols to transact. As the market corrected itself and brought on a crypto winter, transactions declined and with it the total fees generated in Ethereum across rollup protocols. In November, Ethereum peaked at $4,800 to then crash to as low as high $800s. The layer 2 activity correlates with the price of Ethereum and the overall leverage in the industry.
Over the same period of analysis, the majority of the total transaction fees in Ethereum came from optimistic rollups until March when they saw a major decline. Zero-knowledge total transaction fees on Ethereum also experienced a major decrease but compared to optimistic rollups experienced a less severe hit (Reference Figure 7).
Figure 6: Historical total transactions fees in Ethereum across optimistic and zero-knowledge rollups:
Figure 7: Historical total transaction fees on Ethereum by rollup and other L2 bridges:
Closing remarks for rollups
Rollup technologies, whether optimistic or zero-knowledge, are being established as independent projects. As we saw from Figure 6, there will be several different rollup technologies that will exist and compete with each other, as a result we will see fractured liquidity. Overtime, fractured liquidity issues can be solved as communication across rollups gets built and deployed.
Building on top of Ethereum Mainnet offers many important synergies including enhanced security, composability, direct and indirect network effects, and ease of integration. There is user demand for rollup technologies and rollup layer 2 transactions and growth show it. Users see a benefit of using rollup technologies to lower transaction costs and increase speed when the network is congested. Each respective technology, whether optimistic or zero-knowledge has its benefits and detriments, nonetheless, both provide key features to bring scalability to the Ethereum network (Reference Figure 1 and Figure 2).
Dune Analytics: Optimism Avg Savings: https://dune.com/optimismpbc/Optimism
Dune Analytics: Lopring Dashboard: https://dune.com/Brecht/loopring
Layer 2 fees comparison: https://l2fees.info/
L2 Bridging fees and gas: https://dune.com/ethpanda/L2-activity-on-L1
L2 Gas Consumption: https://dune.com/funnyking/L2-Gas-Consumption