0Pricing
Web3 & DApp Development Fundamentals · Leçon

Rollups

Optimistes et ZK

Rollups est une leçon Web3 & DApp Development Fundamentals gratuite sur CoddyKit. Ceci est la leçon 2 sur 4. Tu peux lire la leçon complète ci-dessous gratuitement — puis la pratiquer en direct dans le navigateur avec un éditeur de code intégré et un tuteur IA 24/7. Elle fait partie du parcours d'apprentissage Web3 & DApp Development Fundamentals, et ta progression se synchronise sur le web et l'application CoddyKit. Le cours Web3 & DApp Development Fundamentals comprend 4 leçons au total.

Certaines parties de cette leçon n'ont pas encore été traduites et s'affichent en anglais.

What Is a Rollup?

A rollup executes transactions on a Layer 2 and posts the transaction data (and a state commitment) back to Layer 1.

The L1 stores enough information to reconstruct and verify the L2 state, which is what gives rollups their security.

Two Main Types

There are two dominant rollup families:

  • Optimistic Rollups — assume transactions are valid, allow challenges
  • ZK Rollups — prove validity with cryptographic proofs

They differ in how they convince L1 the L2 state is correct.

Optimistic Rollups

Optimistic rollups assume every batch is valid by default — hence optimistic.

They post the new state to L1 without proving it immediately, relying on the threat of fraud proofs to keep operators honest.

Fraud Proofs and the Challenge Window

After a batch is posted, a challenge window (often ~7 days) opens. Anyone can submit a fraud proof showing the batch was invalid.

If a valid challenge succeeds, the bad batch is reverted and the dishonest operator is penalized.

post batch -> 7-day challenge window
  no valid challenge -> finalized
  valid fraud proof  -> batch reverted

Withdrawal Delays

The challenge window means withdrawing from an optimistic rollup back to L1 takes time (often a week).

Liquidity providers offer instant withdrawals for a fee by fronting the funds during the wait.

ZK Rollups

ZK rollups generate a cryptographic validity proof (a zero-knowledge proof) for each batch.

L1 verifies the proof mathematically, so there is no need to trust the operator or wait for a challenge period.

Validity Proofs

A validity proof (such as a SNARK or STARK) demonstrates that the new state was computed correctly from the old state and the transactions.

If the proof verifies, the state is definitively correct — no challenges needed.

proof = prove(oldState, txs, newState)
L1.verify(proof) == true
-> newState accepted instantly

Faster Finality on ZK

Because ZK proofs are verified immediately, ZK rollups offer fast finality and quick withdrawals.

The trade-off is that generating proofs is computationally expensive and historically harder for general smart contracts.

Optimistic vs ZK Trade-offs

Comparing the two:

  • Optimistic: EVM-compatible, cheaper proving, slow withdrawals
  • ZK: instant finality, fast withdrawals, complex proving

Both post data to L1, so both inherit Ethereum security.

Data Availability

Rollups must publish transaction data so anyone can reconstruct the state — this is data availability.

Posting data to L1 (calldata or blobs) is a major cost; innovations like EIP-4844 blobs made it much cheaper.

Putting It Together

Rollups execute off-chain and settle on L1. Optimistic rollups assume validity and use fraud proofs; ZK rollups prove validity cryptographically. Data availability anchors their security.

Next we look at moving assets between layers with bridges.

Quick Check

Test your rollup knowledge.

Recap: Rollups

You learned that:

  • Rollups execute off-chain and settle data on L1
  • Optimistic rollups use fraud proofs + a challenge window
  • ZK rollups use validity proofs for instant finality
  • Data availability on L1 anchors security

Next: bridging assets between layers.

Questions Fréquemment Posées

La leçon « Rollups » est-elle gratuite ?

Oui — le texte complet de « Rollups » est gratuit à lire ici sur le web. Pour la pratiquer de manière interactive (un éditeur de code intégré et un tuteur IA 24/7) et déverrouiller le reste du cours Web3 & DApp Development Fundamentals, passe à CoddyKit PRO. Le cours Web3 & DApp Development Fundamentals comprend 4 leçons au total.

Qu'est-ce que j'apprendrai dans « Rollups » ?

Optimistes et ZK Tu pratiques Web3 & DApp Development Fundamentals avec du code pratique que tu exécutes directement dans le navigateur, et un tuteur IA 24/7 répond à tes questions au fur et à mesure que tu avances dans la leçon.

Dois-je avoir de l'expérience pour commencer Web3 & DApp Development Fundamentals ?

Aucune expérience préalable n'est requise. Web3 & DApp Development Fundamentals sur CoddyKit est structuré pour les débutants jusqu'aux apprenants avancés, donc tu peux commencer ici ou depuis le début et avancer à ton rythme. Ceci est la leçon 2 sur 4.

Combien de temps prend la leçon « Rollups » ?

La plupart des leçons CoddyKit prennent environ 5–10 minutes. Chacune est courte et interactive, tu progresses régulièrement et tu repiques exactement où tu t'es arrêté sur le web et l'app.

Peux-tu écrire et exécuter du code dans cette leçon Web3 & DApp Development Fundamentals ?

Oui. Chaque leçon Web3 & DApp Development Fundamentals inclut un éditeur de code intégré, tu écris et exécutes du vrai code directement dans ton navigateur et tu reçois des retours IA instantanés — aucune configuration locale requise.

Toutes les leçons de ce cours

  1. Pourquoi la couche 2
  2. Rollups
  3. Transférer des actifs entre chaînes
  4. Choisir une couche 2
← Retour à Web3 & DApp Development Fundamentals