Looking for other articles?

ZK Rollups : An explanation of layer-2 scaling solution on Ethereum

ZK Rollups : An explanation of layer-2 scaling solution on Ethereum

February 28, 2023

ZK Rollups or Zero-Knowledge Rollups is one of the layer-2 scaling solutions on Ethereum that try to solve network congestion by processing thousands of transactions at once off-chain before submitting to Ethereum mainnet which is called “Rollups”. In this article, we will explain everything in the simplest way that you need to know about this type of layer-2 and how it works.


What is ZK Rollups and How does it work ?

What is ZK Rollups ?

ZK Rollups rely on Zero-Knowledge proof concept which is a Rollups layer-2 scaling solution built on top of layer-1 blockchain network such as Ethereum to become a scalability solution to solve congestion of network which is one of critical problems on layer-1 network and this problem is the cause of high gas fee and slow user’s transaction validation. Highlight features of layer-2 solution help users pay gas fees cheaper and validate their transactions faster.

ZK Rollups process by rolling thousands of transactions into a single transaction to validate them off-chain and use validity proofs to prove if transactions are valid or not before submitting these rolled transactions to a main network like Ethereum. Their computational mechanism reduces shared data which means they focus on privacy as a core value.

Compare speed of transactions between layer-1 and ZK layer-2

ZK Rollups have been proposed by Barry Whitehat on GitHub since 2018. Nowaday, There are a number of projects that implement these techniques in production which we will mention later. 

How does ZK Rollups work ?

ZK Rollups have been designed by using two smart contracts. First contract has been used for storing all rolled transactions. This contract also compares the blockchain‘s state to determine user’s withdrawal and deposits as well. Second contract is used to validate those transitions in block by using Zero-Knowledge Proof concept.

The Zero Knowledge Proof concept is you know something without revealing nothing to anyone. For instance, you want to make a trust between you and your friend by guessing the color of the cards from 52 in total which you pick Ace Spade in this case. With the ZK concept, you have to tell your friends that you have a Black card without revealing your card that you held. So, what is your solution ?

The solution in this article could be separating the left card in the deck into two sub-decks which you need to classify into two colors : Black and Red. After this step, show your friends the Red’s deck and make it countable by showing them all one by one to make sure that all Red’s deck have 26 cards. This solution would help your friends know that the Black’s deck has 25 cards left without the card you held. That means you hold Black card!

With the instance above, your friends can confidently agree that you have a Black Card which is the correct result. That is the essence of Zero-Knowledge Proof.

It works all computation off-chain in the first stage (not on Ethereum). This stage helps Ethereum mainnet to reduce network’s workload which is the effect of network congestion. Like Ethereum Virtual Machine (EVM), ZK Rollups also have their virtual machine named ZK Virtual Machine which is the software that is used to run smart contracts.

As we mentioned above, these rollups processed thousands of transactions at once and validated them off-chain before submitting them to Ethereum by a mechanism called “Validity Proof” which helps to prevent fraud without manual intervention that makes the confirmation process much faster and scalable. 

How does ZK Rollups help Ethereum ?

The Rollups technique is divided into two types : Optimistic and ZK and both of them do the same job by reducing the gas and making transactions faster. By the way, Vitalik Buterin – Founder of Ethereum have some words at ETH Seoul Event about layer-2 scaling solution and said “My opinion is that in the long run, ZK-Rollup will eventually beat Optimistic Rollup because they have basic advantages like users don’t need to wait 7 days for a withdrawal” which mean he strongly believes that ZK will outperform someday but not today.

ZK Rollups will help main networks like Ethereum be scalable into retail because Ethereum network has so many problems such as gas fees and slow confirmation process even Ethereum has already upgraded itself into Proof-of-Stake but those problems have not been eliminated and layer-2 was built to solve this problem to help people access Blockchain network more comfortably.

Top ZK Rollups Projects 2023

Logo each projects recently which is using ZK Rollups

  1. zkSync

zkSync is a layer-2 Blockchain on Ethereum that uses ZK Rollups as a scaling technology to scale Ethereum while ensuring privacy and security.

  1. ​​Aztec Network

Aztec Network is an open source layer-2 project that aims to bring privacy and scalability on DeFi for Ethereum by using ZK Rollups that keep user’s transactions private across public blockchain.

  1. dYdX

dYdX is a DeFi trading platform that aims to support the ultimate growth in the futures of DeFi. To prepare for that growth, dYdX moved itself from dApps in layer-1 on Ethereum to layer-2 via StarkWare (zkSTARKS) which helped to increase dYdX’s trade capacity.

  1. ImmutableX

ImmutableX is a layer-2 scaling solution for NFTs on Ethereum by offering near-zero gas fees for minting and trading NFTs.

  1. Loopring

Loopring is a layer-2 scaling solution using ZK Rollups. Loopring is protocol for building Decentralized Exchange (DEXs) and Payment. Loopring has its own product called Loopring Exchange which claims that it is the first ZK Rollup exchange.

Pros and Cons of ZK Rollups

Pros

  • Users can withdraw funds without a delay
  • Don’t have to validate the chain the protect their funds
  • Reduce cost to call data which help users minimize their fees
  • Relies on trustless cryptographic mechanisms for security makes user’s transactions finality more faster than any layer-2 solution
  • Validity proof helps to ensure transactions off-chain and prevent other invalid state of transition

Cons

  • The cost of computing and verifying can increase user’s fees.
  • State of building EVM ZK Rollups is too difficult.
  • Validity proof needs specialized hardware which causes centralized control in a few parties.
  • Sequencers have the power on ordering the transactions.
  • Hardware requirements could increase the risk of operators that freeze the rollup’s state,  censoring users and breaking the ZK Rollups security model.

Docs

Technology

Campaign

Articles

About

Community

TwitterTelegramDiscordFacebookYoutubeMedium

v1.1.57

© 2024 FWX