Rollup
Rollup is an off-chain method for conducting transactions, designed to address Ethereum's issues with scalability, speed, and transaction costs. It processes transactions outside of the Ethereum main network and only sends the aggregated results back to the main network. [1]
Rollup is a type of Layer 2 scaling solution that bundles and records multiple transactions as a single transaction on the main blockchain to reduce the amount of data stored on-chain and increase the overall transaction throughput and efficiency. [2][3]
Overview
Rollup is an Ethereum protocol that helps process transaction executions outside the main chain and sends the transaction data back to the leading network to increase speed and lower costs. It provides scaling solutions for the Ethereum blockchain facing scaling issues with high gas fees due to congestion. Rollup aims to fix the problem many blockchains face by reducing data size and bundling transactions for more efficient transaction processing and storage. [4][5][6]
Implementation
A rollup can be implemented in different ways to solve Ethereum's scalability problem. The two major types of rollups are optimistic and zero-knowledge (ZK) rollups. [4]
Optimistic Rollup
Optimistic rollup functions as a dispute resolution mechanism to detect invalid transactions. It ensures that the transaction data submitted to the Ethereum network is correct and valid. Optimistic rollup bundles multiple off-chain transactions in a large batch and submits them to the Ethereum network as one transaction. Consequently, most Layer 2 networks rely on this rollup implementation to increase network throughput. [4][9]
The optimistic rollup’s main function is to validate transaction data on the Ethereum blockchain. When there’s an invalid transaction, the system will identify it, recover the correct state, and penalize the party that submitted such a transaction. The dispute resolution system by which optimistic rollup functions is to verify fraud proofs, detect fraudulent transactions, and disincentivize bad actors from submitting other incorrect fraud proofs or invalid transactions on the Ethereum network. In the fraud-proving mechanism that identifies illegitimate transactions, two parties are usually involved: verifiers and executors. Both parties can stake coins as collateral and lose them if the transaction is fraudulent or the verifier is wrong. Fraudulent claims can be processed in an optimistic rollup for up to one week. [3][8][10]
Zero-knowledge (ZK) Rollup
ZK rollup bundles hundreds of off-chain transactions and provides cryptographic proof to authenticate their validity. It uses validity proof to confirm the correctness of a processed transaction and submit minimal summary data to the mainnet. There are two types of ZK rollups, namely:Â [2][8][11]
- zk SNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge), in which verifiers and provers go through all the transactions in a specific rollup and verify the transactions off-chain.
- zk STARK (Zero-Knowledge Scalable Transparent Argument of Knowledge), which works similarly to zk SNARK by bundling up transactions, verifying the transactions off-chain, creating validity proofs, and submitting them to the Ethereum mainnet.
Differences between Optimistic and ZK Rollup
Although optimistic rollup and ZK rollup both function off-chain and scale the Ethereum network, they differ in various ways: [6][12]
Optimistic rollup | ZK rollup | |
---|---|---|
Transaction validation | It uses "fraud-proof" to prove the validity of transactions and identify illegitimate ones. | It uses "valid-proof" to verify the correctness of processed transactions. |
Validity proof | Validity proofs are not published on-chain | Validity proofs are published on-chain |
Transaction finality | It takes about one week to complete the transaction. | Transactions are immediate, i.e., there is no delay in the transaction. |
Transaction costs | Lower cost | Higher cost |