ZK 101 ZK Hub
July 10, 2023

Understanding ZK Rollups and Optimistic Rollups: Layer 2 Scaling Solutions for Ethereum

The scalability and cost-effectiveness challenges faced by Ethereum, including transaction congestion, slow confirmations, and high fees, have necessitated the development of a scalable solution while upholding the principles of decentralization.

In response, ZK-Rollups have emerged as a prominent topic in the blockchain space, offering an innovative Layer 2 scaling solution for Ethereum. By offloading transaction execution to a separate layer, ZK-Rollups enable Ethereum’s Layer 1 (L1) to focus on consensus and data availability. This explainer explores the concept of ZK-Rollups, their benefits, and the challenges associated with their implementation.

What are ZK rollups?

The key idea behind ZK rollups is to leverage zero-knowledge proofs, a cryptographic technique, to aggregate and validate the correctness of multiple transactions without revealing the specific details of each transaction. This aggregation and validation process occurs off-chain, which significantly improves the scalability of Ethereum.

Here’s a simplified explanation of how ZK rollups work:

  • Aggregation: ZK rollups bundle multiple transactions into a single transaction. Instead of processing each transaction individually on the Ethereum mainnet, they combine them into a batch.
  • Zero-Knowledge Proofs: Zero-knowledge proofs allow the verification of the bundled transactions without exposing the specific transaction data. These proofs demonstrate that the transactions within the batch are valid without revealing the details of each transaction.
  • Off-Chain Execution: The bundled transactions, along with the zero-knowledge proof, are processed and validated off-chain. This off-chain execution reduces the computational load on the Ethereum mainnet, enhancing scalability.
  • Cost Reduction and Accessibility: By reducing the burden on Ethereum’s L1, ZK-Rollups lower transaction fees, making blockchain technology more economically viable and accessible to a broader user base. This cost-efficiency enhances the potential for blockchain adoption and facilitates global participation.
  • On-Chain Verification: After the off-chain processing, the aggregated proof is submitted to the Ethereum mainnet for on-chain verification. Anyone on the network can verify the validity of the proof, ensuring the security and trustworthiness of the ZK rollup construction.

Using ZK rollups, Ethereum can achieve significant improvements in transaction throughput and reduce transaction costs compared to traditional on-chain transactions. ZK rollups offer a balance between scalability and maintaining the security and decentralization of the Ethereum network.

Zero-Knowledge Proofs: ZK-SNARK and ZK-STARK

Within the sphere of zero-knowledge proofs used in ZK rollups, two prominent cryptographic techniques deserve special mention: ZK-SNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) and ZK-STARK (Zero-Knowledge Scalable Transparent Argument of Knowledge). These techniques are vital to ensuring privacy and integrity within ZK rollups.

a. ZK-SNARK:

ZK-SNARK is a type of zero-knowledge proof that enables the generation of compact proofs for complex computations. It allows a prover to demonstrate knowledge of certain information without revealing the actual information itself. In the context of ZK rollups, ZK-SNARK proofs are utilized to compress and verify the correctness of bundled transactions off-chain. By aggregating multiple transactions into a succinct proof, ZK-SNARK enables efficient and privacy-enhanced scalability within ZK rollups.

b. ZK-STARK:

ZK-STARK is another form of zero-knowledge proof that offers scalability and transparency in ZK rollups. Unlike ZK-SNARK, ZK-STARK doesn’t require a trusted setup phase, making it more transparent and resilient to potential vulnerabilities. ZK-STARK proofs are larger than ZK-SNARK proofs but provide enhanced scalability for complex computations. Their scalability makes ZK-STARK particularly suitable for scenarios where high computational integrity is crucial, such as validating the correctness of large-scale computations in ZK rollups.

Companies Developing ZK Rollups

Several companies are actively working on ZK rollup implementations, contributing to the advancement of this technology.

Matter Labs: Founded in 2018, Matter Labs is known for their zkSync rollup solution that runs on ZK-SNARK. According to the developers, zkSync is 99% compatible to Yul, an intermediate programming language used for the solution. In March, Matter Labs launched zkSync Era, an alpha version of the L2 scaling solution, on the Ethereum mainnet. Reputable projects including Chainlink, SushiSwap, Uniswap, Aave, Argent, 1inch, and Gnosis are using zkSync.

