ZK Rollup Comparison: What is a ZK Rollup & Which is Best?
A zero-knowledge rollup (ZK rollup) is a scaling solution for blockchains, using ZK proofs to verify transactions privately.
Scalability has been a longstanding concern for Ethereum. There are more than 180,000 pending Ethereum transactions at the time of writing this.
In a live stream during Ethereum’s Shanghai upgrade, the blockchain’s co-founder Vitalik Buterin said:
If we don’t fix [Ethereum] scaling before the next bull run, people are going to be stuck paying $500 transaction fees.
This lack of scalability, combined with Ethereum’s high gas is a recipe for a network disaster.
So what's the fix for this?
Layer 2 (L2) solutions like state channels, sidechains, and rollups are popping up left & right to make Ethereum more scalable (and thus cheaper) without compromising security or decentralization.
In this race to Ethereum scalability, zero-knowledge rollups (or simply ZK rollups) are considered one of the most promising solutions.
But, what are zero-knowledge rollups in the first place? How do they improve Ethereum scalability? And which one’s the best?
In this blog post, we will explore what a ZK rollup is, how it works, and more importantly, how popular ZK rollups fare against each other.
Let’s dive in.
What is a zero-knowledge rollup?
A zero-knowledge (ZK) rollup is a layer-2 scaling solution that takes contract computation and transaction execution off-chain to make Ethereum more scalable. Upon execution, ZK rollups batch transactions and publish a validity proof of those transactions on Ethereum.
We can break down the concept of ZK rollups into two parts: zero-knowledge proofs (ZKPs) and blockchain rollups.
Let’s check out these individual concepts to better understand what ZK rollups are.
Zero-knowledge proof (or ZKP)
Zero-knowledge proof or ZKP is a cryptographic technique used to prove the ownership or validity of certain information without revealing the information itself. This ability of ZKP technology is the reason why it’s called zero-knowledge
ZKPs have many use cases in blockchain, including identity verification, private transactions (as seen in zCash), and blockchain scalability.
Blockchain rollups are L2 blockchains that process transactions on a separate network, roll-up transactions into a batch, and publish them on Ethereum — the L1 network.
The basic premise of rollups is combining multiple letters (transactions) into an envelope (batch) to be posted (recorded on a blockchain).
Rollups reduce the computational pressure on the Ethereum network by doing two things:
- Computing transactions and moving state storage off-chain,
- Compressing data for every transaction that gets stored on Ethereum. For example, a simple ETH transfer takes ~110 bytes on Ethereum but only takes about ~12 bytes on a rollup.
These two concepts combine to make zero-knowledge rollups an efficient and secure scaling solution for Ethereum.
How do zero-knowledge rollups work?
To understand how zero-knowledge rollups work, let us divide the process into two parts — core infrastructure and execution process. The former consists of the moving parts that make the rollups while the latter is the rollup’s route to scaling Ethereum.
1. Core infrastructure
The core infrastructure of a ZK rollup has two parts to it: the on-chain contracts and the off-chain virtual machine.
- On-chain contracts: ZK rollups are operated by smart contracts running on Ethereum. The main contract stores rollup blocks, tracks deposits, and monitors state updates coming from the ZK rollup. Another verifier contract is used to validate the ZK proofs submitted by block producers.
- Off-chain virtual machine: This is the off-chain execution engine of ZK rollups responsible for the computation and storage of transactions and chain state. The rollups use ZKPs to help Ethereum-based verifier contracts to verify the accuracy and legitimacy of all computations in this off-chain VM.
2. Execution process
The execution process of ZK rollups can be split into three parts: sequencing, proof generation, and proof verification.
- Sequencing: Similar to node operators on Ethereum, L2s have sequencers who execute transactions, roll them up into batches, and submit them to the ZK rollup contract. This process is called sequencing.
- Proof generation: ZK rollup operators produce validity proof to verify the correctness of a batched transaction.
- Proof verification: Validation mechanisms, namely zk SNARKs or zk STARKs are used to verify the integrity of the zk proofs submitted on-chain. The proof needs to prove a sequence of valid transactions from the L1’s pre-state root to the ZK rollup’s post-state root. If valid, the zk rollup’s post-state root is accepted as ‘valid’ and is published on Ethereum.
The ultimate ZK Rollup comparison: which is best?
In the Ethereum-compatible ZK rollup category, four major proponents are building promising solutions: Polygon, Scroll, zkSync, and StarkWare. Let’s check out all four of them.
Polygon is one of the earliest projects to work on ZK tech and adopt them as L2 scaling solutions. Their $1 billion commitment towards zero knowledge tech-related efforts is a testament to their belief in ZK tech.
The ZK suite of Polygon currently has 4 products.
Alt Title: Polygon’s ZK ecosystem. Source
- Hermez: Hermez is Polygon’s decentralized ZK rollup protocol that employs ‘Proof of Efficiency’, allowing any user to become a sequencer (to batch transactions) or aggregator (to generate ZK proofs). This reduces centralization and its associated risks.
- Miden: Miden is Polygon’s EVM- compatible general-purpose ZK rollup that’s supercharged with local execution of smart contracts. Only proofs need to be submitted to the network, enabling parallel transactions (improves efficiency).
- Nightfall: Polygon Nightfall is the union of optimistic rollups and ZK technology to cater to enterprise-level scaling. Nightfall embraces the efficiency of optimistic rollups alongside the privacy elements of ZK technology. It thus opens avenues of enterprise use cases where sensitive data is in play.
- Zero: Polygon Zero is a fully EVM-compatible ZK rollup solution. It employs Plonky2 — a recursive proof system easing the time and resources needed for validity proof generation.
With these products, Polygon offers a wide array of ZK rollup solutions that are:
- Fast: Plonky2 generates a ZK proof in 0.17 seconds
- Efficient: Hermes 2.0 aims to minimize proof sizes.
- Economical: Gas costs to reduce from 5M to 350K
These rollups coupled with Polygon’s zkEVM are solutions to watch out for in the race to Ethereum scalability.
Scroll is a layer-2 scaling solution for Ethereum that uses zk-rollup technology. It is a general-purpose zk-rollup, which means that it can be used to support any type of Ethereum application.
Scroll has a three-part architecture:
- Scroll node: This is the bridge between layer 2 and layer 1. It constructs blocks from user transactions on layer 2 and submits them to Ethereum.
- Roller network: This network of nodes generates zero-knowledge (ZK) validity proofs to prove the correctness of the transactions in the blocks.
- Rollup and bridge contract: This contract bridges fund transfers between Ethereum and Scroll, verifies ZK validity proofs, and ensures data availability.
In addition to its architecture, Scroll has two unique features that help scale Ethereum:
- Decentralized proving: Anyone can become a roller by staking SCR, the native token of the Scroll network. The amount of SCR staked determines the probability of a roller being chosen to generate proofs. This ensures that proving is decentralized and not controlled by a small group of entities.
- Low cost of proving: Scroll uses a novel technique to reduce the cost of proving. This makes it possible for anyone to participate in the roller network, even if they do not have a lot of computing resources.
Since its launch in February 2023, Scroll has attracted over 1 million unique addresses and 2+ million transactions.
zkSync, developed by Matter Labs, is an EVM-compatible ZK rollup that has undergone significant upgrades. Initially launched as zkSync 1.0 (now known as zkSync Lite) with limited functionalities, it has recently evolved into zkSync Era, a full-scale zkEVM. This latest chain introduces new features like native account abstraction and an LLVM compiler.
Since its upgrade, zkSync Era has demonstrated impressive performance, processing over 16 million transactions using ZKPs in less than two months. It has also amassed a total value locked (TVL) of more than $100 million, showcasing its growing popularity and adoption.
The advantages of using zkSync Era are:
- Data compression: zkSync prioritizes data availability (DA) and its cost, which ultimately determines transaction costs. By publishing only state differences on-chain, zkSync can improve DA and reduce the costs of transactions with large input data.
- Account abstraction: Account abstraction is native on zkSync to improve user and developer experience. The initial use case is limited to paying gas fees in any currency of choice. More use cases like social recovery, subsidizing gas, and batching complex transactions are possible with account abstraction on zkSync.
These features supercharge zkSync Era into a powerful engine for scaling Ethereum.
StarkNet is a general-purpose, EVM-compatible layer-2 scaling solution for Ethereum. It is being developed by StarkWare, a company founded by Eli Ben-Sasson — the co-inventor of ZK STARK proofs and the founding scientist at the privacy-focused crypto payment network Zcash.
By using StarkWare’s ZK technology, StarkNet can scale to millions of transactions per day while still maintaining the security of Ethereum.
StarkNet is still under development, but it has the potential to be a major scaling solution for Ethereum. It has already attracted a number of developers and projects, including dYdX, Immutable, and DeversiFi.
Unlike other ZK protocols, StarkNet uses STARK (Succinct Non-interactive ARgument of Knowledge) proofs instead of the commonly used SNARK (Scalable Transparent ARgument of Knowledge) proofs.
Here’s a brief overview of how STARKs and SNARKs fare against each other:
- Rely less on centralization.
- Are more quantum resistant.
- Consume less gas to generate proofs.
- Verify proofs quicker.
However, on the EVM-compatibility spectrum, StarkWare’s StarkNet is the least compatible ZK rollup. That’s because StarkWare is developing StarkNet to also function as a standalone chain and not be completely reliant on Ethereum.
Polygon vs. Scroll zkEVM vs. zkSync Era vs. StarkNet — Overview of the ZK Rollup Race
Get started with ZK Rollups
You can start deploying smart contracts and building dApps on any of the above zkEVMs — and 700+ EVM chains — with thirdweb’s web3 developer tools, available for free. Simply search for the network that you want to build on in our Chainlist & start building:
Here are some guides for you to get started right away:
How to Deploy a Smart Contract on Polygon zkEVM
Deploy a Smart Contract to ConsenSys zkEVM Testnet
Are ZK rollups and zkEVMs the same?
The difference between ZK rollups and zkEVMs is the same as the difference between Ethereum and EVM. The former is the blockchain that records the transactions while the latter is the computation environment where the smart contract computation happens.
What are the differences between ZK rollups and optimistic rollups?
ZK rollups work on a ‘guilty until found innocent’ principle. That means, ZK rollups consider every transaction fraudulent by default and require the network to prove otherwise. This makes the network compute-intensive but more secure.
Optimistic rollups work on an ‘innocent until found guilty’ principle. That means, by default, optimistic rollups regard all transactions as valid. Nodes may generate a fault proof to flag and remove any suspicious transactions. But optimistic rollups are faster and more efficient.
Which is better: zkSNARKs or zkSTARKs?
There is no black-or-white answer to this question.
- SNARKs proof sizes are smaller than STARK proofs.
- SNARKs are prone to centralization risks as they require a trusted setup.
- STARKs are more secure than SNARKS as they are quantum attack resistant.
- SNARKs are more popular in current usage and application than STARKs.
ZK Rollups: Potential and Future
ZK rollups strike a fine balance between efficiency and privacy, enabling a wider array of use cases for blockchain applications. Currently, however, most major ZK rollups from that of Polygon and StarkWare to Scroll and zkSync need major developments to achieve maximum efficiency.
But ZK rollups will likely be the most robust long-term blockchain scalability solution. The next year would be the most defining phase of what ZK rollup emerges as the dominating ZK-powered Ethereum scalability solution.
We hope this blog post has helped you better understand what a ZK rollup is, the projects that are building ZK rollups, and how they are pursuing scaling on Ethereum.
If you have any questions, join 36,000+ other builders in our Discord community — or reach out to the team directly for more info on how to get started with smart accounts.
And if you want to start building web3 apps with smart accounts, get started with thirdweb’s web3 tools & SDKs — they’re free!