Topics Blockchain
Bybit Learn
Bybit Learn

ZK-Rollups Guide: ETH Scalability — and Why It’s the Next Big Narrative

Scalability is a major problem for Ethereum and most blockchain projects. As the number of computationally intensive processes on the main blockchain increases, it clogs up the network and makes transactions slow and expensive. This hurts user experience and the Ethereum ecosystem as a whole. However, there may be a solution to the scalability problem for Ethereum: ZK-Rollups. This article will introduce you to ZK-Rollups and their benefits and limitations, and compare them to other scaling solutions while examining the best ZK-Rollup coins.

What Are ZK-Rollups? 

ZK-Rollups, or zero-knowledge rollups, are smart contracts that implement Ethereum Layer 2 scaling solutions for more efficient transaction processing on the blockchain.

To understand ZK-Rollups, you must have a foundational knowledge of rollups in general and why they hold the key to Ethereum Layer 2 scalability solutions. Layer 2 solutions are based on a secondary chain instead of the mainchain.

Rollups are among the most popular Layer 2 solutions because they provide a high throughput (transactions per second), without sacrificing security or decentralization. They achieve this by moving computationally intensive processes from the Ethereum mainnet (Layer 1) to a sidechain (Layer 2). A rollup submits just enough data to the mainchain so that any participant can recreate the transaction states and detect invalidity or errors. Security isn’t compromised, since the transaction data is stored on the Ethereum mainchain.

ZK-Rollups bundle — or “roll up” — transaction data into a single block and process it off the mainchain to ease congestion. Network participants known as transactors and relayers handle this data, while verifying and submitting it to the mainnet.

Transactors post their transaction data — which consists of the indexed address, value, network fee and nonce (number only used once) — to the network. The indexed address uses fewer processing resources, and smart contracts link these addresses to Merkle trees, data structures that make sure data can’t be faked within a ZK-Rollup. A ZK-Rollup has two Merkle trees: one that records accounts, and another that stores transaction values. This also is an efficient use of processing power and time.

Relayers create rollups by aggregating transactions. They create a zero-knowledge, succinct non-interactive argument of knowledge (ZK-SNARK) proof that validates transactions by comparing the blockchain state before and after. ZK-SNARK is a novel way of proving possession of specific information without revealing that information, and without the prover interacting with the verifier. The relayer forwards the results of the proof to the mainchain in a verifiable hash. Relayers must stake their crypto in a smart contract to incentivize honesty. Any fraudulent act attracts loss of the staked funds, discouraging bad actors and reducing the need for frequent disputes.

ZK-Rollups are a more efficient use of blockchain space, as they require less storage than traditional smart contracts since “zero knowledge” of the whole transaction’s data is needed. They only need validation proof, which makes validation quicker and cheaper because minimal data is included. The transactions have already been verified on the sidechain, which automatically validates them on the mainchain. Validating using a ZK-Rollup requires less data, which is quicker and less expensive than executing the transactions on the main Ethereum chain.

Benefits and Limitations of ZK-Rollups

Cheaper and faster, ZK-Rollups offer some of the best Ethereum Layer 2 scaling solutions. Here are the primary advantages:

  • Faster transaction finality time: ZK-Rollups offer faster transaction finality time (the time it takes a user to get a confirmation that a blockchain transaction won’t be changed or canceled). The Ethereum network immediately verifies the updated state once validity proofs are sent.
  • Increased throughput and scalability: ZK-Rollups increase throughput and scalability, since each transaction contains minimal data. A ZK-Rollup compiles all transactions into a single one, which is then verified by proof of validity. As a result, only the latest state needs to be communicated between nodes, allowing faster and more efficient processing.
  • Cheaper transaction fees: ZK-Rollups enable more affordable transaction fees. Users share the gas cost among themselves, since their transactions are bundled or “rolled-up.” With enough users, the gas fees may cost only a few cents, since the ZK-Rollup can bundle an almost infinite number of transactions
  • Faster withdrawal times: ZK-Rollups allow for swift withdrawal times because they use validity proof to authenticate transaction data, and don’t require a challenge period. 
  • Decentralized yet secure: Because ZK-Rollups are “zero-knowledge,” only the validity proof is needed to retrieve data, instead of the entire transactional data. As the validity proof is stored on Layer 1, the rollup can increase scalability while maintaining the secure and decentralized nature of the layer. Computing blocks in parallel also encourages decentralization.