StarkWare: StarkWare utilizes their STARK technology to build ZK rollup solutions that offer scalability without compromising security. Their solutions aim to enhance the transaction capacity of Ethereum, enabling broader adoption and improved user experience. It’s most known for developing StarkNet and StarkEx. StarkNet runs on ZK-STARK proofs (Scalable, Transparent ARgument of Knowledge) or (STARK Validity Proofs) technology and implements user accounts as smart contracts. Unlike Ethereum and other EVM L2 solutions, uses the uses the native high-performance Cairo language. 

Transactions on StarkNet are not directly stored in a chain. Instead, only the changes to the system resulting from those transactions are recorded on the underlying Layer 1 (L1) blockchain. StarkNet employs a system of recursive proofs, generating proofs that effectively reduce the size of the overall proofs required for verification.

Scroll: Scroll is a ZK-SNARK rollup that prioritizes compatibility with the Ethereum Virtual Machine (EVM), facilitating a smooth transition for current applications from Layer 1 (L1). The project has gained significant traction within the Asian Ethereum community, particularly in Vietnam.

A key component of Scroll’s architecture is Scroll Node, which creates L2 blocks with user transactions. It commits the transactions to the Ethereum mainnet, therefore reducing communication between L1 and L2.

Polygon: Although known mostly as an Ethereum scaling solution, Polygon started making a pivot into zkEVM last July when it released part of the source code and roadmap for zkEVM. But its ZK ambitions can be traced back to 2021 when it allocated $1 billion to focus on ZK-Rollup research.

In March this year, the Polygon zkEVM launched in beta on the mainnet and shortly after, Polygon unveiled version 2.0 of the protocol, which aims to allow developers to build on it using the Polygon zkEVM technology. Besides the zkEVM, other ZK solutions such as Polygon Miden, Polygon Hermez and Polygon Zero are being developed within the Polygon ecosystem.

Major projects including Lens, Balancer, QuickSwap, Uniswap, Aave, Covalent HQ, game projects Midnight Society and Oath of Peak as well as infrastructure providers like ANKR, Alchemy, Sequence and The Graph are reportedly launching in the Polygon zkEVM Mainnet beta.

Intmax: As a stateless layer of the Ethereum ecosystem, Intmax occupies a unique position that sets it apart from other stateful Layer 2 solutions. While Ethereum’s statefulness is a key characteristic that enables functionalities such as decentralized finance (DeFi), there is also a demand for an interoperable stateless payment/NFT layer that supports simpler use cases while maintaining compatibility with the stateful L1/L2 infrastructure. This can be likened to the relationship between UDP and TCP/IP.

In the context of blockchain and Ethereum, a stateful layer refers to a layer that maintains and manages the state of the system. The state includes information such as account balances, smart contract data, and transaction history. In Ethereum’s Layer 1 (L1), the mainnet, the state is stored and updated by all participating nodes, ensuring consistency and decentralization.

On the other hand, a stateless layer refers to a layer that does not retain or manage the state directly. Instead, it relies on the stateful layer, typically the Ethereum mainnet, for the required state information. A stateless layer focuses on specific functionalities without the need to maintain the entire state of the system. This approach can provide benefits such as lower gas costs, improved privacy, and scalability. In this case, Intmax plays a different role from existing scaling solutions, filling a gap within the Ethereum ecosystem.

Aztec Network: Aztec Network is a private ZK-rollup solution built on Ethereum, offering privacy and scalability to applications. It shares similarities with Bulletproofs as it utilizes range proofs. Initially founded in 2017 as an institutional platform called Creditmint, Aztec Network introduced PLONK in 2019 and launched the ZK-rollup in 2021, followed by Aztec Connect in 2022.

The first implementation, Aztec 1, focused on online privacy but was hindered by issues such as slowness, inefficiency, high costs, and limited functionality limited to basic private transactions. To overcome these limitations, Aztec developed Aztec Connect, which expanded the privacy capabilities beyond simple payments and enabled interaction with various smart contracts. This step not only provided valuable feedback but also showcased the potential cost savings achievable through packet-based transaction processing and encrypted storage packets.

Challenges and Considerations

While ZK-Rollups offer compelling benefits, they are not without challenges. To ensure the successful implementation and widespread adoption of ZK-Rollups, several considerations must be taken into account:

  • Security and Trustworthiness: Verifying the security and trustworthiness of ZK-Rollup operators is important. Ensuring that they faithfully execute transactions and protect user funds requires robust protocols and monitoring mechanisms.
  • Balancing On-Chain and Off-Chain Operations: Striking the right balance between on-chain and off-chain operations is essential to maintain the integrity and security of the system. Careful design and rigorous testing are necessary to prevent potential vulnerabilities.
  • Addressing Potential Vulnerabilities: As with any new technology, ZK-Rollups may have vulnerabilities that need to be identified and addressed. Continuous research, audits, and community collaboration are essential to identify and resolve potential weaknesses.

