One of the biggest setbacks of the Ethereum protocol is the lack of throughput. Optimistic Rollups (ORUs) are layer 2 solution technology helps to scale Ethereum smart contract and Dapps. Optimistic Rollups can scale the Ethereum protocol up to 100 to 2000 transactions per second (TPS). The major advantage it has over other scaling solutions is that it enables Turing-complete smart contracts on layer 2 using Optimistic Virtual Machine (OVM). Thus reducing user transaction cost.
All the scaling solutions we have seen are layer 2 solutions. Meaning that they deploy alongside the main Ethereum chain. The drawback is that such a layer 2 solution cannot bring a fundamental change to the chain itself. However, Optimistic Rollups seem to have what it takes to scale the Ethereum protocol.
There are two types of Rollup: Optimistic and ZK Rollups. Rollups works like Plasma. Both Rollups and Plasma scale Ethereum by moving transactions off-chain onto a layer 2 sidechain. Mainnet secures the layer 2 sidechain, also known as layer 1. Plasma and Rollups deploy smart contracts to the mainnet. Which takes custody of all funds deposited into the sidechain.
How Do Optimistic Rollups Our Works
These Optimistic Rollups (ORUs) introduce key actors called aggregators. These bonded aggregators bundle all transactions submitted by users into rollup blocks on the sidechain. These users pay aggregator fees to enable them to submit their transactions. The new sidechain state root to the mainnet. The aggregators accumulate a large number of transactions and publish them to the smart contract on the mainnet. In fact, aggregators have the trust to deploy contracts. Then process all user transactions, and finally adding them in a “rollup block.”
Any user can become an aggregator and start processing rollup blocks. They do this by putting down a bond in the mainnet contract. Additionally, any user can also download the rollup blocks and earn a reward. The reward is earned when a user proves that a state transition is invalid. Once a user successfully invalidates a block, they slash the aggregator’s bond and the bond of all aggregators who built on top of the invalidated block. Consequently, the challenger earns a portion of the slashed bonds.
This process allows for consensus to reach on a batch of transactions instead of the network having to reach consensus on each transaction. A new rollup block can be challenged if the aggregator fails to include a transaction or posts an invalid transaction. The Optimistic Rollup contract consist of three basic parts:
- Canonical Transaction Chain
- State Commitment Chain, and
- Fraud Verification Contract
Transactions will go straight to the Canonical Transaction Chain when users put their ETH on the Ethereum main chain. Once the transaction executes, the results will be posted to the State Commitment Chain. Optimistic Rollups are assumed to be correct until someone proves it wrong. The Fraud Verification Contract recognizes if there is cheating and goes ahead to delete the state if it is wrong. It will not touch the state commitment chain if the contract recognizes that there is no cheating.
Optimistic Rollups relies heavily on trust and game theory. In general terms, there is an assumption that every aggregator will act honestly. The reason is that their bond will cut-off if they act maliciously. In like manner, these aggregators determine how fees will be submitted. This means that the more developers these aggregators can convince to trust them with their contracts, the more they stand to gain.
The Merged Consensus Of Optimistic Rollups
The merged consensus is one of the major distinguishing features that differentiate ORUs from other scaling solutions. The merged consensus is a consensus protocol that can be verified on-chain, except for actual block validation. Actual block validation takes place implicitly through fraud-proof. The sidechain of Optimistic Rollup is fork-free (there is no split in the network) by design. Therefore, a non-trivial fork choice rule is irrelevant. A blockchain fork is basically a split in the blockchain network or a change in protocol.
Here, the validity of blocks executes off-chain and can be proven incorrect on-chain through fraud-proof. This leaves us with leader selection and Sybil resistance. The leader selection algorithm has to do with who is permitted to attempt to progress the chain by adding a new block. A Sybil attack happens when an attacker subverts the reputation system of a network service. The attacker does this by creating a large number of pseudonymous identities. He also uses these identities to gain a disproportionately large influence.
For the ORUs, the main chain provides Sybil resistance, while leader selection is implicit and post facto. Therefore, ORUs do not need a complex leader selection algorithm or an expensive Sybil resistance mechanism to provide security. The consensus protocol of Optimistic Rollups runs completely on-chain in a smart contract. Therefore, it does not affect or require any support from the mainnet’s consensus rules. Thus ORUs are permissionless through merged consensus.
Contrary to certain claims, Optimistic Rollups does not reduce transaction latency. Every sidechain block on ORUs needs to be committed to the main chain. So, users do not get blocktimes lower than the main chain. Aside from the use of fully-collateralized channels, there is no known secure and rustle way of reducing this latency.
Users don’t have to wait for confirmation of sidechains before accepting its transactions. Since Optimistic Rollups are fork-free, valid blocks accepted on-chain are guaranteed to finalize eventually. All the data are available since all blocks are posted on-chain. Also, users have the permission to carry out client-side validation to accept transactions immediately.
Difference Between Optimistic Rollup and ZK Rollup
Optimistic Rollups sacrifice some scalability to enable them to accommodate smart contracts on layer 2. Also, there is a slight delay in enabling users to challenge invalid blocks from bonded aggregators. On the other, ZK Rollups submit ZK-SNARK to the main chain Rollup contract. Then the main chain smart contract verifies and accepts all valid proofs. This process happens almost in an instant, and it scales immensely.
Example of ORU
A good example of Optimistic Rollup in action is UniPig. It is a demo for Uniswap, built using ORU in collaboration with Plasma Group. The demo can process 250 transactions per second (TPS). However, the developers claim that it has the potential to reach 2000 TPS.
Optimistic Rollups will undoubtedly increase the throughput of Ethereum. Hence driving further innovation in the scalable and sustainable data availability front. As Ethereum prepares to lunch Eth2 or Serenity, ORUs will play a vital role in helping bridge the gaps. Currently, it is not clear whether the ecosystem will adopt ORUs at large. The reason is that there are many layer 2 projects banking on their solution(s) to drive the success of their products. However, time will tell how the mainstream will adopt ORUs.
Also read Chainlink: An In-Depth Explanation
Xord is a Blockchain development company providing Blockchain solutions to your business processes. Connect with us for your projects and free Blockchain consultation at https://xord.one/contact/