What are zk-Rollups?
Blockchain technology has gained widespread adoption in recent years, with an increasing number of businesses reaping its benefits. However, scalability, high fees, and transaction processing speed problems have been a barrier to further adoption.
This is where the rollup technologies come into play. Rollups are layer-2 solutions that help in making blockchains highly scalable, fast, and cheap to use. They achieve this by combining both on and off-chain techniques to operate.
Technically, rollups such as zero-knowledge rollups operate by moving computation and state storage into off-chain networks while storing funds and transaction data on-chain. Whereas traditional layer-1 smart contract blockchains such as Ethereum rely on on-chain processes alone to carry out all these functions, resulting in network congestion and high gas.
One of the most widely used rollups in the blockchain space is the zero-knowledge rollups, commonly called zk-Rollups.
In this article, we will look at what zk-rollups are, how they work, and why they are so important for blockchain technology’s future.
Zero-Knowledge Rollups (Zk-rollups) Explained-
ZK-Rollups — built particularly for the Ethereum blockchain — are hybrid layer-2 scaling solutions that function by performing computations and state-storage off-chain, keeping only transaction data on-chain. Their core architecture is made up of on-chain smart contracts and an off-chain virtual machine.
They are independent off-chain protocols that run on top of Ethereum, functioning by the utilization of on-chain Ethereum smart contracts. Thus, Ethereum serves as the settlement and base layer (Layer-1) for the ZK-Rollup. Notably, they are built to execute transactions outside of the Ethereum mainnet.
In other words, zero-knowledge rollups are smart contracts written to compress or roll up thousands of transactions from the Ethereum mainnet into batches for off-chain execution. They then return minimal summary data and validity proofs of processed transactions to the mainnet.
This means that ZK-rollups only need to provide validity proofs to finalize transactions on Ethereum rather than posting all transaction data on-chain.
Concepts of ZK-Rollups
Instead of sending each transaction individually to the Ethereum mainnet, ZK-rollup operators submit a summary of the changes needed to represent all of the transactions in a batch. They also provide validity proofs to show that their modifications are correct.
What is validity proof? It is an innovation that allows parties to prove the correctness of a statement without revealing the statement itself.
ZK-rollups use validity proofs to confirm the correctness of off-chain state transitions without having to re-execute transactions on Ethereum. These proofs affirm that the proposed changes to Ethereum’s state are the result of executing all of the batch’s transactions.
To note, validity proofs can come in the form of a ZK-SNARK or ZK-STARK. The former stands for Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) while the latter represents Zero-Knowledge Scalable Transparent Argument of Knowledge.
Transactions are written to Ethereum as calldata by ZK-Rollups because it is a cheap way to store data on-chain and does not affect Ethereum’s state. The term ‘calldata’ is used to represent where data from external calls to smart contract functions are stored.
By using compression techniques, ZK-rollups are able to reduce transaction data and help users save money. For example, this scaling solution represents accounts using an index rather than an address. Accordingly, 28 bytes of data is saved.
On the whole, ZK-Rollups work by combining hundreds of off-chain transaction data into a single transaction. They make use of their independent off-chain Virtual Machine (not EVM) for computations. Thus, the off-chain Virtual Machine serves as both the execution environment for transactions on the ZK-rollup and the secondary layer (layer-2) for the ZK-rollup protocol.
Why are zk-Rollups important?
Though the most popular and largest smart contract platform, Ethereum has many drawbacks including high transaction costs and slow transaction processing speed.
Its historic transition from proof-of-work (PoW) to proof-of-stake (PoW) in September 2022 still could not improve its scalability significantly.
However, zk-Rollups have grown to become very popular today in the blockchain space because they offer solutions to these pressing problems associated with Ethereum.
By reducing congestion on the Ethereum mainnet, zk-rollups increase the processing speed of transactions on the network. Ethereum network speed is also improved since zk-rollups ensure that there is no backlog of transaction data.
The layer-2 solution further helps to reduce transaction costs (or gas fees) for. users and developers. This is achieved by ensuring that fewer computing and storage resources are contained on the Ethereum mainnet. As mentioned, zk-Rollups combine thousands of transactions into batches that are executed off-chain.
More so, when transferring funds from a zero-knowledge rollup chain to the Ethereum mainnet, it is swift. This speed stems from the fact that exit transactions are executed once the ZK-rollup contract verifies the validity proof. This is unlike the Optimistic rollups, where funds withdrawal is usually delayed because of fault-proof checks.
Thus, this zk-rollup technology is becoming increasingly adopted by users and developers as they rely on Ethereum for security, data availability, censorship resistance, and transaction finality.
Top Zk-Rollup Projects
Below are some of the available zk-rollup projects you should know:
Otherwise called Plonky2, Polygon Zero is one of the zk-rollup scaling solutions or proof systems launched by Polygon to achieve Ethereum scaling without compromising the chain’s security and decentralization.
Launched in January 2022, Plonky2 adopts the less resource-intensive recursive SNARK approach for generating zero-knowledge proofs which makes it 100x faster than existing alternatives. It is natively compatible with Ethereum and can generate proofs in only 0.17 seconds. Also, Plonky2 allows users to speed up proving times for proofs that don’t involve recursion.
This is the first layer-2 scaling solution for non-fungible tokens (NFTs) on Ethereum. Immutable X is a zk-rollup protocol that offers massive scalability and zero gas fees for minting and trading NFTs on the Ethereum network, all without tampering with the security of users’ digital collectibles.
Founded in 2018 by James Ferguson, Alex Connolly, and Robbie Ferguson, Immutable X is the most technically advanced solution for NFT scaling ever built, developed with StarkWare’s powerful STARK prover and rollup technology. To achieve its unique functions, the platform combines NFT-specific exchange and proof logic with the cutting-edge rollup technology developed by StarkWare to create the most advanced tool for trading NFTs.
This is another popular layer-2 protocol that uses zero-knowledge technology to make the PoS-based Ethereum blockchain scalable and also increase the network’s throughput. In other words, zkSync is a ZK-rollup and a trustless protocol that uses cryptographic validity proofs to provide low-cost transactions on Ethereum while ensuring that transactions are completed at a fast speed.
As in all zk-Rollups, computation is performed off-chain in zkSync with most data stored off-chain too. The layer-2 scaling solution is designed such that users enjoy the same security level as in Ethereum as all transactions are proven on the Ethereum mainnet.
zkEVM stands for zero-knowledge Ethereum Virtual Machine. This layer-2 scaling solution enables developers to execute arbitrary transactions, including smart contracts off-chain rapidly and at low cost while storing all proofs and data provenance on Ethereum.
Polygon, the leading blockchain development platform, offering scalable, affordable, secure, and sustainable blockchains for Web3 launched this layer-2 Ethereum scaling solution in July 2020. Accordingly, the Polygon zero-knowledge Ethereum Virtual Machine which harnesses the zero-knowledge proof innovation is said to be the first Ethereum-equivalent scaling solution that is compatible with all existing smart contracts, developer tools, and wallets.
More so, Polygon zkEVM is equivalent to the Ethereum Virtual Machine itself and it is designed to benefit from all the features and functionalities of the Ethereum blockchain.