Optimistic Rollups: Scaling Ethereum with Fraud Proofs
Optimistic rollups are layer-2 scaling solutions that assume transactions are valid by default (optimistic) and use fraud proofs to challenge invalid transactions. They offer EVM compatibility and lower costs than ZK-rollups.
Optimistic Rollups: Scaling Ethereum with Fraud Proofs
Optimistic rollups are layer-2 scaling solutions that assume transactions are valid by default (optimistic) and use fraud proofs to challenge invalid transactions. Unlike ZK-rollups which generate cryptographic validity proofs for every batch, optimistic rollups post transaction data to Ethereum and allow a challenge period during which anyone can submit a fraud proof to invalidate fraudulent transactions. They offer near-full EVM compatibility, making it easy for existing Ethereum applications to migrate. Optimistic rollups power major projects like Arbitrum, Optimism, and Base, handling billions in TVL and thousands of transactions per second.
To understand optimistic rollups properly, it helps to be familiar with ZK-rollups, Ethereum fundamentals, and fraud proof mechanisms.
┌─────────────────────────────────────────────────────────────────────────┐
│ Optimistic Rollup Architecture │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ Users ──→ Rollup Sequencer (off-chain) │
│ │ │
│ ▼ │
│ Batch of transactions │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ Ethereum L1 │ │
│ │ ┌─────────────────────────────────────────────────────────────┐│ │
│ │ │ Rollup Contract ││ │
│ │ │ • Stores transaction data (calldata) ││ │
│ │ │ • Updates state root ││ │
│ │ │ • Challenge period (7 days) ││ │
│ │ │ • Fraud proof verification ││ │
│ │ └─────────────────────────────────────────────────────────────┘│ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ Withdrawal Process (7-day challenge period): │
│ • User initiates withdrawal │
│ • Wait challenge period (7 days) │
│ • Anyone can submit fraud proof if invalid │
│ • After period, withdrawal finalized │
│ │
│ Key Features: │
│ • Fraud proofs (optimistic assumption) │
│ • EVM compatibility (near-identical to Ethereum) │
│ • Low fees (batching) │
│ • 7-day withdrawal delay (security trade-off) │
│ │
└─────────────────────────────────────────────────────────────────────────┘
What Are Optimistic Rollups?
Optimistic rollups are layer-2 scaling solutions that execute transactions off-chain and post compressed transaction data to Ethereum. The term optimistic refers to the assumption that all transactions are valid by default; no validity proof is provided. Instead, a challenge period (typically 7 days) allows anyone to submit a fraud proof demonstrating that a specific transaction batch is invalid. If a fraud proof is accepted, the batch is reverted, and the sequencer is penalized. This mechanism ensures security while achieving high throughput and EVM compatibility.
- Optimistic Assumption: Transactions are valid unless proven otherwise. Most users are honest; fraud proofs handle malicious cases.
- Fraud Proofs: Cryptographic proof that a specific state transition is invalid (executed incorrectly). Anyone can submit challenge during window.
- Challenge Period: Window (7 days) during which fraud proofs can be submitted. Must be long enough to allow verification, short enough for UX.
- Data Availability: All transaction data posted to Ethereum L1 (calldata). Enables reconstruction of rollup state and fraud proof generation.
- EVM Compatibility: Optimism and Arbitrum are near-fully EVM compatible (same bytecode, Solidity, tools).
Why Optimistic Rollups Matter
Optimistic rollups offer the best EVM compatibility among scaling solutions, enabling easy migration for existing Ethereum dApps.
- EVM Compatibility (Easiest Migration): Arbitrum and Optimism support unmodified Solidity contracts. Same development tools (Hardhat, Foundry). No need to learn new language (unlike Cairo for StarkNet).
- Low Fees: Transaction fees 10-100x lower than Ethereum L1. Batching amortizes L1 costs across many users.
- Security (Inherits Ethereum): Data posted on Ethereum (no off-chain data availability). Fraud proofs ensure correctness (economic incentives). Security relies on at least one honest validator.
- Proven Track Record: Arbitrum and Optimism process billions in TVL. Many major DeFi protocols deployed (Uniswap, Aave, Curve).
Aspect Optimistic Rollups ZK-Rollups
─────────────────────────────────────────────────────────────────────────────
Validity Proof Fraud proof (challenge) Validity proof (ZK)
Withdrawal Delay 7 days (challenge window) Minutes (proof finality)
EVM Compatibility Near-full Growing (zkEVM)
Gas Cost Low Very low
Security Assumption Economic (1 honest validator) Cryptographic (ZK proof)
Implementation Simpler (EVM reuse) Complex (ZK circuits)
Examples Arbitrum, Optimism zkSync, StarkNet, Polygon zkEVM
How Optimistic Rollups Work
1. User deposits funds to rollup contract (L1)
────────────────────────────────────────────────────────────────────────
User sends ETH/tokens to L1 bridge contract.
Deposit recorded in rollup state.
2. Sequencer batches transactions
────────────────────────────────────────────────────────────────────────
Sequencer collects user transactions (off-chain).
Executes state transition (updates balances).
Compresses transaction data (calldata).
3. Submit batch to L1 rollup contract
────────────────────────────────────────────────────────────────────────
Sequencer posts:
- Compressed transaction data (calldata)
- New state root (post-execution)
Contract stores data, starts challenge timer.
4. Challenge period (7 days)
────────────────────────────────────────────────────────────────────────
Anyone can submit fraud proof:
- Identify invalid state transition
- Execute step on L1 to prove invalid
If successful, batch reverted, sequencer penalized.
5. Finalize state (after challenge period)
────────────────────────────────────────────────────────────────────────
If no valid fraud proof submitted, batch finalizes.
Withdrawals become available.
6. User withdraws funds
────────────────────────────────────────────────────────────────────────
User proves ownership (Merkle proof).
Contract sends funds after challenge period.
Assertion: Sequencer claims state transition S → S' is correct.
Challenger claims: Transition is invalid.
Challenge process (interactive bisection):
1. Challenger points to specific instruction within batch.
2. Sequencer and challenger narrow down to single step (binary search).
3. Single step execution on L1 (EVM verifies correct output).
4. If mismatch found: sequencer's batch invalidated.
Types:
• Optimism: Single-step fraud proof (on L1)
• Arbitrum: Multi-step, interactive (more gas efficient)
After fraud proof success:
• Batch reverted (state rollback)
• Sequencer bond slashed
• Challenger rewarded
Major Optimistic Rollup Projects
| Project | Fraud Proof Type | EVM Compatibility | TVL (approx) |
|---|---|---|---|
| Arbitrum | Multi-step (interactive) | Full EVM (Arbitrum One) | $3B+ |
| Optimism | Single-step (Cannon) | Full EVM (OP Mainnet) | $1B+ |
| Base | Optimism's OP Stack | Full EVM | $300M+ | Metis | Optimistic | Full EVM | $100M+ |
Optimistic Rollup Economics
Cost structure: L1 calldata (post transaction data) + L1 verification (fraud proof rarely executed). Most transaction cost is calldata storage on Ethereum.
Batch submission cost (~500k gas on L1):
• Calldata (compressed transactions): ~400k gas
• Contract overhead: ~100k gas
Total: ~500k gas per batch
If batch contains 1000 transactions:
Cost per transaction = 500k / 1000 = 500 gas
At 50 gwei gas price: 0.000025 ETH per tx ≈ $0.05
Comparative (L1 Ethereum):
Single transaction: 21,000 gas → ~$2-5
Optimistic rollup: ~$0.05
Challenge gas cost (rare):
• Fraud proof executed ~1M gas
• Only if sequencer malicious (rare event)
Sequencer revenue:
• User transaction fees (excess over L1 cost)
• MEV (Maximum Extractable Value) from ordering
Sequencer bond:
• Sequencer must post bond (collateral)
• Slashed if fraud proof successful
• Incentive for honesty
Validator incentives:
• Challenge reward (portion of slashed bond)
• Gas reimbursement for fraud proof execution
Optimistic Rollup Anti-Patterns
- Assuming Withdrawals Are Fast (7-Day Delay): Withdrawals require challenge window (7 days). Not suitable for high-frequency trading, arbitrage bots, instant bridges. Use liquidity bridges (Hop, Across) for faster withdrawals (but pay fee).
- Not Running Validator (Fraud Watcher): Fraud proofs rely on at least one honest watcher (validators). If no one watches, sequencer could steal funds. Run validation node for security-conscious users.
- Ignoring Data Availability Constraints: Calldata cost dominates transaction fees. Compress data aggressively (state diffs, not full transactions). Use batching of many transactions per L1 submission.
- Deploying Without Rate Limits (High L1 Cost): Unbounded calldata per block exceeds L1 block gas limit. Implement transaction rate limiting, dynamic batching, and circuit breakers.
For Users:
□ Understand 7-day withdrawal delay
□ Use liquidity bridges for fast exits (pay fee)
□ Monitor rollup status (downtime, challenges)
For Developers:
□ Deploy unmodified Solidity contracts (works on Arbitrum/Optimism)
□ Test with local node (Anvil + Arbitrum fork)
□ Set appropriate gas limits (L2 gas lower)
For Validators:
□ Run fraud proof watcher (optimism, arbitrum)
□ Monitor challenge period for suspicious batches
□ Submit proofs if invalid state transition
Optimistic Rollup Best Practices
- Use Liquidity Bridges for Fast Withdrawals: Hop, Across, Connext provide fast exits (pay small fee). Bridge provider assumes risk (bonds, insurance). Acceptable for most users.
- Compress Transaction Data (Reduce Calldata): Use state diffs instead of full transaction logs, batch many transactions per submission, compress signatures.
- Implement Governance for Upgrades: Optimistic rollups can be upgraded (multi-sig, DAO). Ensure secure upgrade path (timelocks, multi-sig).
- Monitor Sequencer Health: Liveness, block production latency, and transaction inclusion time. Detect sequencer censorship.
Rollup EVM Compat Solidity Withdrawals Maturity
─────────────────────────────────────────────────────────────────────────────
Arbitrum Full Yes 7 days High
Optimism Full Yes 7 days High
Base Full Yes 7 days Growing
zkSync Era Partial Yes Minutes Growing
StarkNet No (Cairo) No (need rewrite) Minutes Growing
Polygon zkEVM Full Yes Minutes Growing
Decision:
• Need EVM compatibility, low dev effort → Optimistic rollup
• Need fast withdrawals, very low fees → ZK-rollup
• Post-quantum security → StarkNet
Frequently Asked Questions
- Why is the withdrawal delay 7 days?
Challenge period allows enough time for anyone to verify fraud proofs. 7 days ensures global participation (weekends, different time zones). Shorter window (1 day) may allow malicious sequencer to escape detection. Trade-off: security vs user experience. - Can optimistic rollups be hacked?
Security relies on at least one honest validator watching for fraud. If no one watches, sequencer could steal funds (attack known as "liveness failure"). Economic incentives ensure validators exist (slashing, rewards). No cryptographic proof of correctness (unlike ZK-rollups). - What is the difference between Arbitrum and Optimism?
Similar EVM compatibility, both use fraud proofs. Arbitrum uses multi-step interactive fraud proof (more gas efficient). Optimism uses single-step (simpler). Arbitrum has higher TVL, Optimism has OP Stack (layer-2 framework). - How do I get funds out quickly from optimistic rollup?
Use liquidity bridges (Hop, Across). Bridge gives you funds immediately on L1 (takes risk). Bridge provider earns fees (0.1-0.5 percent). Alternative: wait 7 days for direct withdrawal. - Are optimistic rollups more centralized than ZK-rollups?
Both have trade-offs. Optimistic rollups currently have centralized sequencers (like most ZK-rollups). Decentralized sequencers in development for both. Fraud proofs require watchtowers (can be decentralized). - What should I learn next after optimistic rollups?
After mastering optimistic rollups, explore Arbitrum architecture and Nitro, OP Stack (Optimism's rollup framework), fraud proof mechanics (Cannon, Arbitrum), bridge security (liquidity, canonical), and ZK-rollups for comparison.
