🔨 Proof Construction: Build a Fraud Proof

Learn how challengers construct proofs of invalid state transitions

Understand how optimistic rollups stay secure

🔨 Building Fraud Proofs

Constructing a fraud proof requires assembling specific components that demonstrate the sequencer's state transition was invalid. Let's build a fraud proof step by step.

🧩 Interactive Proof Builder

Click on components below to add them to your fraud proof. A valid proof requires all essential elements. Can you construct a complete fraud proof?

Your Fraud Proof Assembly:

No components selected yet. Click components above to add them.

🔬 How L1 Verifies Fraud Proofs

1️⃣

Load Pre-State

L1 contract loads the state root before the disputed transaction. This is the starting point for verification.

2️⃣

Re-execute Transaction

The L1 contract re-runs the exact transaction using the pre-state. This is computationally expensive but necessary for security.

3️⃣

Compare Post-States

L1 compares the computed post-state with what the sequencer claimed. If they differ, the fraud is proven.

4️⃣

Execute Penalty

If fraud is confirmed, the sequencer's bond is slashed. Part goes to the challenger as reward, rest may be burned.

🎯 Required Components

  • Pre-State Root: Starting point for verification
  • Transaction Data: The disputed transaction
  • Claimed Post-State: What sequencer said
  • Correct Post-State: What it should be

➕ Optional Components

  • Merkle Proofs: Cryptographic state inclusion
  • Witness Data: Additional verification context
  • Storage Proofs: Account state evidence
  • Code: Smart contract bytecode if needed

⚡ Gas Costs & Optimization

Submitting a fraud proof to L1 is expensive. Costs typically range from 200K-500K gas depending on complexity:

Cost Breakdown:
  • • Base submission: ~50K gas
  • • State loading: ~100K gas
  • • Re-execution: ~150K+ gas
  • • Merkle verification: ~50K gas
Optimization Techniques:
  • • Bisection protocols (split disputes)
  • • Minimal witness data
  • • Batched challenges
  • • Off-chain coordination
Challenge System