An optimistic rollup is a Layer-2 scaling solution designed to increase transaction throughput and reduce gas fees on blockchains like Ethereum. By processing transactions off-chain and batching them together, optimistic rollups preserve the security and decentralization of the underlying Layer 1.
Core Mechanics
- Optimistic Execution: Transactions on Layer 2 are assumed valid by default without immediate verification on Layer 1.
- Batching: A rollup sequencer processes transactions, bundles them into batches, and periodically submits state roots (Merkle roots) and compressed data to the L1 smart contract.
- Fraud Proofs: External validators monitor submitted state roots during a dispute period (typically one week). If an inconsistency is found, a validator submits a fraud proof to revert the state to its last valid checkpoint.
User Lifecycle
- Deposit: Users lock assets in an L1 smart contract to receive equivalent tokens on Layer 2.
- Off-Chain Activity: Users execute transactions on L2 with lower gas fees and quick confirmations.
- Withdrawal: Users requesting an L1 exit must wait through the dispute period before funds are unlocked, ensuring time for fraud verification.
Key Benefits & Trade-offs
- Smart Contract Support: Optimistic rollups feature full EVM compatibility, enabling seamless migration of decentralized applications.
- Data Availability: Reliable off-chain data access is critical so validators can construct fraud proofs.
- Sequencer Risks: Centralized sequencing can introduce censorship concerns, requiring decentralized sequencer networks to mitigate risk.
