Skip to content

Commit

Permalink
Add rollup card
Browse files Browse the repository at this point in the history
  • Loading branch information
boundless-forest committed Nov 28, 2024
1 parent 5182bf4 commit 10cf78a
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions cards/Rollup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ Rollup is a scaling solution for Ethereum that bundles or "rolls up" multiple tr

## Types of Rollup

There are two main popular types of rollup solution: Optimistic rollup and ZK rollup. They differ in how they handle transaction verification and data availability.
There are two main types of rollup solutions: Optimistic Rollup and ZK Rollup. They differ in how they handle off-chain transactions execution verification.

### Optimistic rollup
### Optimistic Rollup

Optimistic rollup assumes that transactions are valid by default, the rollup transactions are executed once received and the execution result will be available in the rollup network. Then the rollup operator will bunch these transactions data regularly and submit them to the Ethereum mainnet as calldata or blobs. Optimistic rollup relies on a fraud-proving mechanism to detect the cases that transactions are not executed correctly. There is a time window called challenge period for users to submit fraud proofs to challenge the incorrect rollup transactions.
Optimistic Rollup assumes that transactions are valid by default. The rollup transactions are executed once received, and the execution result is available in the rollup network. The rollup operator then batches these transaction data regularly and submits them to the Ethereum mainnet as calldata or blobs. Optimistic Rollup relies on a fraud-proving mechanism to detect incorrect transactions. There is a challenge period during which users can submit fraud proofs to challenge incorrect rollup transactions. If the fraud proof is valid, the rollup network re-executes the transactions and updates the rollup's state accordingly, penalizing the malicious operator. If no fraud proof is submitted during the challenge period, the rollup transactions are considered valid, and the state change is accepted by Ethereum. See [Optimistic Rollups](https://ethereum.org/en/developers/docs/scaling/optimistic-rollups/) for more details.

### ZK rollup
### ZK Rollup

### Optimistic rollup vs ZK rollup
ZK Rollup relies on validity proofs to verify that changes in the rollup network follow the rules. The validity proof is a succinct cryptographic commitment based on the Merkle root of the state tree that proves the correctness of the batched rollup transactions. It is generated by the rollup operator and submitted to the Ethereum mainnet. The smart contract on Ethereum verifies the validity proof and updates the state of the rollup network. Unlike Optimistic Rollup, ZK Rollup does not require all the batched transaction data to re-execute the transactions for verification. Therefore, ZK Rollup does not need to publish much transaction data on-chain for validation. However, storing transaction data on-chain is still important for the permissionless and decentralized nature of rollup operators. See [ZK Rollups](https://ethereum.org/en/developers/docs/scaling/zk-rollups/) for more details.

## Optimistic rollup vs ZK rollup

| Criteria | Optimistic Rollup | ZK Rollup |
| :---: | --- | --- |
| Costs | The major cost comes from submitting batches to the Ethereum | The major cost comes from generating zk proof |
| Ethereum Compatibility | It has highest smart contract compatiblity with Ethereum, support any contracts without modification| The smart contract compatiblity is not so good, require the developers to change or rewrite the contracts with dedicated tools |
| Security | The security relies on the chain monitor within the challenge window | No monitor work, but zk-rollup requires a trusted setup assumeption |
| Latency | Has lower latency for the transaction confirmatioin, but higher latency for the finality(due to challenge mechanism) | Has higher latency for the transaction confirmation(due to zk proof generation), but lower latency for the finality |

0 comments on commit 10cf78a

Please sign in to comment.