BLOCKCHAIN & WEB3 FUNDAMENTALS - Chapter 9, Exercise 3 Solution ========================================================== Optimistic Rollups vs. ZK Rollups: How Each Proves Correctness PROBLEM ------- Compare optimistic rollups and ZK rollups on exactly one dimension: how each one actually proves a batch of transactions was processed correctly, and what real cost each approach accepts in exchange for its own method. SOLUTION -------- OPTIMISTIC ROLLUPS These don't actually prove correctness up front at all - they assume a posted batch of transactions is valid by default, purely on trust, and only actually re-run the underlying computation if someone specifically raises a challenge during a fixed dispute window after the batch is posted. If nobody challenges it within that window, the batch is simply treated as final and correct. Real cost accepted: because anyone might still raise a valid challenge until the dispute window closes, funds can't be considered fully final and safely withdrawable back to Layer 1 until that whole window has passed - a real, meaningful delay for anyone wanting to withdraw funds out of the rollup. ZK (ZERO-KNOWLEDGE) ROLLUPS These take the opposite approach: correctness is mathematically proven up front, before the batch is even accepted. The rollup computes the results off-chain, then generates a real cryptographic proof that the computation was carried out correctly, and submits that proof to Layer 1, where it's verified mathematically - without needing anyone to re-execute the individual transactions themselves to check it, and without needing any waiting period for a challenge that will never come, since correctness was already proven rather than merely assumed. Real cost accepted: generating and verifying these cryptographic proofs is a genuinely more complex piece of engineering to build and get right than optimistic rollups' own "assume it's fine unless someone objects" approach - it's a real complexity cost paid up front, in exchange for avoiding optimistic rollups' own withdrawal-delay cost later. ANSWER: Optimistic rollups prove correctness reactively - assuming validity by default and only checking if challenged - at the cost of a withdrawal delay while the challenge window stays open. ZK rollups prove correctness proactively, via a real cryptographic proof submitted up front, avoiding that delay but at the cost of significantly more complex cryptography to implement correctly. ---- WHY THIS WORKS AS AN ANSWER This isolates the single requested dimension (how each proves correctness) rather than restating the general rollup concept, and correctly pairs each method's own real mechanism with its own specific, real trade-off rather than a vague "one is better" comparison.