With its innovative approach, the ZK-Rollup protocol promises to be the future of Layer 2 scaling. Of course, it’s not without its drawbacks. ZK-Rollups present some limitations that will need to be overcome to achieve mainstream adoption:

  • Complex validity proofing: Computing a zero-knowledge validity proof is difficult and time-consuming. Therefore, to get maximum throughput, ZK-Rollups require data optimization. In addition, the complex mathematics of ZK validity proofs limits the functionality of ZK-Rollups to simple transactions like direct transfers and trading ― at least for now. Data optimization will be needed to obtain maximum throughput.
  • Trust: As only one of the network participants must be considered honest to validate rollup data, there is a chance all participants could be corrupted.
  • Smart contract support: Unlike other Layer 2 scaling solutions, ZK-Rollups don’t support smart contract execution. However, various projects at different stages of completion aim to solve this problem.

ZK-Rollups vs. Other Layer 2 Scaling Solutions

Rollup protocols and other Layer 2 scaling solutions operate similarly, but each one is designed to serve specific use cases within the blockchain ecosystem. 

ZK-Rollups vs. Optimistic Rollups

Some Layer 2 solutions may offer enhanced scalability and throughput by not posting any data to the Ethereum mainnet. However, this comes at the cost of reduced security. 

ZK-Rollups and optimistic rollups both achieve scalability improvements by moving transaction computation off-chain and submitting highly compressed data to the Ethereum mainnet. Where they diverge is in their verification methods. ZK-Rollups validate transactions with complex cryptographic validity proofs, with each batch of transactions submitting a validity proof to the mainnet.

Optimistic rollups, on the other hand, believe all the transactions to be valid, and submit transaction batches without any calculations. This leads to a considerable uptick in scalability. However, there’s a challenge period in which anyone can question the validity of any transaction. If an anomaly is observed, the rollup runs a fraud proof (a check on transactions for possible fraud) using the data available on Layer 1. This challenge period wait causes more delays than with ZK-Rollups.

The optimistic rollup protocol incentivizes legitimate transactions by rewarding sequencers (parties responsible for storing and executing user transactions off-chain). Sequencers who submit fraudulent transactions to the Ethereum blockchain are punished by having their ETH stake slashed. 

Optimistic rollups can offer up to 100x increase in scalability, since they don’t need to carry out complex computations. However, the challenge period means their withdrawal period is far longer than that of ZK-Rollups. 

Another main difference is that optimistic rollups offer smart contract capabilities, which are challenging to implement with ZK-Rollups.

ZK-Rollups vs. Sidechains

Sidechains are blockchains which are linked to the main blockchain, such as Ethereum via bridge contracts. They differ primarily from ZK-Rollups in that they receive data from the mainnet without needing to validate it. Instead, sidechains rely on a set of parties who control the bridge contracts to confirm that the mainnet isn’t compromised and relay this information to the bridge. 

As a separate entity, sidechains have their own security properties and consensus mechanisms to process transactions. Like ZK-Rollups, sidechain transactions are often cheaper than mainchain transactions.

Meanwhile, for ZK-Rollups, sequencers give proof of the network state to the bridge contract, which has to validate the evidence and verify that the network hasn’t been compromised.

ZK-Rollups use Ethereum network security, and consume more resources as a result. This makes ZK-Rollups more expensive compared to a sidechain. 

The main difference between ZK-Rollups and sidechains is the method for storing transaction data. Whereas rollups batch transactions on Layer 2, and then submit them to the mainchain, sidechains create entirely separate chains — and then submit only the deposit and withdrawal to the mainchain. While ZK-Rollups can rely on the security of the mainchain, sidechains are responsible for their own. There’s also the chance with any sidechain that the operators creating new blocks could stop producing blocks, or limit withdrawals. As with mainchains, sidechains are also subject to 51% attacks.

