# Does Optimistic Rollups have the same Finality as ZK Rollups

By [Fieldlnwza007](https://paragraph.com/@fieldlnwza007) · 2024-02-02

---

Introduction
------------

You might have heard

*   Some say that optimistic rollups (ORU) have the same finality as ZK rollups (ZKRU).
    
*   Some also say ORU has a 7-day finality, but ZKRU has an instant finality.
    

You might get confused, right? Today, I’m going to answer your question—which one is correct and which one is wrong—in detail.

A very brief introduction to how ORU works?
-------------------------------------------

There are three core components that are relevant to an ORU:

*   Users: Users are the ones who use ORU to do transactions. They interact with layer 2 by creating transactions, signing them, and sending them to a sequencer to operate.
    
*   Sequencer: A sequencer is an entity that maintains layer 2. Sequencers can consist of one or more entities, but normally, in traditional layer 2, only one sequencer is in charge of the maintenance. The sequencer runs layer 2 logics, and when a user submits a transaction to it, it then updates the state of layer 2 according to the user transaction. The sequencer periodically sends these transactions to the L1 smart contract to update the state of L2 on L1.
    
*   The ORU smart contract on L1: The core smart contracts on L1 that decide the state of ORU are
    
    1.  Canonical Transaction Chain (CTC): CTC maintains a list of transactions, and it is an append-only contract. This means that the transactions or data stored in this contract cannot be updated or changed.
        
    2.  State Commitment Chain (SCC): SCC maintains a list of state roots, where each state root corresponds to each transaction in CTC. Unlike CTC, SCC can be updated. To be precise, it can be rolled back in the event that a state root is proved incorrect. This is why ORU needs to introduce a challenge time window.
        

![This image shows the relation of CTC and SCC in Optimism.](https://storage.googleapis.com/papyrus_images/1b14c69998e4c3aa56643ef09696c2922daf17dc1df4a846eb9d8f7433ceba37.jpg)

This image shows the relation of CTC and SCC in Optimism.

You might wonder if SCC can only be rolled back, then what if a malicious actor puts invalid transactions into CTC? One can handle this by letting the logic of L2 output the same state root if it finds an invalid transaction. For example, we have $$tx\_1$$, $$tx\_2$$, and $$tx\_3$$. Assume that before executing $$tx\_1$$, the chain state root is $$S\_0$$, and let $$S\_1$$ be the result of applying $$tx\_1$$ to $$S\_0$$, $$S\_2$$ from applying $$tx\_2$$ to $$S\_1$$, and $$S\_3$$ from applying $$tx\_3$$ to $$S\_2$$. Here, if all transactions are valid, we will have $$S\_0 \\to S\_1 \\to S\_2 \\to S\_3$$. But if $$tx\_2$$ is valid, then we have $$S\_0 \\to S\_1 \\to S\_1 \\to S’\_2$$, where $$S\_2’$$ is the result from applying $$tx\_3$$ to $$S\_1$$.

So what if a malicious actor makes an invalid transaction valid by updating the state root? In this case, an honest actor is needed to watch over SCC and ensure that state roots appearing in SCC are indeed the result of applying transactions according to the protocol rules. If an invalid state root is found, an honest watcher can send a proof on L1 to challenge the state root in SCC. If the challenged state root is indeed incorrect, the state root is rolled back, and if an honest actor can add newly corrected state roots, then the staked asset of the one who posted this state root is slashed. This is why a challenge window is needed.

Here, even though state roots on L1 get rolled back, layer 2 users won't be affected as their order of transactions cannot be changed and is immediately finalized when it is posted on CTC. Any honest sequencer can execute transactions on CTC and reach the same final state. So here is why ORU has the same finality as ZKRU, but the finality here is “the finality of the order of transactions." On the other hand, a state root needs to be waited for before being used on layer 1, and here ZKRU has instant finality on this, but ORU has to wait for the end of the challenge time window. So here, ZKRU has faster “settlement finality” than ORU.

---

*Originally published on [Fieldlnwza007](https://paragraph.com/@fieldlnwza007/does-optimistic-rollups-have-the-same-finality-as-zk-rollups)*
