Допоможіть перекласти цю сторінку

🌏

Ця сторінка відображається англійською мовою, оскільки ми ще не переклали її. Допоможіть нам у цьому.

Це не помилка!🐛

Ця сторінка не перекладається. Ми навмисно поки що залишили її англійською.

Optimistic Rollups

Остання зміна: , Invalid DateTime
Змінити сторінку

Prerequisites

You should have a good understanding of all the foundational topics and a high-level understanding of Ethereum scaling. Implementing scaling solutions such as rollups is an advanced topic as the technology is less battle-tested and continues to be researched and developed.

Looking for a more beginner-friendly resource? See our introduction to layer 2.

Optimistic rollups

Optimistic rollups sit in parallel to the main Ethereum chain on layer 2. They can offer improvements in scalability because they don't do any computation by default. Instead, after a transaction, they propose the new state to Mainnet or "notarise" the transaction.

With Optimistic rollups, transactions are written to the main Ethereum chain as calldata, optimising them further by reducing the gas cost.

As computation is the slow, expensive part of using Ethereum, Optimistic rollups can offer up to 10-100x improvements in scalability dependent on the transaction. This number will increase even more with the introduction of shard chains as more data will be available if a transaction is disputed.

Disputing transactions

Optimistic rollups don't compute the transaction, so there needs to be a mechanism to ensure transactions are legitimate and not fraudulent. This is where fraud proofs come in. If someone notices a fraudulent transaction, the rollup will execute a fraud-proof and run the transaction's computation, using the available state data. This means you may have longer wait times for transaction confirmation than a ZK-rollup because the transaction could get challenged.

Diagram showing what happens when a fraudulent transaction occurs in an Optimistic rollup in Ethereum

The gas you need to run the computation of the fraud proof is even reimbursed. Ben Jones from Optimism describes the bonding system in place:

"anyone who might be able to take an action that you would have to prove fraudulent to secure your funds requires that you post a bond. You basically take some ETH and lock it up and you say "Hey, I promise to tell the truth"... If I don't tell the truth and fraud is proven, this money will be slashed. Not only does some of this money get slashed but some of it will pay for the gas that people spent doing the fraud proof"

So you can see the incentives: participants get penalized for conducting fraud and reimbursed for proving fraud.

Pros and cons

ProsCons
Anything you can do on Ethereum layer 1, you can do with Optimistic rollups as it's EVM and Solidity compatible.Long wait times for on-chain transaction due to potential fraud challenges.
All transaction data is stored on the layer 1 chain, meaning it's secure and decentralized.An operator can influence transaction ordering.

A visual explanation of optimistic rollups

Watch Finematics explain optimistic rollups:

Use Optimistic rollups

Multiple implementations of Optimistic rollups exist that you can integrate into your dapps:

Arbitrum One

* Fraud proofs only for whitelisted users, whitelist not open yet

Optimism

* Fault proofs in development

Boba Network

* State validation in development

Optimistic rollups reading

Was this article helpful?