The early days of blockchain were filled with excitement. However, as more people started using it and transaction volumes shot up, a significant issue emerged: scalability. Alongside scalability issues were others like security and decentralization. This challenge known as the “blockchain trilemma”, suggests that it is difficult to achieve all three attributes simultaneously.
Bitcoin, the first blockchain, could only handle a few transactions per second, and Ethereum wasn’t much better. This led to a demand for solutions that could increase blockchain’s scalabilty.
This demand birthed ZK Proofs.
“Zero-knowledge” was first introduced in a 1985 paper by Shafi Goldwasser, Silvio Micali, and Charles Rackoff titled “The knowledge complexity of interactive proof systems,” This paper explained zero-knowledge proofs, long before cryptocurrencies came into existence.
According to the paper,
A zero-knowledge proof is a way for one party (the prover) to prove to another party (the verifier) that a statement is true, without revealing any additional information other than the truth of that specific statement.
In other words, zero-knowledge principles ensure that no extra knowledge is transferred from the prover to the verifier apart from the statement being true.
A classic analogy to explain the concept of ZK Proofs is “Ali Baba’s Cave”:
Scenario: There’s a cave with two paths, A and B, that form a loop and meet at a locked door. Jane (the prover) knows the secret code to open the door, and Paul (the verifier) wants to be convinced that Jane knows the code without learning the code himself.
Process:
Jane enters the cave and randomly chooses either path A or B.
Paul waits outside, not knowing which path Jane took.
Source: Mighty Block
Paul then enters the cave and calls out the path he wants Jane to return by (either A or B).
If Jane knows the code, she can open the door and return via the chosen path.
This process (1–5) is repeated multiple times to ensure that Jane isn’t just guessing correctly by chance.
If after many repetitions Jane consistently returns via the correct path, Paul can be confident that Jane knows the code without ever having learned the code himself.
ZK Proofs aim to ensure privacy and security, keeping sensitive information private while still allowing others to verify its authenticity. In simpler terms, ZK Proofs help keep important data safe while proving that it’s legit, without revealing the details.
The concept of ZK Proofs has also birthed the development of various advanced cryptographic techniques and applications such as ZK Rollups and ZK Compressions.
In 2018, an anonymous Barry Whitehat uploaded a GitHub repository called “roll_up,” which introduced the idea of rollups. Soon after, Ethereum’s creator, Vitalik Buterin, took this concept further and came up with zk-Rollups.
Zk-Rollups, short for zero-knowledge rollups, are layer-2 scaling solutions designed to boost Ethereum’s mainnet performance by scaling it up. They do this by moving computation and state storage off-chain.
Layer-2 is a secondary protocol built on top of a blockchain to enhance its scalability, speed, and reduce transaction fees.
On June 21, Light Protocol, a Solana-based privacy layer, announced that it had teamed up with the Solana development team, Helius Labs, to launch the testnet for their new “ZK Compression” scaling solution as means to significantly reduce on-chain computation costs.
While zk-Rollups and zk-Compression use the power of zero-knowledge proofs to optimize blockchain technology, they serve different purposes and are implemented in different ways.
Regardless, there have been ongoing debates and disses from the Ethereum and Solana communities about which is better.
For instance, an ETH community member called ZK compression “another L2”.
After this response from Mert (CEO of heliuslabs) to the tweet above, the Solana community fired back with a creative diss video targeting Ethereum.
The video featured a doctor treating an “ETH Maximysis” patient. A line from the video stated:
“It’s a common reaction faced by ETH Maxis. They can’t function without another layer. Layer 3! Layer 4!”
The ongoing rivalry between these blockchains is evident. Hence, this article aims to provide a clear and comprehensive comparison of their scalability solutions, highlighting each one’s unique features, differences, and practical use cases.
At its core, ZK Rollups is a layer-2 scaling solution designed to improve the efficiency and scalability of blockchain networks.
The idea is simple: instead of processing each transaction directly on the main blockchain, ZK-Rollups bundle multiple transactions into a single proof. This consolidated proof is then submitted to the blockchain for verification.
Source: Datawallet
This approach significantly increases transaction throughput (the number of transactions the network can handle within a given period) without compromising network security.
To properly grasp this,
Picture yourself organizing a concert. Instead of letting each attendee enter one by one through a narrow gate (the main blockchain), which could cause congestion and delays, you implement a system where groups of attendees are verified together at checkpoints. Each group carries a single ticket that proves everyone in the group has been properly checked and admitted. This way, you maintain security and efficiency by reducing the blockage at the entrance.
ZK Rollups enhances scalability by processing transactions off-chain and securing them with advanced cryptographic techniques like ZK-SNARKs or ZK-STARKs. This ensures that transactions are valid and private, thereby improving overall efficiency and security for users.
zk-SNARKs are zk proofs that provide succinct proofs (i.e. the proof size is short and efficient to verify). They are well-suited for applications where proof size and verification time are critical.
zk-STARKs are zk proofs that allow for larger and more complex proofs, making them suitable for applications like large-scale financial audits, data privacy, and verifying computations.
ZK Rollups is a perfect scaling solution for blockchain networks like Ethereum as they aggregate transactions off-chain into batches, reducing data posted directly to Ethereum.
ZK-rollups leverages cryptographic techniques to aggregate and validate transactions off-chain, thereby improving scalability and reducing costs on the Ethereum blockchain.
Source: Maple Block
Here’s a step-by-step explanation of how ZK-rollups operate:
Here are some of the upsides of ZK Rollups:
While ZK Rollups offer many advantages, they also come with downsides and challenges.
Here are some of the downsides:
New ZK Rollup projects are emerging every day. Here are some of the to ZK-Rollup projects:
Source: Moralis
Projects like Starkware (which develops permissioned and tailor-made scaling L2), Aztec Network (building blockchain encryption using zkSNARKs), Argent (a non-custodial wallet integrated with zkSync) Immutable X (an NFT minting and trading platform) and Loopring (a zk-rollup exchange and payment protocol on Ethereum) all use ZK Rollups.
Here are the different ways ZK Rollups are used:
ZK compression is a primitive, created and launched by Light Protocol and Helius Labs. It reduces on-chain costs by using zero-knowledge proofs and compression to minimize the amount of data stored on-chain and thus the computation demand placed on Solana through transactions.
A primitive is a low-level cryptographic algorithm that is used as a foundation or building block by higher-level cryptographic algorithms.
To better grasp ZK Compression, understanding the unique architecture of Solana and the challenges it faces is important.
Unlike Ethereum, where smart contracts and data are tightly coupled, Solana uses a model where data is stored in separate “accounts.” These accounts range from executable code to token balances.
Everything on Solana is an account.
While this model enables Solana’s high performance and parallel processing, it comes with a cost: validators must keep all active accounts in fast-access memory (RAM), which is expensive.
To prevent abuse and compensate validators, Solana implements a “rent” system where users must lock up SOL tokens to keep their accounts active, with the rent amount directly linked to the stored data’s size.
Source: 0XMert’s 𝕏
As Solana gained popularity, the cost of creating and maintaining these accounts became a significant barrier to scaling and so did the need for a solution — ZK Compression.
With the advent of ZK Compression, the cost of creating new Solana accounts is set to decrease significantly, potentially by “orders of magnitude”.
If something becomes cheaper by “orders of magnitude,” it means the cost or effort involved decreases dramatically, often by ten times or more compared to the previous amount.
This means that the creation of 100 compressed user accounts that hold and track crypto balances (also known as token accounts) will be 5,000 times cheaper than creating 100 regular token accounts.
Think of it this way: Compression involves squeezing something until it occupies less space. ZK compression applies this principle, where ‘ZK’ signifies that the privacy of the compressed data remains uncompromised.
In essence, ZK compression stores only the compressed data’s “fingerprint” (hash) on-chain. This approach reduces storage costs while preserving data privacy.
Contrary to what competitors say, ZK Compression is not a layer-2 chain on Solana; it’s an upgrade to improve Solana’s data storage and drastically reduce costs for developers.
ZK Compression tackles this challenge head-on by allowing developers to compress multiple account states into a single on-chain account.
Source: 0xSumanth’s 𝕏
Here’s how it works:
The key innovation lies in the use of zero-knowledge proofs, specifically SNARKs (Succinct Non-interactive Arguments of Knowledge), to compress the Merkle proofs used in this process.
Source: 0xMert’s 𝕏
This compression reduces the proof size from potentially hundreds of bytes to a constant 128 bytes, regardless of the number of accounts being compressed.
This dramatic reduction in data size enables developers to work within Solana’s transaction size limits while still interacting with multiple compressed accounts in a single transaction.
These are the upsides of ZK Compression to the Solana ecosystem:
These are the downsides of ZK Compression to the Solana:
Here are some possible use cases of zk compression:
Current Use Cases for ZK Rollups
Potential Use Case of ZK Compression
Whether you’re suffering from Eth Maximysis, or you’re a staunch Solana believer like me, what matters most is using the blockchain that suits your needs at the given time.
I find that ZK Rollups are best suited for projects needing high security and benefiting from Ethereum’s established ecosystem as they provide a reliable method to scale Ethereum while preserving its decentralized structure.
On the other hand, with ZK Compression, Solana can handle more transactions without getting bogged down, even when SOL’s price goes up. Therefore, I believe that ZK Compression on Solana is perfect for applications that value speed, performance, and cost-efficiency.
Solana’s ability to support high-performance, cost-efficient decentralized applications (dApps) holds a futuristic appeal because speed and cost are crucial for the widespread adoption of blockchain technology.
In the end, both ZK Rollups and ZK Compression could help make transactions quicker, cheaper, and hence more scalable.
S. Goldwasser, S. Micali, and C. Rackoff, 1985. “The knowledge complexity of interactive proof systems”
The early days of blockchain were filled with excitement. However, as more people started using it and transaction volumes shot up, a significant issue emerged: scalability. Alongside scalability issues were others like security and decentralization. This challenge known as the “blockchain trilemma”, suggests that it is difficult to achieve all three attributes simultaneously.
Bitcoin, the first blockchain, could only handle a few transactions per second, and Ethereum wasn’t much better. This led to a demand for solutions that could increase blockchain’s scalabilty.
This demand birthed ZK Proofs.
“Zero-knowledge” was first introduced in a 1985 paper by Shafi Goldwasser, Silvio Micali, and Charles Rackoff titled “The knowledge complexity of interactive proof systems,” This paper explained zero-knowledge proofs, long before cryptocurrencies came into existence.
According to the paper,
A zero-knowledge proof is a way for one party (the prover) to prove to another party (the verifier) that a statement is true, without revealing any additional information other than the truth of that specific statement.
In other words, zero-knowledge principles ensure that no extra knowledge is transferred from the prover to the verifier apart from the statement being true.
A classic analogy to explain the concept of ZK Proofs is “Ali Baba’s Cave”:
Scenario: There’s a cave with two paths, A and B, that form a loop and meet at a locked door. Jane (the prover) knows the secret code to open the door, and Paul (the verifier) wants to be convinced that Jane knows the code without learning the code himself.
Process:
Jane enters the cave and randomly chooses either path A or B.
Paul waits outside, not knowing which path Jane took.
Source: Mighty Block
Paul then enters the cave and calls out the path he wants Jane to return by (either A or B).
If Jane knows the code, she can open the door and return via the chosen path.
This process (1–5) is repeated multiple times to ensure that Jane isn’t just guessing correctly by chance.
If after many repetitions Jane consistently returns via the correct path, Paul can be confident that Jane knows the code without ever having learned the code himself.
ZK Proofs aim to ensure privacy and security, keeping sensitive information private while still allowing others to verify its authenticity. In simpler terms, ZK Proofs help keep important data safe while proving that it’s legit, without revealing the details.
The concept of ZK Proofs has also birthed the development of various advanced cryptographic techniques and applications such as ZK Rollups and ZK Compressions.
In 2018, an anonymous Barry Whitehat uploaded a GitHub repository called “roll_up,” which introduced the idea of rollups. Soon after, Ethereum’s creator, Vitalik Buterin, took this concept further and came up with zk-Rollups.
Zk-Rollups, short for zero-knowledge rollups, are layer-2 scaling solutions designed to boost Ethereum’s mainnet performance by scaling it up. They do this by moving computation and state storage off-chain.
Layer-2 is a secondary protocol built on top of a blockchain to enhance its scalability, speed, and reduce transaction fees.
On June 21, Light Protocol, a Solana-based privacy layer, announced that it had teamed up with the Solana development team, Helius Labs, to launch the testnet for their new “ZK Compression” scaling solution as means to significantly reduce on-chain computation costs.
While zk-Rollups and zk-Compression use the power of zero-knowledge proofs to optimize blockchain technology, they serve different purposes and are implemented in different ways.
Regardless, there have been ongoing debates and disses from the Ethereum and Solana communities about which is better.
For instance, an ETH community member called ZK compression “another L2”.
After this response from Mert (CEO of heliuslabs) to the tweet above, the Solana community fired back with a creative diss video targeting Ethereum.
The video featured a doctor treating an “ETH Maximysis” patient. A line from the video stated:
“It’s a common reaction faced by ETH Maxis. They can’t function without another layer. Layer 3! Layer 4!”
The ongoing rivalry between these blockchains is evident. Hence, this article aims to provide a clear and comprehensive comparison of their scalability solutions, highlighting each one’s unique features, differences, and practical use cases.
At its core, ZK Rollups is a layer-2 scaling solution designed to improve the efficiency and scalability of blockchain networks.
The idea is simple: instead of processing each transaction directly on the main blockchain, ZK-Rollups bundle multiple transactions into a single proof. This consolidated proof is then submitted to the blockchain for verification.
Source: Datawallet
This approach significantly increases transaction throughput (the number of transactions the network can handle within a given period) without compromising network security.
To properly grasp this,
Picture yourself organizing a concert. Instead of letting each attendee enter one by one through a narrow gate (the main blockchain), which could cause congestion and delays, you implement a system where groups of attendees are verified together at checkpoints. Each group carries a single ticket that proves everyone in the group has been properly checked and admitted. This way, you maintain security and efficiency by reducing the blockage at the entrance.
ZK Rollups enhances scalability by processing transactions off-chain and securing them with advanced cryptographic techniques like ZK-SNARKs or ZK-STARKs. This ensures that transactions are valid and private, thereby improving overall efficiency and security for users.
zk-SNARKs are zk proofs that provide succinct proofs (i.e. the proof size is short and efficient to verify). They are well-suited for applications where proof size and verification time are critical.
zk-STARKs are zk proofs that allow for larger and more complex proofs, making them suitable for applications like large-scale financial audits, data privacy, and verifying computations.
ZK Rollups is a perfect scaling solution for blockchain networks like Ethereum as they aggregate transactions off-chain into batches, reducing data posted directly to Ethereum.
ZK-rollups leverages cryptographic techniques to aggregate and validate transactions off-chain, thereby improving scalability and reducing costs on the Ethereum blockchain.
Source: Maple Block
Here’s a step-by-step explanation of how ZK-rollups operate:
Here are some of the upsides of ZK Rollups:
While ZK Rollups offer many advantages, they also come with downsides and challenges.
Here are some of the downsides:
New ZK Rollup projects are emerging every day. Here are some of the to ZK-Rollup projects:
Source: Moralis
Projects like Starkware (which develops permissioned and tailor-made scaling L2), Aztec Network (building blockchain encryption using zkSNARKs), Argent (a non-custodial wallet integrated with zkSync) Immutable X (an NFT minting and trading platform) and Loopring (a zk-rollup exchange and payment protocol on Ethereum) all use ZK Rollups.
Here are the different ways ZK Rollups are used:
ZK compression is a primitive, created and launched by Light Protocol and Helius Labs. It reduces on-chain costs by using zero-knowledge proofs and compression to minimize the amount of data stored on-chain and thus the computation demand placed on Solana through transactions.
A primitive is a low-level cryptographic algorithm that is used as a foundation or building block by higher-level cryptographic algorithms.
To better grasp ZK Compression, understanding the unique architecture of Solana and the challenges it faces is important.
Unlike Ethereum, where smart contracts and data are tightly coupled, Solana uses a model where data is stored in separate “accounts.” These accounts range from executable code to token balances.
Everything on Solana is an account.
While this model enables Solana’s high performance and parallel processing, it comes with a cost: validators must keep all active accounts in fast-access memory (RAM), which is expensive.
To prevent abuse and compensate validators, Solana implements a “rent” system where users must lock up SOL tokens to keep their accounts active, with the rent amount directly linked to the stored data’s size.
Source: 0XMert’s 𝕏
As Solana gained popularity, the cost of creating and maintaining these accounts became a significant barrier to scaling and so did the need for a solution — ZK Compression.
With the advent of ZK Compression, the cost of creating new Solana accounts is set to decrease significantly, potentially by “orders of magnitude”.
If something becomes cheaper by “orders of magnitude,” it means the cost or effort involved decreases dramatically, often by ten times or more compared to the previous amount.
This means that the creation of 100 compressed user accounts that hold and track crypto balances (also known as token accounts) will be 5,000 times cheaper than creating 100 regular token accounts.
Think of it this way: Compression involves squeezing something until it occupies less space. ZK compression applies this principle, where ‘ZK’ signifies that the privacy of the compressed data remains uncompromised.
In essence, ZK compression stores only the compressed data’s “fingerprint” (hash) on-chain. This approach reduces storage costs while preserving data privacy.
Contrary to what competitors say, ZK Compression is not a layer-2 chain on Solana; it’s an upgrade to improve Solana’s data storage and drastically reduce costs for developers.
ZK Compression tackles this challenge head-on by allowing developers to compress multiple account states into a single on-chain account.
Source: 0xSumanth’s 𝕏
Here’s how it works:
The key innovation lies in the use of zero-knowledge proofs, specifically SNARKs (Succinct Non-interactive Arguments of Knowledge), to compress the Merkle proofs used in this process.
Source: 0xMert’s 𝕏
This compression reduces the proof size from potentially hundreds of bytes to a constant 128 bytes, regardless of the number of accounts being compressed.
This dramatic reduction in data size enables developers to work within Solana’s transaction size limits while still interacting with multiple compressed accounts in a single transaction.
These are the upsides of ZK Compression to the Solana ecosystem:
These are the downsides of ZK Compression to the Solana:
Here are some possible use cases of zk compression:
Current Use Cases for ZK Rollups
Potential Use Case of ZK Compression
Whether you’re suffering from Eth Maximysis, or you’re a staunch Solana believer like me, what matters most is using the blockchain that suits your needs at the given time.
I find that ZK Rollups are best suited for projects needing high security and benefiting from Ethereum’s established ecosystem as they provide a reliable method to scale Ethereum while preserving its decentralized structure.
On the other hand, with ZK Compression, Solana can handle more transactions without getting bogged down, even when SOL’s price goes up. Therefore, I believe that ZK Compression on Solana is perfect for applications that value speed, performance, and cost-efficiency.
Solana’s ability to support high-performance, cost-efficient decentralized applications (dApps) holds a futuristic appeal because speed and cost are crucial for the widespread adoption of blockchain technology.
In the end, both ZK Rollups and ZK Compression could help make transactions quicker, cheaper, and hence more scalable.
S. Goldwasser, S. Micali, and C. Rackoff, 1985. “The knowledge complexity of interactive proof systems”