Optimistic Rollups: Scaling with Optimism

Optimistic rollups, as the name suggests, take an optimistic approach to transaction execution. They assume that transactions are valid by default, without immediate on-chain verification. This assumption enables a higher throughput of transactions and significantly reduces the computational load on the Ethereum mainnet. By processing most transactions off-chain, optimistic rollups alleviate congestion and improve scalability.

Optimistic rollups and ZK rollups are both layer 2 scaling solutions designed to improve Ethereum’s scalability by processing transactions off-chain and then settling them on the Ethereum mainnet. While they share a common goal of enhancing scalability, these two approaches differ in their underlying techniques and trade-offs. Understanding their similarities and differences is crucial to appreciate their respective contributions to the Ethereum ecosystem.

Key Features of Optimistic Rollups

  • Off-Chain Execution: In optimistic rollups, the majority of transaction computations are performed off-chain, minimizing the burden on the Ethereum mainnet. This allows for faster and more scalable transaction processing.
  • Optimistic Execution: Optimistic rollups assume that transactions are valid unless proven otherwise. This optimistic assumption enables faster processing and reduces the need for immediate on-chain verification.
  • Fraud Proof System: To address the potential for fraudulent or invalid transactions, optimistic rollups incorporate a fraud proof system. Users can submit evidence of fraudulent activity to the Ethereum mainnet, triggering a dispute resolution process. This mechanism ensures that invalid transactions can be challenged and resolved.
  • Periodic Verification: Despite the initial optimistic assumption, periodic verification is conducted on the Ethereum mainnet to validate the correctness of the off-chain transactions. This verification step ensures the security and trustworthiness of the optimistic rollup system.

Companies Developing Optimistic Rollups

Optimistic Rollups are a nascent L2 solution with two companies already leading the development of this technology.

Optimism: Optimism is a company focused on optimistic rollups, providing an infrastructure layer for developers to build scalable and efficient applications on Ethereum. They aim to bring substantial improvements in transaction throughput and user experience to the Ethereum ecosystem. The company claims that Optimism Mainnet has cumulatively saved users $2.69 billion in fees, 15.8 years of waiting for transaction confirmations, and currently secures $2.8 billion in on-chain value.

Arbitrum: Developed by Offchain Labs, Arbitrum aims to bring scalable and secure smart contracts to Ethereum through their optimistic rollup technology, which assumes the validity of transactions by default, enabling faster and more scalable transaction processing. By processing the majority of computations off-chain, Arbitrum significantly reduces the computational load on the Ethereum mainnet, alleviating congestion and improving scalability.

Arbitrum operates by bundling multiple transactions together into a batch and processing them off-chain. This off-chain execution allows for greater transaction throughput and lower fees compared to on-chain transactions. While the initial execution is optimistic, Arbitrum incorporates a fraud-proof system to address potential fraudulent or invalid transactions. Users can submit evidence of fraudulent activity to the Ethereum mainnet, triggering a dispute resolution process to ensure the integrity of the system.

A Comparative Analysis: ZK Rollups vs. Optimistic Rollups

While both ZK rollups and optimistic rollups provide layer 2 scaling solutions for Ethereum, they differ in their approaches, trade-offs, and areas of focus. Understanding these distinctions is crucial for evaluating their suitability for different use cases. Let’s further explore the similarities and differences between ZK rollups and optimistic rollups.

Similarities

Layer 2 Scaling Approaches: Both ZK rollups and optimistic rollups operate as layer 2 solutions, processing transactions off-chain and settling them on the Ethereum mainnet. By handling the majority of computations off-chain, they alleviate congestion and enhance transaction throughput.

Reduced Transaction Costs: Both solutions aim to reduce transaction costs compared to traditional on-chain transactions. By aggregating multiple transactions and processing them off-chain, ZK rollups and optimistic rollups significantly lower gas fees, making transactions more affordable for users.

Differences

Privacy and Verification Approach:

a. ZK Rollups: ZK rollups prioritize privacy-enhanced scalability through the use of zero-knowledge proofs. Zero-knowledge proofs allow for the verification of transaction validity without revealing specific transaction details. While ZK rollups achieve privacy, they require on-chain verification of the aggregated proof to ensure the correctness of transactions.

