(In this Guide, We’ve explained Ethereum Rollups, How they can scale Ethereum, and their different types.)
Ethereum scaling is one of the hottest topics in cryptocurrency. Discussions about scaling usually heat up during periods of high network activity, such as his CryptoKitties boom in 2017, DeFi in the summer of 2020, and the cryptocurrency bull market in early 2021. Since these times, unprecedented demand for the Ethereum network has resulted in extremely high gas prices, making it expensive for everyday users to pay for transactions. Finding the ultimate scaling solution to address this issue has been a top priority for multiple teams and the entire Ethereum community.
How can we scale Ethereum?
There are three main ways to scale Ethereum and most other Blockchains:
- Layer 1 scaling which means scaling the Blockchain itself
- Layer2 scaling which means building on top of layer 1
- Sidechains which means building on the side of layer 1
As for Layer 1, Eth2 rns.iis the solution of choice for scaling the Ethereum blockchain. Eth2 refers to a series of interrelated changes such as the transition to Proof-of-Stake (PoS), the merging of the Proof-of-Work (PoW) blockchain status into a new PoS chain, and sharding. Sharding, in particular, can dramatically improve the throughput of the Ethereum network, especially when combined with rollups. On the other hand, sidechains are generally compatible with EVM and can be extended to general-purpose applications. The main drawback is that it does not rely on Ethereum security and instead has its own consensus model, making it less secure than layer 2 solutions.
Most rollups aim to create a general-purpose scaling solution to achieve the best of both worlds while relying entirely on Ethereum’s security.
So what are rollups all about?
Moving computation off-chain essentially allows more transactions to be processed overall since only a portion of the roll-up transaction data needs to fit on the Ethereum block. To accomplish this, rollup transactions are performed on a separate chain that can run a rollup-specific version of EVM. The next step after executing transactions on Rollup is to aggregate the transactions and send them to the Ethereum main chain. The whole process is basically doing a transaction, retrieving and compressing the data, and rolling it up to the main chain in a single batch, hence the name rollup.
The exact answer depends on the particular rollup implementation, but generally, each rollup deploys a set of smart contracts at Layer 1 responsible for processing deposits and withdrawals and validating evidence. Proofing is also where the main difference between different types of rollups comes into play. Optimistic rollup uses fraud proofs. In contrast, the ZK rollup uses proof of validity.
What is the difference between an optimistic rollup and a ZK rollup?
Optimistic rollup sends data to layer 1 and assumes it is correct, hence the name optimistic. If the data posted is valid then we are on the right track and nothing more needs to be done. Optimistic rollup has the advantage that you don’t have to do extra work in optimistic scenarios. In the event of an invalid transaction, the system shall be able to identify it, restore the correct status, and penalize the party that submitted such a transaction. To achieve this, optimistic rollups are designed to validate evidence of fraud, detect fraudulent transactions, and prevent malicious individuals from submitting other invalid transactions or false evidence of fraud.
In the most optimistic rollup implementation, any party that can submit a batch of transactions to Layer 1 must provide a security deposit, usually in the form of ETH. Other network participants can provide proof of fraud if they discover a fake transaction. After submitting evidence of fraud, the system enters dispute-resolution mode.
In this mode, suspicious transactions are executed again, this time on the main Ethereum chain. If the execution proves that the transaction is indeed fraudulent, the party that sent the transaction will usually be punished by having their ETH bound. To prevent malicious parties from spamming the network with bogus evidence of fraud, parties wishing to submit evidence of fraud are generally required to provide a bond that is subject to thrashing.
In order to perform a Layer 1 rollup transaction, an optimistic rollup must implement a system that allows the rollup to reflect the transaction exactly as it was when it was first executed. This is one of the hard parts of optimistic rollup, and is usually accomplished by creating another manager contract that replaces certain function calls with the state of the rollup. It is worth noting that the system worked as expected and was able to detect fraud even when there was only one honest party monitoring the status of therollup and providing evidence of fraud if required.
There is absolutely no dispute resolution at ZK-Rollups. This is made possible through the use of clever cryptography called zero-knowledge proofs, hence the name ZK-Rollups. In this model, each batch sent to Layer 1 contains a cryptographic proof called ZK-SNARK. Sending transaction batches through a Layer 1 contract allows for quick evidence verification and immediate rejection of invalid batches.
In fact, several researchers have spent countless hours iterating on these clever ciphers and mathematics to make them work. Due to the nature of the dispute resolution process, an optimistic rollup should allow sufficient time for all network participants to provide proof of fraud before the transaction is completed at Layer 1. This period is usually fairly long so that even in the worst case, fraudulent transactions can be disputed. This makes withdrawals of optimistic rollups quite time consuming. Because the user has to wait 1-2 weeks before withdrawing funds to Layer 1. Fortunately, some projects are working to remedy this situation by providing quick ‘cash available’. These projects provide near-instantaneous payouts to Layer 1, another Layer 2, and even sidechains, and charge a small fee for convenience. Hop Protocol and Connext are notable projects.
ZK rollups do not have long withdrawal issues as funds can be withdrawn as soon as the rollup batch is sent to Layer 1 with proof of validity. So far, ZK Rollup seems to be just a better version of Optimistic Rollup, but it has some drawbacks. Due to the complexity of the technology, it is much more difficult to create an EVM-compatible ZK rollup and more difficult to scale a generic application without rewriting the application logic. ZKSync has made great strides in this area and soon it may launch the EVM-compatible ZK rollup.
Optimistic rollup is a little easier with EVM compatibility. You’ll have to modify your own version of the EVM to run with some, but 99% of the contract is portable without modification. ZK rollup is much more computationally intensive than the optimistic rollup. This means that the nodes that compute ZK proofs must be highly specialized machines, making it difficult for other users to run them. In terms of scaling improvements, both types of rollups should be able to scale Ethereum from around 15-45 transactions per second (depending on transaction type) to 1000-4000 transactions per second.
Optimism and Arbitrum are currently the most popular options for optimistic rollup. Optimistic Rollup is a Layer 2 (L2) structure that improves the throughput and latency of Ethereum’s base layer with off-chain computing and data storage. Optimistic rollup processes transactions outside of the Ethereum mainnet, reducing congestion on the base layer and improving scalability.
The label ‘optimistic’ indicates the special characteristics of the optimistic rollup. It exposes little information about transactions on the chain and automatically assumes all transactions are valid. They are called “rollups” because they batch (“rollup”) thousands of transactions before sending them to the mainnet. Both Arbitrum and Optimism seek to achieve the same goal of creating an EVM-compatible optimistic rollup solution, but there are some design differences. Arbitrum has a different dispute resolution model. An interactive approach that narrows the scope of the dispute and allows you to run and verify a few instructions at Layer 1, instead of having to rerun the entire transaction at Layer 1 to make sure the evidence of fraud is valid. Suspicious transactions are valid. It also had the positive side effect that smart contracts deployed on the
Arbitrum network could be larger than the maximum contract size allowed by Ethereum.
Another important difference is how transaction orders and MEVs are processed.Arbitrum will initially run a sequencer responsible for ordering transactions, but in the long term it will be decentralized. Optimism prefers a different approach that allows MEVs to be auctioned off to other parties for a period of time with the order of transactions.
Zero Knowledge Rollup (zkRollup) is a type of Ethereum Layer 2 scaling solution that guarantees much higher throughput and much lower cost without sacrificing security.
It does this by bundling hundreds of transactions off the chain. There it generates a cryptographic proof of validity and sends it back to the main blockchain. The fact that Ethereum stores enough data to verify this evidence and identify off-chain account owners means that zkRollups can inherit the same no-control security as Ethereum, but it can run much faster.
Loopring uses ZK’s Rollup technology to extend its exchange and payment protocol. Hermez and ZKTube are working on scaling payments with ZK-Rollups and Hermez is also making EVM compatible ZK-Rollup. Aztec focuses on building privacy features into ZK Rollup technology. StarkWare-based rollups are already widely used by projects such as DeversiFi, Immutable X, and dYdX. As mentioned earlier, ZKSync runs on an EVM-compatible virtual machine that can fully support smart contracts written in Solidity.
Rollups will have a big impact in DeFi. Layer2 solutions will be the reason users going to stay in the Ethereum ecosystem. Activity on the layer2 networks will be high because of low gas fees. It also enables new types of applications that require cheaper transactions and faster confirmation times. All of these are fully protected by the Ethereum Consensus. It looks like the rollup could spark another match of DeFi high growth.
Subscribe To Our Newsletter
Join our mailing list to receive Cryptocurrency investing and trading recommendations to your mailbox.
You have Successfully Subscribed!
Subscribe to get notified on latest posts.