Rollup is the most common Layer 2 solution in the current market. Rollup solutions can be divided into two categories: Optimistic Rollups and ZK Rollups. This article will introduce ZK Rollups.
ZK stands for Zero Knowledge, which refers to Zero-Knowledge Proofs. Zero-Knowledge Proofs allow users to prove their knowledge of critical data or ownership without revealing sensitive information, like the private keys to their wallet.
Rollup is a Layer 2 solution that improves efficiency by bundling multiple transactions together. After the transactions are completed, the transaction data is sent back to the main network. Rollup focuses on scaling and improving transaction performance while relying on the main network for security.
ZK Rollup is a solution that utilizes validity proofs to scale computations. It performs computations off-chain and submits validity proofs back to the main chain.
The basic principle of ZK (Zero Knowledge) involves two parties: the Prover and the Verifier. The Prover generates a proof, and the Verifier verifies the proof without gaining access to the actual information. The key features include:
1. Comprehensiveness: If the Prover possesses the correct answer, they can find a way to prove its truth to the Verifier. In other words, something true cannot be proven false.
2. Soundness: If the Prover does not possess the answer, they cannot prove its truth to the Verifier. In other words, something false cannot be proven true.
3. Zero-Knowledge: During the proof process, the Verifier only gains knowledge of the proof itself and does not acquire any additional relevant information.
In the case of ZK Rollup, typically only the first two properties of ZK are applied to achieve compressed computation and reduce costs. As a result, user transaction information remains queryable.
1. Fast Asset Transfers: Compared to Optimistic Rollups, which require approximately 7 days for verification, ZK Rollups offer much faster asset transfers. This is due to the different validation processes of the two Rollup solutions. After transaction data is processed on the Layer 2 network:
- ZK Rollup generates a zero-knowledge proof when submitting the block to the Ethereum mainnet. The mainnet nodes verify this proof, and users generally have no perceptible delay.
- Optimistic Rollup has a waiting period of 7 days, during which Ethereum mainnet nodes can challenge and prove a transaction to be false.
2. Low Transaction Costs: ZK Rollup performs computations off-chain and submits validity proofs to the main chain, avoiding the need to send all transaction data back to the mainnet. This reduces transaction costs. Additionally, the proof file is small and verification time remains constant, so the proof itself does not increase in size with the number of transactions.
3. High Technical Difficulty: ZK Rollup employs complex zero-knowledge proof algorithms that are incompatible with the Ethereum Virtual Machine (EVM). Therefore, developers who want to deploy Ethereum applications on Layer 2 networks using ZK Rollup must not only rebuild their applications but also learn the development languages specific to Layer 2 networks.
The gas fees paid by users mainly consist of incentives for validator nodes, gas fees for submitting to the mainnet, and storage costs.
Validator nodes confirm and broadcast transactions on behalf of users but require incentives to perform these actions. Gas fees for submitting to the mainnet increase as the mainnet becomes more congested.
Storage costs are relatively fixed. The more people who use the available resources, the lower the average cost. ZK Rollup has not yet been widely adopted, so gas fees are much higher compared to Optimistic Rollup, which is more commonly used.
Among the existing EVM-compatible solutions, StarkNet, zkSync, Polygon, and Scroll are particularly notable.
StarkNet is developed by the StarkWare team. Unlike other ZK solutions, StarkNet utilizes STARK proofs, while other solutions employ SNARK proofs. In simple terms, these two proof systems are different in the following ways:
zkSync is developed by the Matter Labs team and is currently running on the zkSync Era network. The current advantages of the zkSync network include:
In addition to adopting Bytecode-level EVM compatibility methods, Polygon has also implemented a new consensus mechanism called Proof of Efficiency (POE), which enhances decentralization while increasing network security.
Scroll was launched in February of this year and is currently in the Pre-Alpha testnet phase. Scroll aims to be fully compatible with the Ethereum Virtual Machine (EVM) at the bytecode level. In other words, developers can use any EVM-compatible language to create smart contracts and deploy them on the Scroll platform.
| Development Phase | Programming Language | EVM Compatibility | SNARK or STARK | Fees |
Polygon | Public Beta | Solidity | Fully Compatible with EVM | SNARK+STARK | ETH |
Scroll | Pre-Alpha | Solidity | Fully Compatible with EVM | SNARK | ETH |
zkSync Era | Public Beta | Solidity、Vyper、LLVM | Only Language Compatible | SNARK | All erc20 Tokens |
StarkNet | Alpha Mainnet | Cairo, Solidity (Using Compiler) | Only Language Compatible | STARK | STRK or ETH |
ZK Rollup solutions have achieved a balance between efficiency and privacy, offering higher TPS (Transactions Per Second) and lower costs. The main constraint on its development at this phase is primarily due to technical factors, particularly EVM compatibility. Different technology teams have proposed their own solutions and are currently in the testing phase. When these projects go live on the mainnet, it may pave the way for widespread adoption of ZK Rollup.