Layer 2 Ethereum Scaling | Optimistic vs ZK Rollups
Layer 2 Ethereum Scaling | Optimistic vs. ZK Rollups
Decentralized networks are shaping the future of finance, partly thanks to the multitude of benefits they offer over centralized architecture. However, one stumbling block to the mass adoption of these protocols is the lack of scalability. Most blockchain projects have witnessed a growth in user base, and the corresponding increase in network congestion can drive up transaction fees and slow throughput, which negatively impacts the user experience.
Some projects have begun to explore scalability solutions, such as Optimistic Rollups (OR) and Zero-Knowledge Rollups (zk-Rollups), to tackle this challenge. Both are cryptographic proofs designed to move computationally intensive processes to a sidechain to ease congestion on the mainchain, thus stabilizing network fees and transaction speeds. While most rollup protocols function similarly, each project aims to serve a unique segment of users across the blockchain ecosystem. The pursuit of scalability and privacy is the key driving factor for rollup integrations, facilitating other cryptographic processes such as Secure Multi-Party Computation (SMPC).
What Are Rollups?
Rollups can be defined as smart contracts on the Ethereum mainnet that serve as the relay between the mainchain and layer 2 where computations occur. These protocols store transaction data on the mainchain but move transaction activity to a sidechain. However, since the mainchain and sidechain are interoperable, they run parallel and continue to communicate. This allows blockchain networks to be more scalable as computationally intensive processes move off the mainchain, thus reducing congestion.
Also Check:
What is the Ethereum Merge?
Layer 2 Ethereum Scaling | Optimistic vs ZK Rollups
For example, the Ethereum mainchain can currently process only 15 transactions per second (TPS). This number can reach up to 1,000 TPS by implementing rollups, where only critical smart contract data is communicated back to the mainchain, and the majority of data remains on the sidechain. Therefore, the term “rollup” refers to the process of rolling transactions into a single block before publishing the validated transactions to the mainchain. Today, several projects integrate rollup infrastructure with sidechains to create secure, privacy-preserving protocols. In doing so, they aim to balance the blockchain trilemma of competing priorities of security, scalability, and decentralization.
What Are zk-Rollups?
Zero-knowledge Rollups (zk-Rollups) leverage the core functionality of rollups through the integration of sidechains. Generally, sidechains allow one party to prove to another that a transaction is valid without revealing any information beyond the transaction’s validity. Sidechains can reduce the computing and storage resources necessary to validate a block of transactions once published to the mainchain.
Transaction verification through zk-Rollups is still possible because zero knowledge of the entire data is required. In other words, the sidechain has already verified each transaction, so transactions are automatically valid on the mainchain. More specifically, zk-Rollup protocols facilitate interactions between transactor and relayer.
Transactors are tasked with creating and broadcasting their transaction data to the network, while relayers collect transactions and create rollups.
What Are Optimistic Rollups?
Optimistic Rollups (ORs) are layer-2 solutions that run parallel to the Ethereum mainchain. However, unlike zk-Rollups, ORs only publish the bare minimum of information to the mainchain, generating proofs only in fraud cases – a dynamic that makes them “optimistic.” For this reason, zk-Rollups are sometimes referred to as “validity proofs,” while ORs are known as “fraud proofs”. Just like zk-Rollup relayers, anyone can become an aggregator by locking a bond in the OR smart contract.
Below is a breakdown of the process:
↺ When users send transactions to off-chain Optimistic Rollups, aggregators sign up, and fraud proofs are committed.
↺ The aggregator deploys the transaction locally to generate a new smart contract. After computing the new state root (Merkle root), the aggregator sends the transaction and state root back to the mainchain.
↺ If users believe that an aggregator has returned a fraudulent state root, including an invalid transaction, they can challenge the aggregator.
↺ Users can register this challenge by posting the correct state root and the Merkle proofs necessary to validate it.
↺ The offending aggregator will see their bond slashed, with those proceeds going to the reporting user.
Once an invalid block has been identified and a fraud-proof is complete, the Layer-2 chain rolls back, resuming at the previous non-fraudulent block. While some believe ORs afford greater oversight, others point to the following challenges, such as an invalid state, where ORs allow for the existence of an invalid blockchain state. As a result, an invalid state can exist until proof of fraud is submitted, which may never occur.
Another point of concern is security; due to their game-theory-based model, ORs may be more vulnerable to attack. Because users can engage in reporting fraud, there are more opportunities for adverse outcomes. Finally, there is the issue of scalability. In some cases, ORs may require more mainchain computational resources as transactions scale, leading to higher costs.
We welcome relevant and respectful comments. Off-topic comments and spamming links may be removed.
Please read our Comment Policy before commenting.