b. Optimistic Rollups: Optimistic rollups, on the other hand, focus on compatibility and scalability through an optimistic execution approach. They assume transaction validity by default, processing transactions off-chain without immediate on-chain verification. Instead, they rely on a fraud-proof system, where users can submit evidence of fraudulent or invalid transactions to the Ethereum mainnet. Periodic verification of the off-chain state is conducted on-chain to ensure security and trustworthiness.

Trade-offs in Security and Efficiency:

a. ZK Rollups: ZK rollups offer strong privacy guarantees through zero-knowledge proofs, ensuring transaction confidentiality. However, achieving privacy comes with additional computational overhead. The need for on-chain verification also introduces a delay in finality, as the aggregated proof must be validated on the Ethereum mainnet.

b. Optimistic Rollups: Optimistic rollups prioritize scalability and compatibility with existing Ethereum smart contracts. By assuming transaction validity, they achieve faster transaction processing and reduced computational requirements. However, the reliance on a fraud-proof system introduces the possibility of fraudulent or invalid transactions slipping through, which necessitates the periodic on-chain verification process.

The choice between ZK rollups and optimistic rollups depends on the specific requirements of the use case. If privacy is a paramount concern, ZK rollups provide strong guarantees through zero-knowledge proofs. However, if compatibility and faster processing are the primary considerations, optimistic rollups offer a pragmatic approach while maintaining scalability.

Conclusion

ZK rollups and optimistic rollups offer promising layer 2 scaling solutions for Ethereum. ZK rollups leverage zero-knowledge proofs to achieve privacy-enhanced scalability, while optimistic rollups prioritize scalability and compatibility with existing Ethereum contracts. With companies like Matter Labs, StarkWare, Scroll, Polygon, Optimism, Arbitrum, and Intmax leading the development, these solutions hold immense potential for overcoming Ethereum’s scalability limitations and fostering a more efficient and cost-effective blockchain ecosystem.

Disclaimer

In line with the Trust Project guidelines, please note that the information provided on this page is not intended to be and should not be interpreted as legal, tax, investment, financial, or any other form of advice. It is important to only invest what you can afford to lose and to seek independent financial advice if you have any doubts. For further information, we suggest referring to the terms and conditions as well as the help and support pages provided by the issuer or advertiser. MetaversePost is committed to accurate, unbiased reporting, but market conditions are subject to change without notice.

About The Author

Cindy is a journalist at Metaverse Post, covering topics related to web3, NFT, metaverse and AI, with a focus on interviews with Web3 industry players. She has spoken to over 30 C-level execs and counting, bringing their valuable insights to readers. Originally from Singapore, Cindy is now based in Tbilisi, Georgia. She holds a Bachelor's degree in Communications & Media Studies from the University of South Australia and has a decade of experience in journalism and writing. Get in touch with her via [email protected] with press pitches, announcements and interview opportunities.

More articles
Cindy Tan
Cindy Tan

Cindy is a journalist at Metaverse Post, covering topics related to web3, NFT, metaverse and AI, with a focus on interviews with Web3 industry players. She has spoken to over 30 C-level execs and counting, bringing their valuable insights to readers. Originally from Singapore, Cindy is now based in Tbilisi, Georgia. She holds a Bachelor's degree in Communications & Media Studies from the University of South Australia and has a decade of experience in journalism and writing. Get in touch with her via [email protected] with press pitches, announcements and interview opportunities.

Hot Stories

Missed Bitcoin’s Rise? Here’s What You Should Know

by Victoria d'Este
December 20, 2024
Join Our Newsletter.
Latest News

From Ripple to The Big Green DAO: How Cryptocurrency Projects Contribute to Charity

Let's explore initiatives harnessing the potential of digital currencies for charitable causes.

Know More

AlphaFold 3, Med-Gemini, and others: The Way AI Transforms Healthcare in 2024

AI manifests in various ways in healthcare, from uncovering new genetic correlations to empowering robotic surgical systems ...

Know More
Read More
Read more
15+ Best Bridges ZkSynс Ecosystem in 2023
ZK 101 ZK Hub
15+ Best Bridges ZkSynс Ecosystem in 2023
August 15, 2023
DeFi Apps Running on zkSync: A Comparative Analysis
Ecosystem ZK 101 ZK Hub
DeFi Apps Running on zkSync: A Comparative Analysis
August 8, 2023
Top 10 DeFi projects zkSync
Ecosystem ZK 101 ZK Hub
Top 10 DeFi projects zkSync
August 4, 2023
Top 10 StarkNet’s DeFi Projects in 2023
Ecosystem ZK 101 ZK Hub
Top 10 StarkNet’s DeFi Projects in 2023
August 4, 2023