ZK-Rollups vs. Plasma Chains

Plasma chains are a scalability solution first proposed by Joseph Poon and Vitalik Buterin (co-founder of Ethereum).

Plasma is a Layer 2 scalability solution that offloads transactions to a Layer 2 sidechain (or “child chain”) and periodically submits newly created blocks back to the Ethereum mainnet. Plasma creates blocks through consensus mechanisms, similar to sidechains, but posts block roots to the mainchain, which act as a security layer. 

Similar to ZK-Rollups, plasma chain transaction costs are lower than on the mainchain. They also use fraud proofs to secure the plasma chain. These sets of checks and balances allow users to challenge the validity of their funds on the mainchain, creating comparable security to that of rollups.

ZK-Rollups and plasma chains both scale Ethereum by moving transactions off the mainchain to a Layer 2 sidechain. However, the fundamental difference is that ZK-Rollups group hundreds of transfers into a single transaction, which is validated with a ZK-proof on the Ethereum mainnet, whereas plasma chains create and submit one transaction per transfer.

Plasma’s scalability is limited by the high amount of data requirements on the mainnet for validating blocks when users want to withdraw from the sidechain. Furthermore, the challenge period is lengthy, and users must stay online — or forfeit their rewards. ZK-Rollups are more user-friendly, utilizing fewer resources and making them a more promising Ethereum scaling solution than plasma for most use cases. 

Plasma is designed to interact and communicate as rarely as possible with the mainframe. This has caused some data unavailability errors. When this occurs, it has to be determined whether the ledger is correct and the operator is trustworthy. Some plasma implementations hold votes among governance token holders to resolve this issue. This differs from the assumed trusted state of rollups, which rely on the “one in n” rule to validate authenticity.

One major upside to plasma and rollups is that even if the exchange running the scaling solution is down, funds can be withdrawn because of the fraud proofs on the main public ledger.

ZK-Rollups vs. State Channels

State channels are scaling solutions that allow two or more parties to transact securely off the Ethereum blockchain. The parties involved interact without recourse to the mainchain by sending state updates between themselves.

When any of the parties decide to stop using the channels, they initiate an “exit” — that is, they submit the last state updates to the mainchain, and the current balances are transferred to the parties that started the channel. The mainchain validates this current state by verifying final balances and signatures, making it challenging for anyone to exit from an invalid state.

But there’s a drawback: The mainchain has no way of knowing if another transaction has been added to the previous ones after the last state updates have been submitted. A way around this is to allow a period for any of the parties to challenge the exit. To eliminate the extended wait times to withdraw to the mainchain, parties involved in the transaction can sign a “conclusion proof” which allows a party to exit without waiting for the challenge period to elapse.

State channels have the advantage of allowing transactions between two parties without involving a third party, unlike ZK-Rollups, where a rollup operator must process all transactions. 

Another difference between state channels and ZK-Rollups is that state channels have immediate finality: The state is final once the counterparty confirms that an update was received (i.e., the transfer of values is instant).

Best ZK-Rollup Coins to Know

Zero-knowledge rollups hold significant potential as an ideal scalability solution for Ethereum.

Therefore, to take advantage of this fast-developing technology, here’s a list of protocols that implement ZK-Rollups and their coins.

Loopring (LRC)

The Loopring network is a ZK-Rollup-powered project that enables developers to create exchanges or DEXs with fast settlement for traders on the Ethereum network. Loopring DEXs offer low-cost trading and payment on the Ethereum blockchain, leveraging the high-throughput advantage of ZK proofs.

ZK-Rollups enable Loopring DEXs to take settlement computation off-chain, rather than settling directly on the Ethereum blockchain like other exchanges. This slashes the number of transactions submitted to the Ethereum network, easing congestion, increasing speed and reducing trading costs.

LRC is the native utility token of the Loopring network. Traders pay in LRC when processing each trade. On Loopring, 80% of the funds are sent to the liquidity providers, and the balance is shared between insurers and Loopring’s DAO.

