Understanding the ZK Rollup: a second layer solution for Ethereum
Back to FAQIn order to reduce the load supported by the Ethereum blockchain, various second-layer solutions are being considered and coexist with each other. Among these solutions, we find what are called rollups, among which we find the ZK Rollup.
So what is the problem to solve with Ethereum? What are rollups? What exactly is ZK Rollup?
Congestion for almost a year at Ethereum
For almost a year, Ethereum has been experiencing the same problem of congestion. This problem is mainly due to a significant increase in the number of its users, but also in the number of smart contracts used. The chain is then completely blocked and the transaction costs are increasingly important. We are talking about several tens or even hundreds of dollars to interact with a smart contract.
Blockchain has succeeded on several occasions in bringing down its fees, but then it is a rebound that has been consistently observed. This success (and therefore rise) is mainly due to investor interest in NFTs and decentralized finance. Last March, Ethereum was considering a transition to a new system. As of August, the migration from ETH 1.0 to ETH 2.0 was not yet complete.
It took the month of October for The Merge, allowing a considerable reduction in the energy consumption required for an interaction on Ethereum to be realized.
Rollup: a possible solution?
The co-founder of Ethereum would rather support second layer solutions to face the problems encountered. The goal of the second layer solutions is in fact to reduce the load supported by Ethereum, that is to say the increasing number of users and smart contracts by shifting part of the support out of the main chain. This is a solution that can be considered while waiting for the arrival of ETH 2.0.
The rollups represent this type of solution. There are several of them like Optimistic Rollup or ZK Rollup for example. Rollups are sidechains that work in parallel with the main chain. They combine off-chain data and on-chain data. Part of the calculations is therefore deported to the rollups and the data is also compressed to reduce its consumption.
Understanding how rollups work
To understand why rollups are a potential solution to the Ethereum blockchain congestion problem, we need to understand how they work. More than behaving like an annex chain to the main one, rollups work thanks to Merkle trees. Each solution has a smart contract on the Ethereum blockchain which itself contains the root state of the rollup. In short, only the root state is published on the main chain.
As soon as new transactions are recorded in the second layer, it is possible to publish a block for the users, i.e. a whole set of transactions in Merkle tree format with the root of the new and old state. The validity of the root state is checked to become the current rollup state.
In order to counteract the possible publications of a malicious actor, the creation of several different rollups comes into play. This is how ZK Rollup and Optimistic Rollup come into existence today, for example.
What is ZK Rollup?
ZK Rollup is therefore one of the rollups that can be used as a second layer to decongest the Ethereum blockchain. By ZK Rollup we mean in fact Zero-Knowledge Rollups.
In particular, ZK Rollup allows the aggregation of hundreds of transactions that take place off-chain. Its role is also to publish a proof of balance at the end of the transaction on the main chain. In addition, it is important to note that a system that uses rollups relies on two types of use:
- Issuers who make transfers and disseminate their transactions
- Relayers who collect transactions and generate SNARK proof
In order to become a relayer, the user must follow a procedure that will ensure that no transaction is altered or withheld, otherwise he/she will be penalized.
ZK Rollup offers many advantages, including low transaction fees, true speed and reduced information stored on Ethereum. However, there are also disadvantages to opting for ZK Rollup. In particular, this solution is vulnerable to certain attacks. In addition, ZK Rollup's proofs have computational complications, which reduces the theoretical scaling capacity.