## 3 Overview of Rollups
### Components and Workflow of Rollups  
An L2 rollup-based solution consists of multiple components that allow the execution of the transactions off-chain and then the posting of the result of the transaction execution on-chain. Respectively, Figures 1 and 2 illustrate the overall architecture of optimistic rollups and zero knowledge rollups. The nature of each of these components can depend on the specific implementation that is considered, but they can be summarized in the following categories:  
User--She/he initiates the transaction by sending a transaction request to a rollup sequencer. This step is similar to submitting a normal blockchain transaction but, in this case, the transaction is directed to a specific rollup protocol instead of an L1 solution.  
Sequencer--This is one of the most important components in rollups. The sequencer collects the transactions initiated by the user and sequences them in order. This is a critical step to mitigate the risk of fraudulent practices, such as a front-running attack in which a malicious actor can execute a transaction before other pending ones to take financial advantage. The sequencer ensures that all the transactions are processed in the correct order and error-free manner.  
Aggregator--This is another crucial rollup component. The aggregator receives the transactions from users, executes the transactions off-chain, and then rolls the results into a single batch. This last activity is where the name rollup is derived. The final step for the aggregator is to post the batched transactions and the resulting blockchain state as Merkle root to the smart contract deployed on the L1 main chain.  
On-chain Smart Contract--L2 solutions are based on the presence of a smart contract deployed on the L1 main net. Such a contract acts as a foundation for rollup activities carried out off-chain. In particular, it verifies and monitors the state transition performed off-chain by linking off-chain rollup executions and on-chain data integrity.  
Dispute Resolution (specific to Optimistic Rollups)--Unlike zk-rollups, optimistic rollups consider every transaction valid and do not submit the validity proofs on-chain, which is why it is called optimistic. Optimistic rollups define a challenge period in which anyone can challenge a transaction and create a dispute before finalizing the transactions on the main chain. In this case, a fraud proof is provided to the final user to demonstrate the correctness of the data posted on L1.  
Prover (specific to Zk-Rollups)--The prover component is specific to zk-rollups. It generates cryptographic proof using zk-SNARK or zk-STARK for off-chain computation. This proof is then posted on-chain to verify that the computation was performed correctly and the state transition followed the pre-defined rules without revealing the underlying data or the exact computational steps. The prover also stores the transaction data for availability on L1. Therefore, anyone can reconstruct the current state using transaction data and independently verify this state on-chain.  
Data Availability--Transaction data are critical for ensuring the integrity and security of rollups. These data are posted to the L1 blockchain, making them available and accessible to everyone. The data availability ensures that any participant can independently reconstruct and validate the current state of the rollup by accessing the data on the L1 blockchain. Different L2 rollup-based solutions can implement data availability differently, which will be discussed in more detail in Section 4.  
The following two subsections better detail the differences between optimistic and zk-rollups, discussing the different information stored in each case. A summarized comparison of zk-rollups and optimistic rollups is also presented in Table 2.