The LRC price could be affected by the performance of the Ethereum network. As transactions on Ethereum increase, slowing down the network and driving fees higher, more users will favor scalability solutions such as Loopring.

Immutable X (IMX)

Immutable X is a Layer 2 scaling solution for non-fungible tokens (NFTs) on Ethereum. It uses ZK-Rollups to scale up instant trading, and to eliminate gas fees for NFT minting and trading, without sacrificing the security of users and assets.

IMX is the native utility token of the Immutable X protocol. Users can earn IMX by trading and carrying out other activities on the network. IMX can be used to pay fees, to stake on the protocol, or as a governance token.

Immutable X stands at the intersection of three popular narratives in the crypto space —

NFTs, ZK-Rollups and Gaming ― making it a promising asset worth considering. Furthermore, because its zero gas fees for trading NFTs attract more developers to the platform, Immutable X is primed for substantial growth.

Polygon (MATIC)

Polygon network is a ZK-Rollup-based protocol for building and connecting Ethereum-compatible blockchain networks. It allows developers to build DApps which combine the high-security features of Ethereum with the low gas fees and scalability of Polygon Network.

MATIC is the native token powering the Polygon Network. It’s used to pay transaction fees, and can also be staked in the PoS consensus to earn passive income. Users can earn MATIC by providing resources for transaction validation and executing smart contracts on the network.

The main reason to keep an eye on MATIC is the rapid growth of the Polygon network, with more interoperable projects launching on it. Also, Polygon has recently acquired the Ethereum scaling startup Mir Protocol for $400 million. Mir Protocol boasts the fastest and most advanced ZK-proof technology, called Plonky2, which was designed to generate proof faster and to verify more transactions in one proof.

This is the second major acquisition by Polygon, having previously bought ZK-Rollup Hermez Network (now Polygon Hermez) for $250 million.

Syscoin (SYS)

Syscoin is a PoW blockchain that combines Layer 1 and Layer 2 elements to create a platform for the development of Web 3.0 DApps. It combines the high security of Bitcoin and the DApp capabilities of Ethereum (using a ZK-Rollup scaling solution) to create fast and secure DeFi products. The Syscoin project aims to create a platform for organizations to utilize distributed ledger technology with high security, low cost and high scalability.

Syscoin’s native token, SYS, is used to pay network fees, collateralize a masternode for rewards and participate in governance. Users can also create a custom asset token, Syscoin Platform Token (SPT), which uses the Syscoin Token platform. Both Bitcoin and SYS can be mined simultaneously in a process known as merge-mining.

There’s every reason to be bullish about Syscoin in 2022. The Syscoin network offers various applications in Web 3.0, NFTs and the metaverse, and an increasing number of projects are launching on the platform. With the ZK-Rollups scaling solution promising throughput of 210,000 TPS, the Syscoin network will increasingly handle more transactions at very low fees.

ZKSwap (ZKS)

ZKSwap is a decentralized exchange (DEX) protocol built on the automated market maker (AMM) model. It’s the first DEX to implement a Layer 2 scaling solution based on ZK-Rollup technology which promises security and high scalability. Using ZK-Rollup technology, ZKSwap lessens the load on the main Ethereum network and offers better security, lower cost, higher TPS and privacy for traders.

The ZKSwap network is powered by ZKS, its native ERC20 token. ZKS is used to reward users for community mining, transaction verifications and other pro-network tasks. ZKS holders can vote for token listings and also govern the network.

There are great plans ahead for ZKSwap: Proposed Layer 2 lending and stable currency exchange services are in the works. ZKSwap is also developing a general EVM model which is based on ZK-Rollups.

ZKSwap partners with popular DEXs, such as MXC, Huobi, DODO and DeFiBox, and is working to integrate more protocols in the near future.

The Bottom Line

With its increasing popularity, the Ethereum network is still facing scalability challenges as more projects launch. Expectedly, Layer 2 solutions are only going to become more relevant. In this space, ZK-Rollups with breakthrough zero-knowledge-proof technology offer significant advantages in TPS, gas fees, security, privacy and scalability. Even better, ZK-Rollups and ZK-proof technology are relatively nascent, and more technological advances are to be expected in this field.