Arbitrum and Optimism: paradigm-shifting EVM rollups

(Written on 01.12.2021)

Since 2020 crypto natives have been testing out two promising EVM-compatible rollups - Arbitrum and Optimism. These are the most hyped “optimistic” rollups conceived to ease the problem of beating gas fees (i.e. price-per-unit transaction costs) in the Ethereum mainnet.

The soaring gas price of Ethereum blockchain has been a growing headache all-too familiar to users due to increasing activity in the network. For now, no one can bet the bottom dollar that the anticipated merge with the beacon chain is tackling the gas issue for sure. That’s why different teams, like Offchain Labs, race to bring a solution to scale the Ethereum mainnet. The Offchain Labs project Arbitrum is only in beta, but has already become a partner chain for Uniswap, SushiSwap and Chainlink to name a few. Arbitrum has also partnered with Reddit to create a rollup network to reward its users. Optimism is currently being tested on platforms such as Uniswap and Synthetics, Lyra, and wallets like Rainbow and Metamask. Optimism is also a MakerDAO partner to create a Dai Bridge to quickly withdraw DAI and other tokens to the mainnet.

Arbitrum has already experienced a shutdown: as it uses a system for queuing transactions – the Sequencer, a recent attempt to decentralize it resulted in a 45-minute network crash in mid-September. Still, by October, $2 billion had been bridged to Arbitrum due to the NYAN cat token boom.

How does a rollup work?

A rollup is a special type of an add-on network that combines best features of sidechains and Layer 2 networks. Rollups conduct transactions with mainnet assets right outside the main blockchain - on sidechains in a custodial mode, uploading them back to the Layer 1 in batches. Take Optimism, which is run on the Optimistic Virtual Machine (OVM) on the Layer 2 of the Ethereum Virtual Machine (EVM L2). OVM ensures almost the same possibilities for implementing smart contracts as those on the Ethereum mainnet.

Using rollups is merely as cheap as hanging out on sidechains. Low gas price is reached through compressing piles of transactions into batches. Downloading one batch to Layer 1 is priced equivalent to one transaction in the main network, so the transaction fee within the rollup figuratively tends toward zero compared to mainnet. You only pay for the Ethereum network gas twice – when getting your assets off, and then, if you do need it, back on the Ethereum network again through a bridge. The rollup chain isn’t that overloaded or may be using shards in future, so the transactions per second (TPS) rate may increase. For example, Optimism’s TPS reaches several hundred-thousands.

It seems natural. Using rollup technology feels like booking a plane to split the cost between multiple cheap seat tickets. Everyone’s happy: all passengers get their transfer, and no one overpays. And the high gas fee paid to get onto the rollup is somewhat like a taxi drive to the airport.

For example, you could be paying about $50-equivalent in ETH both for a $70 or a $70,000 transaction on Layer 1. But in a rollup you’d place your $70-worth transaction into a batch, sharing the gas price with other users, making the cost-per-unit for a person less than $5.

The gas price in Optimism now is just 0.015 gwei.

But does it take the burden off our shoulders safely? In short, yes, it does. Firstly, it uses the mainnet consensus. Secondly, the rollup approach decreases the price of gas and maintains a high rate of transactions per second (TPS). Furthermore, lower gas prices make it cost-effective to use complex applications, such as highly encrypted privacy services, that would normally consume more gas. Ultimately, this stimulates the growth of reliability.

What’s an optimistic rollup? Are there any other types of rollups?

In optimistic rollups (ORUs) transactions security is guaranteed by verifying data via special validating smart contracts on the mainnet. These are manager-contracts that can play back to the state at any moment in the past.

ORUs save computing power as they process calculations only when funds are returned to the mainnet using a “fraud-proof” mechanism. ORUs do not check each transaction and upload them to the mainnet with a presumption of legality. Transferring funds to the mainnet requires time to be verified by validators (called the Grace period or Challenge period).

In case a fraudulent transaction batched with the fair ones, the validators won’t let the block pass. In this situation a validator should issue a challenge for the system to enter the Dispute Resolution Mode. When the manager contract plays the state back, the fraud is no longer a threat to the users’ finances.

Going back to the traveling analogy, occurring frauded transactions in an optimistic rollup is more like a multi-day boat trip with a passenger who’s about to commit a crime aboard or has got a latent covid period. At first, all the passengers get on board, with their passports checked at the port customs. But as the crime happens or covid symptoms pop up, everyone gets either under suspicion or quarantined, and no one’s free move through the customs of the place of destination (i.e. the whole batch of transactions containing a frauded one has no chance to be uploaded to the mainnet).

Any network user who has installed the appropriate verification application, and also deposited a certain amount of ETH, can become a validator. If a validator tries to act dishonestly, the deposited money will be slashed. The system is highly reliable, because to block an illegitimate transaction, a challenge issued by a single validator is enough.

The network also protects itself from spamming with irrelevant challenges. Any validator that indicates a non-existent error is also subjected to slashing. Therefore, it is beneficial for everyone to be extremely honest and accurate.

Returning the assets to the mainnet requires a final verification during an asset freeze period. For now, its length is randomized. That’s why there’s already an emerging market for buying rights for assets being currently verified. These projects are called liquidity exits (check Сonnext and Hop). The rights may be purchased by liquidity providers for a small fee, in case of an urgent need to have the money on the mainnet.

As for now, Arbitrum surely outperforms Optimism in validating transactions before uploading data to the mainnet. When a dispute is identified, Arbitrum uses an “interactive proving” mechanism that narrows the field of verification, eliminating the need to verify the entire transaction chain. Thus, the marginal value of a contract placed on Arbitrum compared to that on Ethereum increases (as Arbitrum puts it – with no limit).

Other types of rollups, like ZK-Rollups (Zero-Knowledge Rollups or ZRUs), Validium and Plasma included, store data off-chain or use other methods of processing calculations, like the ZK SNARK.

The marvelous advantage of ORUs is that there’s no need to switch to another blockchain. Another one’s the ability to broaden the developer tools handset and to use any token to mainnet base assets. Also, ORUs do not require the processing of DeFi protocols and wallets, and they can execute smart contracts and transfer ERC-20 tokens at hundreds of TPS.

The disadvantage of ORUs is the price of withdrawing to the mainnet, which is higher than the gas price in the Ethereum network. The main disadvantage of Optimism right now is the withdrawal time.

We believe that these remaining issues shall be addressed soon. And we anticipate tokens launch and for now we’re off to do some swapping to get lucky for possible airdrops.