The expansion debate usually heats up in times of high network activity, such as the CryptoKitties boom in 2017, the DeFi summer 2020, or the crypto bull market in early 2021.
During these periods, the unprecedented demand for the Ethereum network has resulted in extremely high gas fees, making it expensive for everyday users to pay transaction fees. To solve this problem, finding the ultimate scaling solution has always been one of the top tasks of several teams and the entire Ethereum community.
Recently, roll-ups have become the latest go-to technology for scaling the Ethereum network. Many decentralized applications have switched or are planning to switch to a rollup solution shortly.
What are optimistic rollups and how can they help scale Ethereum? This article will cover that alongside the pros and cons of optimistic rollups.
What are Optimistic Rollups
Optimistic rollups are a layer 2 scaling solution. The Layer 2 solution is a network that removes some processing work from the main (or Layer 1) Ethereum chain to improve performance. It represents an off-chain aggregation of transactions within Ethereum smart contracts. It reduces fees and congestion by increasing the throughput of the blockchain from the current 15 tps to more than 1,000 tps. In smart contracts, users can securely conduct transactions to ensure that their transactions are not abused and that they are settled to the main chain at some point in the future. It only publishes enough data about the chain for any observer to reconstruct the state (the balance of the account) and determine the invalidity.
The goal of optimistic rollups is to decrease latency — the amount of time it takes to confirm a transaction, currently limited by Ethereum’s block time of about 13 seconds — and increase transaction throughput — the number of transactions that can be processed each second — thereby reducing gas fees.
The name Optimistic Rollups is derived from the way the solution works. “Optimistic” is used because the aggregator publishes only the minimum required information without evidence. It is assumed that the aggregator will not commit fraud while it is in operation and will only provide evidence in the event of fraud. ‘Rollups’ are used because transactions are committed to the main chain in bundles (that is, they are rolled-up).
How it Helps Ethereum Scale
Rollups solves the scalability problem by processing transactions outside the Ethereum blockchain and minimizes the congestion of Ethereum by reducing its load.
The aggregation takes place on the “side chain”, which regularly informs the main Ethereum blockchain about all transactions processed by it. This is what is known as “Layer 2” technology. Transactions are aggregated on the sidechain and then reinserted into the main blockchain, which is called “Layer 1” or “Base Layer” for short.
For those familiar with Bitcoin, these layers are like the difference between the Bitcoin blockchain and the Lightning Network, a layer 2 payments network that operates outside of the Bitcoin blockchain.
By transferring some of the responsibility for processing transactions to another chain, rollups reduce the burden on Ethereum.
Therefore, for the rollup to work, someone needs to monitor which transactions are being aggregated and share this information with the network. This means that those who rely on rollups must trust that the rollup will not affect their account or funds or change the information contained in the smart contract.
Similar to most Layer 2 solutions, the funds traded in Optimistic Rollups are stored in smart contracts on Ethereum, where users deposit funds, register aggregators, and submit evidence of fraud. The general process that can interact with such solutions is as follows:
- A user sends a deploy transaction of a smart contract off-chain to an aggregator (a block producer in this construction)
- An aggregator deploys the transaction locally, thus creating a new smart contract.
- The aggregator computes the new state root also called a Merkle root.
- The aggregator creates an Ethereum transaction that contains the state root above.
- Any user that sees an aggregator deploying an invalid state root (a state root created by including invalid transactions) can challenge that aggregator by posting the valid state root along with the Merkle proofs required to prove it, slashing (removing a portion of the bond) and the aggregator that committed such fraud and any that built blocks on top of the fraudulent one and claiming those rewards.
- After an invalid block has been committed and fraud-proof is finalized, the chain in layer 2 can be rolled back and resumed from the previous non-fraudulent block.
Pros and Cons of Optimistic Rollups
There are many features and benefits to using optimistic rollups, but there are also some downsides. Here are the pros and cons of optimistic rollups.
- Increase in scalability with up to 200 to 2000 transactions-per-second (tps) compared to Ethereum layer 1’s current 10 tps.
- Flexibility in generalized computation.
- All data is available on-chain. There is no need to trust off-chain data providers.
- Limited Throughput when compared with some other Layer 2 solutions.
- Some additional security issues are raised. For Optimistic Rollups to work, we must assume that there exists an honest majority of Ethereum validators (miners in Eth1, stakers in Eth2) and that there is at least one aggregator that is not censoring transactions.
Rollup should also have a significant impact on DeFi. Users who were previously unable to trade on Ethereum due to high transaction fees can stay in the ecosystem the next time the network is active. They will also support new types of applications that require cheaper transactions and faster confirmation times. All of this is fully protected by the Ethereum consensus. It appears that the aggregation could trigger another period of high growth at DeFi.
Optimistic rollups are expected to have roughly 100x more throughout than that of the Level 1 Ethereum chain. If this scaling solution is widespread, it should be of great help in relieving some of the congestion the Ethereum network is currently experiencing.