visit
Since the launch of the Ethereum Mainnet, various Layer 2 scaling solutions have been proposed and implemented. While all offer different trade-offs, ZK Rollup has emerged as the most preferred solution due to its many benefits.
In this article, I will discuss rollups, zk rollups, and optimistic rollups.
Roll-up is an Ethereum layer 2 solution that performs transaction execution outside the mainnet (Off-chain) and then posts final transaction data on the mainnet chain.
The primary layer two scaling options for Ethereum right now are rollups. Compared to layer 1, rollups allow users to minimize to 100 times.
With everyone in the rollup sharing the L1 transaction fees, each user will pay less.
The security of Ethereum is passed on to rollups by putting transaction data onto layer 1.
Optimism and zero-knowledge rollup methods differ principally in how this transaction data is posted to Layer one.
There are two different approaches to rollups: optimistic and zero-knowledge — they differ primarily on how this transaction data is posted to L1.
A real-life Example of the rollup.
Imagine you have your dad, mum, and two sisters in the village, and you want to send them a mail separately.
Each letter costs ten dollars to ship
Scenario 1:
Put the letters in a separate envelope and pay the shipping for five different letters.
Scenario 2:
Put all the letters in one big envelope and pay for one shipping.
It’s cheaper and faster to use scenario two than one. Rollups work exactly like scenario two.
ZK Rollup is a Layer 2 scaling solution for Ethereum that utilizes zero-knowledge cryptography by increasing throughput on Ethereum Mainnet by moving computation and state storage off-chain. It allows for creating Rollups, immutable data structures that can batch and compress multiple transactions into a single transaction. This results in a reduction of data size, which leads to lower fees and faster transaction times.
Each batch of transactions comes with a cryptographic proof (SNARK) verified by an Ethereum smart contract. This way, all Ethereum full nodes fully verify every single transaction before a block is finalized.
The full meaning of Zksnark is:
Zero knowledge succinct non-interactive argument of knowledge roll up.
A zk-SNARK is a cryptographic proof allowing one party to prove it possesses certain information without revealing it.
When a node executes a transaction outside of Ethereum, it submits a zero-knowledge proof to prove the correctness of off-chain execution. This proof (called validity proof ) guarantees that a transaction is valid, allowing Ethereum to apply the result to its state — without waiting for anyone to dispute it.
A Real-life Example of the rollup:
Assume you work for a company like Google. Where they use their email address to differentiate their workers. Example: [email protected] shows I work for Google and not [email protected].
So, the system will give me access whenever I want to log into my email account. Because it recognizes the email.
This assumes all transaction is valid by default except and approves them to the main Ethereum chain. It uses fraud-proof only when the transaction is challenged. The validators will fact-check the transaction, and if found fishy the transaction is reverted, and the block validator is slashed.
Slashed: This is a technical term in Ethereum, meaning whoever validated that block will lose some of their tokens.
A real-life example of optimistic rollup:
A school that uses ID cards only gives gate access to those with valid ID cards. If one security officer suspects that one of the pupils has an invalid ID card, he will check him. If the pupil is found guilty, he will be expelled from school. In addition, the salary of the security guard who allowed the invalid ID card pupil to enter the school will be cut.
The main objective of scalability is to boost transaction throughput (the number of transactions per second) and transaction speed (faster finality) without compromising security or decentralization.
ZK Rollups are the most secure scaling options available. This is because they obtain L1's security as their own. Other scaling solutions, however, rely on third parties. As a result, they offer much poorer security characteristics.
However, Ethereum enjoys data availability access from zkrollup; This data is essential because Ethereum's security depends on full nodes having access to block data.
Despite being efficient and secure, creating Dapps takes a lot of work because of the following points.
In a nutshell, zkrollup is developer-unfriendly.
Many projects currently use Zero-knowledge rollups (ZK-rollups) on Mainnet, including DeFi protocols such as Zksync, Zkspace, and Aztec. In addition, many other projects are in the process of implementing ZK Rollup on Mainnet.