Optimistic rollups are a Layer 2 scaling solution that executes transactions off-chain and posts compressed transaction data to the Layer 1 (typically Ethereum). They are called "optimistic" because they assume all submitted transactions are valid by default—trusting the sequencer to act honestly—and rely on a fraud proof mechanism to catch and penalize invalid state transitions after the fact.
This approach enables significant throughput improvements and gas savings while inheriting the security of the underlying L1, provided at least one honest verifier monitors the system and is willing to submit a fraud proof when necessary.
How Optimistic Rollups Work
The lifecycle of a transaction in an optimistic rollup proceeds as follows:
- Transaction submission: Users submit transactions to the rollup's sequencer, which orders and executes them off-chain.
- State computation: The sequencer applies the transactions to the rollup state, updating balances, contract storage, and other state variables.
- Batch posting: The sequencer compresses batches of transactions and posts the transaction data to Ethereum L1 as calldata (or blobs, post-EIP-4844).
- State root assertion: The sequencer posts a new state root to the L1 rollup contract, asserting that this is the correct state after executing the batched transactions.
- Challenge period: The state root enters a waiting period (typically 7 days) during which anyone can challenge it by submitting a fraud proof.
- Finalization: If no valid fraud proof is submitted during the challenge period, the state root is accepted as final on the L1.
Fraud Proofs
The fraud proof mechanism is the security backbone of optimistic rollups. It works on the principle of 1-of-N honesty assumption: the system is secure as long as at least one honest participant monitors the chain and is able to submit a fraud proof.
How Fraud Proofs Work
When a verifier detects that the sequencer has posted an incorrect state root, the verifier initiates a dispute:
- Challenge initiation: The verifier posts a bond and identifies the specific state root they believe is incorrect.
- Bisection protocol: The challenger and the sequencer (or the entity that posted the state root) engage in an interactive bisection game. They repeatedly narrow down the disagreement to a single computational step.
- On-chain execution: The single disputed step is executed on the L1, which determines the correct result.
- Resolution: If the fraud proof is valid (the posted state was incorrect), the invalid state root is reverted, and the party who posted it loses their bond. The challenger receives a portion of the bond as a reward.
This bisection approach is essential for efficiency. Re-executing an entire batch of transactions on L1 would be prohibitively expensive. By narrowing the dispute to a single step, the on-chain verification cost is minimal.
The 7-Day Challenge Period
The 7-day window is a conservative choice that accounts for several real-world constraints:
- L1 censorship resistance: A challenger must be able to submit their fraud proof to Ethereum within the window. 7 days provides buffer against temporary L1 congestion or sequencer censorship attempts.
- Monitoring reliability: Honest verifiers need time to detect, analyze, and respond to invalid state assertions.
- Social layer: In extreme scenarios (e.g., a sophisticated attack), the community may need time to coordinate a response.
The 7-day challenge period is the primary user-experience tradeoff of optimistic rollups. It means that native withdrawals from an optimistic rollup to L1 take 7 days. This delay applies only to L1 withdrawals—transactions within the rollup confirm in seconds. Third-party liquidity providers offer "fast withdrawal" services that front the funds for a fee, effectively bridging the delay for users willing to pay.
Sequencers
The sequencer is the entity responsible for ordering transactions, executing them, and posting batches to the L1. In current optimistic rollup implementations, the sequencer is a centralized operator run by the rollup team.
Sequencer Responsibilities
- Receive user transactions and order them (determining which transactions are included and in what order)
- Execute transactions and compute state updates
- Compress and batch transactions for L1 posting
- Post state root assertions to the L1 rollup contract
- Provide "soft confirmations" to users (pre-L1 settlement confirmations)
Centralization Risk and Mitigation
Centralized sequencers introduce risks:
- Censorship: The sequencer can refuse to include specific transactions.
- MEV extraction: The sequencer can reorder transactions for profit (front-running, sandwich attacks).
- Liveness: If the sequencer goes offline, the rollup halts (though users can force-include transactions via L1).
Both Arbitrum and Optimism have roadmaps toward decentralized sequencing. Additionally, "force inclusion" mechanisms allow users to submit transactions directly to the L1 rollup contract, bypassing the sequencer. This guarantees that even a censoring sequencer cannot permanently prevent a user's transaction from being included.
Data Availability on L1
Optimistic rollups post full transaction data to Ethereum, ensuring that anyone can independently reconstruct the rollup state. This is critical for two reasons:
- Fraud proof construction: Verifiers need the transaction data to detect invalid state roots and construct fraud proofs.
- User fund recovery: If the sequencer and all infrastructure operators disappear, users can reconstruct the state from L1 data and withdraw their funds through the L1 contract.
Before EIP-4844, rollups posted data as L1 calldata, which was expensive. After the Dencun upgrade (March 2024), rollups can post data as blobs—dedicated, cheaper data space that reduced rollup transaction costs by approximately 10–100x.
Arbitrum and Optimism: Implementation Details
Arbitrum
Developed by Offchain Labs, Arbitrum is the largest optimistic rollup by total value locked (TVL). Its key architectural features include:
- Nitro: Arbitrum's execution engine compiles smart contracts to WebAssembly (WASM) for execution, with fraud proofs also verified via WASM execution on the L1.
- Stylus: Enables smart contract development in Rust, C, and C++ in addition to Solidity, expanding the developer base beyond EVM-native languages.
- AnyTrust: A variant (used by Arbitrum Nova) that uses a Data Availability Committee (DAC) instead of posting all data to L1, further reducing costs for gaming and social applications.
- Arbitrum Orbit: Framework for launching application-specific L3 chains that settle on Arbitrum.
Optimism
Developed by OP Labs, Optimism pioneered the optimistic rollup concept and now powers a broader ecosystem through the OP Stack:
- OP Stack: An open-source, modular framework for building optimistic rollups. Used by Coinbase's Base, Worldcoin's World Chain, and numerous other chains.
- Superchain vision: A network of interoperable OP Stack chains that share bridging, sequencing, and governance infrastructure.
- Cannon: Optimism's fraud proof system, using a MIPS-based virtual machine for on-chain dispute resolution.
- Retroactive Public Goods Funding (RetroPGF): A novel governance mechanism that allocates revenue to projects that have demonstrated public value.
EVM Compatibility
Both Arbitrum and Optimism are EVM-compatible, meaning existing Ethereum smart contracts and tooling work with minimal or no modifications. This is a significant advantage over ZK-rollups, some of which require specialized languages or have incomplete EVM support.
Arbitrum achieves this through the Arbitrum Virtual Machine (which is EVM-equivalent at the bytecode level), while Optimism's Bedrock upgrade achieved near-perfect EVM equivalence, matching Ethereum's execution semantics as closely as possible.
Gas Savings
Optimistic rollups achieve gas savings through two mechanisms:
- Execution cost amortization: Computation is performed off-chain by the sequencer. The L1 cost is limited to data posting.
- Data compression: Transaction data is compressed before posting to the L1. Techniques include zero-byte compression, signature aggregation, and state diff compression.
Post-EIP-4844, typical transaction costs on major optimistic rollups range from $0.001 to $0.10, compared to $1–$50+ on Ethereum L1 for equivalent operations.
Key Takeaways
- Optimistic rollups assume transaction validity by default and use fraud proofs to catch invalid state transitions.
- The 7-day challenge period is the core security mechanism—it ensures sufficient time for honest verifiers to detect and prove fraud.
- Centralized sequencers are the current norm but introduce censorship and MEV risks. Force inclusion via L1 provides a safety valve.
- Full transaction data is posted to L1, enabling state reconstruction and fund recovery even if all rollup infrastructure fails.
- Arbitrum and Optimism are the leading implementations, both offering full EVM compatibility and evolving toward decentralized sequencing.
- Post-EIP-4844, optimistic rollup transactions cost $0.001–$0.10, a 100–1000x reduction from Ethereum L1 costs.
- The primary UX tradeoff is the 7-day L1 withdrawal delay, mitigated by third-party fast bridge services.