Zero Knowledge Rollups


A zero-knowledge rollup is a Layer 2 blockchain solution that performs computations and storage off-chain while funds are held in a smart contract.

What Are Zero-Knowledge Rollups (ZK Rollups)?

Simply put, zero-knowledge rollups or zk-rollups is a layer-2 scalability solution that allows blockchains to validate transactions faster while also ensuring that gas fees remain minimal. Zk-rollups manage to perform better than traditional layer-1 blockchains because they combine on and off-chain processes. 

While the Ethereum mainnet explicitly utilizes on-chain activities to process transactions and validate blocks, layer-2 zk-rollup solutions introduce off-chain functionalities as well. One of the main components that allow them to successfully validate transactions faster than layer-1 blockchains are Merkle Trees.
Merkle Tree is an important mathematical structure that allows blockchains to ensure that no one can fake data on the on-chain records of a zk-rollup. Usually, a zk-rollup consists of two Merkle Trees which are both stored on a smart contract, or in other words, on-chain. One tree is dedicated to storing accounts, while the other stores all balances. Any other type of data generated and used by the zk-rollup is stored off-chain.

Zk-rollups are becoming increasingly popular both among developers who are looking to boost usability and among investors and traders looking for faster and cheaper transaction processing.

ZK Rollups Explained

A zk-rollup is a layer-2 scaling solution increasing Ethereum's throughput by processing transactions outside of the Ethereum mainnet. It alleviates congestion on the base layer and bolsters scalability.
The three primary components of a zero-knowledge rollup include a smart contract on Ethereum, a prover, and a set of verifiers. Interactions between chains are managed by the smart contract. A third-party prover generates cryptographic proofs of transaction validity on the layer-2 chain, while verifiers are a group of nodes responsible for confirming these proofs and submitting them to the smart contract.

Users sign transactions and submit them to the prover, who verifies and queues them. Periodically, the prover batches thousands of transactions from the queue into a block and generates a zero-knowledge proof of their validity. This proof is a concise piece of data that can be verified in just a few milliseconds without revealing any transaction information. The prover then submits the proof and a small amount of data — such as the state root and the transaction root — to Ethereum as a single transaction. The smart contract verifies the proof and updates its state accordingly.

Withdrawing funds necessitates an exit request, which is submitted to an Ethereum block. The smart contract then unlocks and transfers the funds. No waiting period is required for withdrawals, as they are verified by proofs.

A key feature of zk-rollups is their use of zero-knowledge proofs to verify transactions on-chain without requiring any interaction or trust. This enables high scalability, low latency, and privacy features.

Types of Zero-knoweldge Rollup (ZK Rollup)

Factors that differentiate various types of zero-knowledge rollups include:

Proof System: Refers to the type of zero-knowledge proof employed to verify on-chain transactions. Different proof systems possess distinct properties and trade-offs, such as proof size, verification time, prover time or trusted setup. Popular proof systems include zk-SNARKs, zk-STARKs, PLONK and Bulletproofs. Examples of zk-rollups using different proof systems are zkSync (PLONK), StarkWare (zk-STARKs), and Aztec (zk-SNARKs).
Circuit Design: Pertains to the encoding and execution of transactions on the layer-2 chain. Different circuit designs have implications for scalability, usability, and compatibility. Primary circuit designs include account-based, UTXO-based, and ZKVM-based. 
Examples of zk-rollups using different circuit designs are zkSync (account-based), StarkWare (UTXO-based), and ZkPorter (ZKVM-based).
Data Availability Solution: Refers to the storage and access of full-block data off-chain. Different data availability solutions offer various pros and cons, such as decentralized storage networks (like IPFS), data availability committees (like Celestia), or data availability sampling (like Validium). Examples of zk-rollups using different data availability solutions are zkSync (IPFS), StarkWare (Validium) and ZkPorter (Celestia).

What Does “Zero Knowledge” Mean for ZK-Rollups?

In zk-rollups, the term "zero-knowledge" refers to the use of zero-knowledge proofs for on-chain transaction verification without requiring interaction or trust. Zero-knowledge proofs are cryptographic proofs that can demonstrate a statement's truth without disclosing any information about the statement itself.

Benefits of ZK-Rollups

  1. Lower Gas Fees: By generating zero-knowledge proofs for transaction batches and submitting minimal on-chain data, zk-rollups increase efficiency and decrease gas costs. 

  2. Higher Throughput: By circumventing base layer congestion and limitations, zk-rollups achieve faster transaction speeds and reduced confirmation times. Some estimates suggest zk-rollups can increase throughput by up to 100x.

  3. Faster Confirmation Times: Users no longer need to wait for block confirmations on the base layer, which could take several minutes or hours depending on network conditions. Instead, they receive immediate feedback and finality on the layer-2 chain.

  4. Privacy Features: Zk-rollups enhance transaction privacy by using zero-knowledge proofs to verify them on-chain without disclosing any information. This means minimal data is posted on-chain, and no information about the transactions is leaked. Zk-rollups also offer privacy features, such as concealing transaction amounts or recipients.

  5. Security and Integrity: Zk-rollups inherit the robustness and trustlessness of Ethereum's consensus mechanism and validator network. Users don't need to trust third parties or intermediaries to process their transactions or store their data.

Challenges or Limitations of ZK-Rollups

  1. Proof Generation Cost: The cost of generating a zero-knowledge proof for a transaction batch depends on the complexity of the transactions, the proof system and the circuit design. Proof generation costs can be high for some use cases, potentially affecting zk-rollups' scalability and usability. Reducing proof generation costs involves using more efficient proof systems or circuit designs or subsidizing or incentivizing provers.

  2. Circuit Complexity: This refers to the complexity of encoding and executing transactions on the layer-2 chain, depending on the circuit design and transaction functionality. High circuit complexity can affect zk-rollups' scalability and usability for certain use cases. Reducing circuit complexity involves using more optimized or specialized circuit designs or simplifying or standardizing transactions.

  3. Compatibility Issues: Zk-rollups aren't fully compatible with existing smart contracts and tools running on Ethereum, necessitating changes or adaptations. Developers might need to use different languages, frameworks, libraries, or standards to write smart contracts for zk-rollups. Users might also need different wallets, browsers, or interfaces to interact with zk-rollups. Addressing compatibility issues involves using more interoperable or universal solutions or providing education and support for developers and users.