blog

Beyond Privacy: The Scalability Benefits of ZKPs

Category: Blockchain Explained

Beyond Privacy: The Scalability Benefits of ZKPs

POSTED BY: Rob Behnke

Invalid date

Zero-knowledge proofs (ZKPs) are widely known for their privacy benefits. They can prove that something is true without revealing the details of that secret.

This capability has numerous benefits and applications for the blockchain, where everything on the distributed ledger is publicly visible. For example, privacy coins like Monero use ZKPs to prove that transactions are valid while concealing the details of the transaction.

However, the benefits of ZKPs are not limited to privacy. ZKPs can also enhance the scalability of blockchain protocols, as demonstrated by ZK-Rollups such as zkSync, developed by Matter Labs. By leveraging the power of ZKPs, these ZK-Rollups dramatically improve the scalability, throughput, and efficiency of Layer-1 blockchains like Ethereum.

Merkle Trees and Merkle Proofs

ZKPs are useful for scalability since the proof itself can be used as a replacement for the data that it validates. If the proof is smaller than the corresponding data, then using a ZKP reduces the amount of data stored on the blockchain. With many blockchains like Ethereum struggling with scalability, ZKPs offer a potential solution.

One simple example of how a ZKP can offer scalability benefits is Merkle proofs. A Merkle tree is a data structure used to securely and succinctly summarize several pieces of data into a single hash value. An example of a Merkle Tree is shown below:

Merkle Tree

(source: Wikipedia)


In this image, the data to be summarized is shown at the bottom (labeled L1-L4). Above it, each node in the tree contains the hash value of its child(ren). For example, Hash 0-0 contains the hash of L1, and Hash 0 contains the hash of the combined Hash 0-0 and Hash 0-1.

Since hash functions are collision-resistant, it is infeasible to find two different inputs that produce the same hash value. Therefore, you can’t find two different sets of children of a node that produce the same hash value or two Merkle trees of the same size with the same root hash.

Blockchain technology uses Merkle trees to summarize the contents of a block in the block header. Every header contains the root hash of a Merkle tree containing all of the transactions in the block. Since the block header is protected by blockchain immutability, so are the transactions it contains. This is true even though the transaction data isn’t contained in the block header itself.

A Merkle proof is a type of ZKP that proves that a particular transaction is contained within a block without revealing all of the other transactions in the block. Given the data of the transaction in question and a few node values from the Merkle tree, a user can regenerate the root hash of the tree. For example, in the image above, knowledge of L1, Hash 0-1, and Hash 1 is enough to regenerate the root hash value.

They can then compare this calculated root hash to the one included in a block header. If they match, then the transaction must be a part of the block in question. 

While these proofs are useful for preserving privacy, they also have scalability benefits. A Merkle proof is much smaller than the complete contents of a block. If a user only wants to know if a block contains a particular transaction (a common request from light nodes), requesting a Merkle proof instead of the entire block is more efficient and scalable.

ZKPs Enable ZK-Rollups

Merkle proofs are an example of a ZKP that takes advantage of the Merkle tree data structure. They are useful for one purpose — proving that a transaction is contained within the Merkle tree — and not much else.

More sophisticated ZKPs exist that are capable of doing much more. SNARKs and STARKs are the most commonly-used ZKP technologies in blockchain. These can be used to generate a much wider range of potential proofs. They’re also the underlying technology behind ZK-Rollups, one of blockchain’s most promising Layer-2 scaling solutions.

A ZK-Rollup allows users to perform transactions off-chain, reducing the load on Layer-1 blockchains and improving transaction speeds. Periodically, the rollup will create a bundle of transactions to record on the Layer-1 blockchain. After executing these transactions, it will generate a state update that reflects the effects of performing all of them.

Unlike Optimistic Rollups — another form of Rollup — ZK-Rollups will include a ZKP proving the correctness of this state update. Essentially, it demonstrates that a set of valid transactions — i.e. the set of transactions in the bundle — exists that produces the provided state update.

After the ZKP has been generated and validated, it can serve as a complete replacement for the transaction data on the Layer-1 blockchain. Anyone wanting to validate the ZK-Rollup’s state update can do so using the provided ZKP rather than independently executing and validating the off-chain transactions that went into it.

In general, a ZKP for a ZK-Rollup is significantly smaller than the corresponding set of off-chain transactions. By replacing this transaction data with the ZKP on-chain, ZK-Rollups reduce the amount of data written to the digital ledger — decreasing gas fees and improving throughput — and enhance efficiency by eliminating the need for off-chain transactions to be executed and validated on Layer 1.

Conclusion

ZKPs are lauded for their potential benefits for privacy on the blockchain. Often, the need to validate the correctness of all blockchain transactions negatively impacts privacy since everything is visible on-chain. ZKPs offer the potential to perform transactions while keeping the source, destination, and content of transactions secret.

However, this isn’t all that ZKPs are good for, as demonstrated by ZK-Rollups like zkSync. For these Layer-2 protocols, privacy isn’t a priority. The transactions performed on the rollup platform are publicly visible and validated.

The benefit of ZKPs in this case is that they are able to dramatically shrink the volume of data needed to validate a transaction on a Layer-1 blockchain. By reducing this footprint, ZK-Rollups dramatically improve the scalability, efficiency, and throughput of Layer-1 protocols.

This use of ZKPs is what makes ZK-Rollups so powerful. To further explore the benefits of ZKPs for rollups, check out our blog article comparing ZK-Rollups to Optimistic Rollups.

© Halborn 2025. All rights reserved.