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. 
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. 
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. 
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. 
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. 
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: 
- 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
|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|
Did you find this article interesting?