From Zero to Hero in Zero Knowledge Proofs [Part 5]

Hira Siddiqui
Coinmonks
Published in
5 min readDec 16, 2023

--

This is the fifth part of the series that takes you from absolute ground zero in ZKPs to a fairly advanced level. We will start from the absolute basics and then move onward and upward. Subscribe to get regular updates!

If you are reading until now, great job! This means you are really interested in learning more about ZKPs. But what exactly can you do with it and why should you continue learning more? Today, we will discuss some use cases of Zero-knowledge proofs and uncover what they can be used for in blockchain space.

Applications of zero-knowledge proofs in blockchain

Zero-knowledge proofs (ZKPs) enable multiple applications and use cases in the blockchain field. We will discuss some of these use cases here:

Privacy-preserving cryptocurrencies

ZKPs play a vital role in enabling privacy-preserving cryptocurrencies by making the following features possible:

  • Shielding transaction details: ZKPs can hide transaction details, such as the sender, recipient, and transaction amount while proving the transaction’s validity.
  • Confidentiality of balances: ZKPs allow users to demonstrate ownership of a certain balance or fulfill specific criteria without revealing their balance.
  • Auditing and verification: ZKPs can be used for auditing and verifying transactions. For instance, they can be used to prove that a transaction is valid and consistent with the cryptocurrency’s rules and protocols, without exposing the specific details of the transaction.

Examples of such cryptocurrencies are ZCash and Monero.

Storage

Storage is expensive on blockchain but required in many applications.

For example, in Non-Fungible Tokens (NFTs), every NFT has an associated media file (image or video). This media file can become very expensive to store directly on the blockchain. Therefore, blockchain developers use off-chain storage solutions for this.

ZKPs are used in these off-chain storage solutions to ensure data integrity, privacy, efficient deduplication, access control, and verifiability. These features contribute to building trust and security in decentralized storage networks while empowering users to control their data and maintain their privacy.

Usage of ZKPs in Filecoin

One example of such a decentralized storage solution is Filecoin, in which each node storing the data uses ZKPs for proof of Replication i.e., to prove that it is storing a physically unique copy of the data. It also uses ZKPs for Proof of Spacetime to repeatedly prove that the node is dedicating storage space for this data. For both proofs, a zk protocol called zkSNARKS is used.

Proof of replication in filecoin

Self-sovereign identity

Self-Sovereign Identity (SSI) is an upcoming concept of identification of individuals in a decentralized manner, allowing individuals full control over their personal data and identity information. Zero Knowledge Proofs enable the concept of SSI and allow users to prove ownership or possession of certain credentials without relying on a central authority or disclosing unnecessary information. This empowers individuals to manage and control their identity while minimizing the risks associated with centralized identity systems. Some examples of such self-sovereign identity platforms are Polygon ID and Hyperledger Aries.

Blockchain scalability: zk-rollups

ZKPs can contribute to enhancing blockchain scalability by reducing the computational and storage requirements for verifying transactions.

ZKPs can utilize Merkle trees and cryptographic commitments to represent a batch of transactions in a compact and verifiable form. By constructing a Merkle tree of commitments to transactions, it is possible to provide a succinct proof of inclusion without revealing the specific details of each transaction. This reduces the amount of data that needs to be processed and stored, leading to improved scalability.

Merkle Trees are used to compact information

ZKPs can enhance the scalability of blockchains by packing multiple transactions into one using a second layer (Layer 2)

Batching multiple transactions together is also known as rollups or Layer 2 solutions. With zk-rollups, transaction data is compressed into cryptographic proofs off-chain which assert the validity of multiple transactions without revealing their specific details. These proofs are then submitted to the mainchain, ensuring the integrity of the off-chain computation, and enabling efficient verification.

Using ZKPs to batch transactions on Layer2

Some examples of zk rollups are zkSync, ImmutableX, Starkware, and Hermez Network by Polygon.

Zero-knowledge Ethereum virtual machine (zkEVM)

zkEVM is a concept that combines zk-rollups and Ethereum Virtual Machine (EVM). EVM is the virtual machine that was built by the Ethereum blockchain so that the Ethereum network nodes can be run on any hardware. EVM supports certain opcodes that make it possible to program in high-level languages like solidity on the Ethereum blockchain.

Zero-Knowledge (zk) and Ethereum Virtual Machine (EVM) make zkEVM

Zk-rollups are used to scale the blockchain. However, not all zk-rollups are EVM-compatible i.e., the programs written for Ethereum blockchain might not be supported when you try to do zk-rollup on them. Therefore, many companies and teams are now trying to create EVM-compatible zk-rollups. The goal is that any program that can be run on the Ethereum blockchain can be supported in a zk-rollup, scaling the entire blockchain.

That’s it for today. In the next post, we will finally start to dig deeper into the beef of ZKPs. Stay tuned for some hands-on on ZKPs. Till then, ciao!

Hey there, thanks for reading this far. If you liked this article, don’t forget to follow and leave a clap.

I am building Plurality Network, the user context layer on web3. Join our discord to get alpha!

Follow me here, on LinkedIn, on X, or on Farcaster to get the latest blockchain technical content in simple, bite-sized reads.

--

--

Hira Siddiqui
Coinmonks

Blockchain evangelist that writes about how this tech can change the world for the better!