Rollups may trigger another period of high growth in DeFi, but there are also challenges such as composability and liquidity fracture.
Original title: “Explaining the “Holy Grail” Rollups of Ethereum Expansion: Will the transaction rise to thousands of transactions per second, or will it trigger another period of high growth in DeFi? 》
Written by: jakub, source: Finematics
Rollups is considered to be the ultimate solution for the expansion of Ethereum. So, what’s the matter with Rollups? What is the difference between Optimism and ZK rollups? How is Arbitrum different from Optimism? And why are rollups considered the holy grail when it comes to expanding Ethereum? You will find the answers to these questions in this article.
introduce
Ethereum expansion has always been one of the most discussed topics in the encryption field. The expansion debate usually heats up during periods of high network activity, such as the CryptoKitties boom in 2017, the DeFi summer in 2020 or the cryptocurrency bull market in early 2021.
During these periods, the unprecedented demand for the Ethereum network has led to extremely high gas costs, making it expensive for daily users to pay transaction fees.
In order to solve this problem, finding the ultimate scaling solution has always been one of the top tasks of multiple teams and the entire Ethereum community.
Generally speaking, there are 3 main ways to expand Ethereum or most other blockchains: expand the blockchain itself-Layer 1 expansion; build on top of layer 1-Layer 2 ( Layer 2) Expand capacity and build a side chain on the side of the first layer.
For the first layer, Eth2 is the preferred solution for scaling the Ethereum blockchain. Eth2 refers to a set of interrelated changes, such as migrating to Proof of Stake (PoS), and merging the state of the Proof of Work (PoW) blockchain into a new PoS chain and sharding.
In particular, sharding can significantly increase the throughput of the Ethereum network, especially when combined with rollups.
When it comes to extensions beyond the first layer, many different extension solutions have been tried and some mixed results have been achieved.
On the one hand, we have second-tier solutions, such as Channels, which are fully guaranteed by Ethereum, but only for specific application sets.
On the other hand, side chains are usually compatible with EVM and can extend general-purpose applications. The main disadvantage is that they do not rely on the security of Ethereum, but have their own consensus model, so they are not as secure as layer 2 solutions.
The goal of most rollups is to achieve the best results in these two areas by creating a universal scaling solution while still relying entirely on the security of Ethereum.
This is the holy grail of expansion because it allows all existing smart contracts to be deployed on Ethereum without sacrificing security, with little change.
No wonder rollups may be the most anticipated extension of all solutions.
But first, what are rollups?
Rollups
Rollup is an extended solution that works by executing transactions outside of layer 1, but publishing transaction data at layer 1. This allows rollup to expand the network and still get its security from the Ethereum consensus.
Moving the calculations off-chain actually allows more transactions to be processed, because only part of the data from rollup transactions must fit in the Ethereum block.
To achieve this, rollup transactions are executed on a separate chain, which can even run rollup-specific EVM versions.
The next step after executing the rollup transaction is to batch them together and publish them to the Ethereum main chain.
The whole process is essentially to execute transactions, obtain data, compress data, and aggregate them on the main chain in a single batch, hence the name “rollup”.
Although this seems to be a potentially good solution, a problem will naturally arise next:
“How does Ethereum know that the published data is valid and is not submitted by bad actors trying to benefit themselves?”
The exact answer depends on the specific rollup implementation, but generally speaking, each rollup deploys a set of smart contracts at layer 1, responsible for processing deposits and withdrawals and verifying certificates.
Proof is also the main difference between different types of rollup.
Optimistic rollups use fraud proofs. In contrast, ZK rollups use proof of validity.
Let’s explore these two types of rollups further.
Comparison between Optimistic and ZK Rollups
Optimistic rollups publish data to layer 1 and assume that it is correct, so it is called “optimistic”. If the published data is valid, we are on the road to happiness and do not need to do other things. Optimistic rollups benefit from not needing to do any extra work in an optimistic situation.
In the event of an invalid transaction, the system must be able to identify it, restore the correct state and punish the party submitting such a transaction. To achieve this, Optimistic rollups implements a dispute resolution system that can verify fraud proofs, detect fraudulent transactions, and inhibit bad actors from submitting other invalid transactions or false fraud proofs.
In most Optimistic rollups implementations, the party that can submit batch transactions to the first layer must provide a margin, usually in the form of ETH. Any other network participant can submit a fraud proof if they find a wrong transaction.
After submitting the fraud proof, the system enters the dispute resolution mode. In this mode, this suspicious transaction is executed again on the Ethereum main chain. If the execution proves that the transaction is indeed fraudulent, the party submitting the transaction will be punished, usually by cutting its mortgaged ETH.
In order to prevent bad actors from using incorrect fraud proofs to send spam to the Internet, parties who wish to submit fraud proofs usually must also provide a margin that may be reduced.
In order to be able to perform rollup transactions at level 1, Optimistic rollups must implement a system that can replay transactions in the exact state when the transaction was originally executed on the rollup. This is one of the complex parts of Optimistic rollups. It is usually achieved by creating a separate manager contract and replacing certain function calls with the state of the rollup.
It is worth noting that even if there is only one honest party monitoring the status of the rollup and submitting a fraud proof when needed, the system can work as expected and detect fraud.
It is also worth mentioning that, due to the correct incentive mechanism in the rollup system, entering the dispute settlement procedure should be a special case rather than a frequent occurrence.
When it comes to ZK rollups, there is no dispute resolution solution at all. This is achieved by using a clever encryption technique called zero-knowledge proof, hence the name ZK rollups. In this model, each batch published to layer 1 contains an encrypted proof called ZK-SNARK. The proof can be quickly verified by the layer 1 contract when the transaction batch is submitted, and invalid batches can be rejected immediately.
Sounds simple, right? Maybe it is on the surface. In practice, in order to make it work, many researchers have spent countless hours iterating these clever cryptographic and mathematical works.
There are some other differences between Optimistic and ZK rollups, so let us introduce them one by one.
Due to the nature of the dispute resolution process, Optimistic rollups must give all network participants enough time to submit fraud proofs, and then finalize the transaction at the first level. This period is usually quite long to ensure that even in the worst case, fraudulent transactions can still be disputed.
This leads to quite a long time to withdraw funds from Optimistic rollups, as users have to wait even up to a week or two to withdraw their funds back to Tier 1.
Fortunately, there are some projects that are working to improve this situation by providing rapid “liquidity presence.” These projects provide almost instant withdrawals back to tier 1, another tier 2 or even a side chain, and charge a small fee for this convenience. The Hop protocol and Connext are projects worthy of attention.
ZK rollup does not have the problem of long-term withdrawal, because as long as the rollup batch and the validity certificate are submitted to the first layer, the funds can be withdrawn.
So far, it seems that ZK rollups are just better versions of Optimistic rollups, but they also have some disadvantages.
Due to the complexity of the technology, it is much more difficult to create a ZK rollup compatible with EVM, which makes it more difficult to extend general-purpose applications without having to rewrite the application logic. Having said that, ZKSync is making significant progress in this area, and they may soon launch a ZK rollup compatible with EVM.
The Optimistic rollups program is easier in terms of EVM compatibility. They still need some modifications to run their own EVM version, but 99% of the contracts can be transplanted without any changes.
ZK rollup is also more computationally intensive than Optimistic rollups. This means that the nodes that calculate the ZK proof must be high-spec machines, which makes it difficult for other users to run them.
In terms of scaling improvements, both types of rollups should be able to scale Ethereum from 15 to 45 transactions per second (depending on the transaction type) to 1,000 to 4,000 transactions per second.
It is worth noting that by providing more space for rollup batches on layer 1, more transactions can be processed per second. This is also the reason why Eth2 can have a great synergy with rollup, because it creates multiple shards to increase the possible data availability space-each shard can store a large amount of data. The combination of Eth2 and rollup can increase the transaction speed of Ethereum to 100,000 transactions per second.
Now, let’s talk about all the different projects working on Optimistic and ZK rollups.
Optimistic Rollups
Optimism and Arbitrum are currently the most popular Optimistic Rollups options.
Optimism has been partially promoted to the Ethereum mainnet, working with limited partners such as Synthetix or Uniswap to ensure that the technology works as expected before it is fully launched.
Arbitrum has deployed its version to the mainnet and started to incorporate different projects into its ecosystem. Rather than allowing only a limited number of partners to be able to deploy their agreements first, they decided to provide a time window for all agreements that they wanted to launch in their rollup. When this period is over, they will be open to all users at once.
Some of the most famous projects launched on Arbitrum are Uniswap, Sushi, Bancor, Augur, Chainlink, Aave, etc.
Arbitrum also recently announced a partnership with Reddit. They will focus on launching a separate rollup chain, which will allow Reddit to expand their reward system.
Optimism is working with MakerDAO to create the Optimism Dai bridge and enable DAI and other tokens to be quickly withdrawn back to layer 1.
Although both Arbitrum and Optimism try to achieve the same goal-to build an Optimistic Rollups solution compatible with EVM, there are some differences in their designs.
Arbitrum has a different dispute resolution model. Instead of re-running the entire transaction at layer 1 to verify whether the fraud proof is valid, they proposed an interactive multi-round model that allows to narrow the scope of disputes and may only execute some instructions at layer 1 to check for suspicious Whether the transaction is valid.
This also has a nice side effect, that is, the smart contract deployed on Arbitrum may be larger than the maximum contract size allowed on Ethereum.
The other major difference is the way in which transaction sequencing and MEV are handled.
Arbitrum will initially run a sequencer responsible for sorting transactions, but in the long run, they want to decentralize it.
Optimism prefers another method in which the sequence of transactions and MEV can be auctioned to other parties within a certain period of time.
It is worth mentioning that there are other projects dedicated to Optimistic Rollups. Fuel, the OMG team, OMGX and Cartesi, etc. Most of them also tried to develop an EVM compatible version for their rollups.
ZK rollups
Although it seems that the main focus of the Ethereum community is Optimistic Rollups, at least in the short term, let us not forget that the project dedicated to ZK rollups is also progressing very quickly.
For ZK rollups, we have several options available.
Loopring uses ZK rollup technology to extend its transaction and payment protocol.
Hermez and ZKTube are using ZK rollup to expand the scale of payment, and Hermez is also building a ZK rollup compatible with EMV.
Aztec is focusing on introducing privacy features into its ZK rollup technology.
Projects such as DeversiFi, Immutable X and dYdX have widely used StarkWare-based rollup technology.
As we mentioned before, ZKSync is developing an EMV-compatible virtual machine, which will be able to fully support any smart contract written in Solidity.
Summarize
As we have seen, there are many things going on in the optimistic and ZK rollup camps, and the competition between different rollups will be very interesting.
Rollup should also have a significant impact on DeFi. Users who were unable to conduct transactions on Ethereum due to high transaction fees will be able to stay in the ecosystem the next time there is frequent network activity. 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 seems that rollup may trigger another period of high growth in DeFi.
However, there are still some challenges in rollup.
Composability is one of them. In order to combine transactions using multiple protocols, all of these protocols must be deployed on the same rollup.
Another challenge is liquidity fracture. For example, if no new funds enter the Ethereum ecosystem as a whole, the existing liquidity that exists in layer 1 in protocols such as Uniswap or Aave will be shared between layer 1 and multiple rollup implementations. Lower liquidity usually means higher slippage and poor transaction execution.
This also means that there will naturally be winners and losers. Currently, the existing Ethereum ecosystem is not enough to take advantage of all scaling solutions. In the long run, this is likely to change, but in the short term, we may see some rollups and other scaling solutions become no one’s land.
In the future, we may also see users living completely in a rollup ecosystem and not interacting with the Ethereum main chain and other scaling solutions for a long time. This may be especially obvious if we will see more centralized exchanges capable of direct deposits and withdrawals.
Nonetheless, rollups seem to be the ultimate strategy for expanding Ethereum, and the challenge is likely to be eased in some way. It is obviously very interesting to see how rollups are gaining adoption by more and more users.
A question that often arises when discussing rollups is whether they pose a threat to the side chain. Personally, I think that sidechains will still have a place in the Ethereum ecosystem. This is because although the transaction cost on tier 2 will be much lower than on tier 1, it is likely still high enough to price certain types of applications (such as games and other high-volume applications).
When Ethereum introduces sharding, this situation may change, but the side chain may produce enough network effects to survive in the long run. It is very interesting to see how this will develop in the future.
In addition, the cost of rollups is higher than that of side chains, because each rollup batch still needs to pay for the Ethereum block space.
It is worth remembering that the Ethereum community is very concerned about rollups in the Ethereum expansion strategy-at least in the short to medium term, and possibly even longer. I suggest reading ” Vitalik Buterin: Explore the Ethereum Development Route Centered on Rollup “.