๐ ZK Rollups: Prove Valid Before Accepting
Understand how zkSync and StarkNet use mathematical proofs
Compare the two dominant rollup approaches
Your Progress
0 / 5 completed๐ ZK Rollups Deep Dive
Zero-Knowledge rollups take the opposite approach: prove every transaction is valid upfront using cryptographic proofs. No trust requiredโjust math.
โ๏ธ How It Works
Batch Transactions
Sequencer collects thousands of L2 transactions into a single batch for efficient proving.
Generate Validity Proof
Prover runs ZK circuit to create cryptographic proof that all transactions are valid (computationally expensive).
Verify on L1
L1 smart contract verifies proof in milliseconds (very cheap, ~500K gas). Proof guarantees correctness.
Instant Finality
Once verified, state is immediately final. No challenge period. Withdrawals available instantly.
๐ฎ Interactive Validity Proof Simulator
Watch how ZK rollups use cryptographic proofs to guarantee transaction validity without re-executing.
1. Collect Transactions
Sequencer batches thousands of L2 transactions
Batch #5678: 10,000 transactions collected. Old state root: 0xabc...def. Ready for proving.
๐ฌ Types of ZK Proofs
ZK-SNARKs
Succinct Non-Interactive Arguments of Knowledge
ZK-STARKs
Scalable Transparent Arguments of Knowledge
๐ก๏ธ Security Model
โ Advantages
- โขInstant finality: No 7-day wait, withdraw immediately
- โขStronger security: Math proves correctness, no trust needed
- โขPrivacy potential: Can hide transaction details in proof
- โขLower data costs: Only proof needed, not full tx data
โ ๏ธ Trade-offs
- โขExpensive proving: Costs $50-200+ per batch to generate proof
- โขSlower execution: Proof generation takes 5-30 minutes
- โขComplex cryptography: Harder to implement and audit
- โขEVM challenges: Full EVM equivalence is technically difficult
๐ Real-World Implementations
zkSync Era
Matter Labs' ZK rollup ($500M+ TVL)
StarkNet
StarkWare's ZK rollup with Cairo VM
Polygon zkEVM
True EVM equivalence with ZK