ZK Rollup

Rollups are a relatively new L2 solution being implemented on Ethereum that enable exponential scalability gains while providing (nearly) identical security guarantees as mainnet Ethereum. The primary innovation of rollups is that they move computation off-chain, while storing only the bare minimum of transaction data on-chain with no added trust assumptions. ​​Rollups execute transactions in a new environment (off-chain) and bundle them before delivering the changed state and transaction data to Ethereum. The executed changed state is then sent to Layer 1 and confirmed in a verification contract using either validity or fraud proof techniques. There are two primary types of rollups: Zk-rollups and Optimistic rollups. The primary difference between the two implementations lies with their cryptographic proofs: validity proofs for ZK-rollups (ZKR) and fraud proofs for Optimistic rollups (OR). Each rollup deploys a set of smart contracts on L1 Ethereum that are responsible for processing deposits/withdrawals and verifying the submitted proofs. The main value proposition of rollups is that they minimize the data footprint on L1 while still preserving the ability to check for fraud. Zero-knowledge rollups (ZKRs) batch together thousands of off-chain transactions, actually do the computation, and then post the batch to mainnet as a “<a href="https://www.cryptoeq.io/dictionary/validityproof">validity proof.</a>” The validity proof is a cryptographic proof (called a “<a href="https://docs.ethhub.io/ethereum-roadmap/layer-2-scaling/zk-rollups/">SNARK</a>” or STARK) that has already computed the state of the L2 and is sent to mainnet for storage, containing much less data than the calldata used in Optimistic rollups. The “batch” that’s rolled up is periodically posted to mainnet Ethereum and contains the net outcomes of many different transactions as they occurred on the rollup layer. This data is verified and updated by the rollup operator every time the L2 advances its state. Therefore, L2 execution and L1 data update in lockstep. Starkware, zkSync, and Polygon Hermez are a few examples of ZKRs.