# 📜State of Zero-Knowledge

By [Madhav Goyal](https://paragraph.com/@madhavg) · 2023-02-21

---

Zero Knowledge cryptography is one of the most hyped sub ecosystems in web3 , you can be at any conference and someone spelling zk suddenly seems to be the serious guy but there are many different aspects of how it’s being used in scaling & making Ethereum more privacy-centric.

What is ZK?
===========

**Zero-knowledge cryptography** is a type of cryptography that uses hash functions and cryptography schemes to prove some truth to a party as the name suggests without revealing the truth itself.

How is this possible you ask? Let me give you a simple example. Say I give you a card and say it’s a red one, and to prove that I take 26 black cards out of the deck. now I didn’t show you the card itself but did an operation that made you believe I was telling the truth.Now maybe another example let’s say I am drinking rn(I don’t) and someone asks for my id proof and I show them my marriage certificate. Note that in India the legal marriage age is the same as the drinking age for boys which proves that I am eligible to drink. (sorry for the dumb example)

*   Here is an amazing video which is my first reference to zk
    

[![]({{DOMAIN}}/editor/youtube/play.png)](https://www.youtube.com/watch?v=HUs1bH85X9I)

Zk was first introduced by two researchers in the paper "[The Knowledge complexity of interactive proof systems"](https://people.csail.mit.edu/silvio/Selected%20Scientific%20Papers/Proof%20Systems/The_Knowledge_Complexity_Of_Interactive_Proof_Systems.pdf) and since then it has become a promising area of development for researchers but rn we will talk about how it’s being utilized in crypto.

Scaling
=======

Blockchain transactions are validated by doing the computation, finding its right hash, and then posting it on the chain. Every transaction is sent to a validator who includes in the block(if the right gas is paid) and spends their computational resources in proving it right which takes block space and resources. As the chain usage goes up so does the value of block space aka gas & txn costs.

Now one of the coolest things about zk is that we can prove the computational integrity of anything in a very small amount of data and resources.

Rollups
-------

So an Idea is that for a batch of txns, the zk proof is calculated off-chain, and the zk proof generated is posted on the chain for verification and state changes. A zk proof is around 160 bytes while a txn is more than a few kilobytes literally reducing the data streaming on the chain by 10x and this same proof can prove a batch of txns let’s say 50 txn in 200 bytes of zk proof.

200 bytes➗ 50 = 4 bytes

While the eth Block size is 1 MB (15 million gas) and usually comes out to around 70 txns. so for each txn the size is around

1000 KB ➗ 70(no. of txns) = 14 Kilobytes

Data is money in the world of crypto and zk is much more efficient in proving the same thing but this comes with a tradeoff, as the proofs are generated off-chain there are always some risks and assumptions involved. One current example of a protocol using zk sna[rks is ZK sync](https://zksync.io/)

Now what I have talked about is mostly related to **SNARKS**(Succinct Non-interactive Argument of Knowledge) but there are different types of Zk proof with different security and risk profiles. This an Amazing blog post if you wanna lea[rn about their dif](https://pseudotheos.mirror.xyz/_LAi4cCFz2gaC-3WgNmri1eTvckA32L7v31A8saJvqg)ference.

![](https://storage.googleapis.com/papyrus_images/d10157ed31ef478b528dd79a53fc0448d79e8f98a47ac1f5c132e411c6a2da95.jpg)

_Credits - Consensys_

Stark proofs are what runs the whole Starknet ecosystem. They are amazing advancements in tech as Starks don’t rely on the trusted-setup assumption and are mostly considered quantum-safe meaning they are safe from the emergence of quantum computers. The coolest thing about stark proofs is that their provability time rises much with the size of the proof.

ZK-EVM
------

ZK evm seems to be the most common words out these days so can’t miss that lol.

While rollups are off-chain solutions that generate zips (Zero-knowledge proof systems) off-chain, a zk evm is a zk-compatible Ethereum virtual machine that produces zk proofs for txns itself.As the original evm didn’t support zkp compatibility and after seeing the promise of this technology many projects have aped in!But there is a huge difference in different ZK EVMs as many target byte code composability while others work on more efficient proof generation. Vitalik write about their diff in an amazing blog post check [it out there](https://vitalik.ca/general/2022/08/04/zkevm.html)A few Amazing projects that are building ZK evms are [OLA VM by Sin7](https://ethresear.ch/t/unveiling-olavm-proof-of-concept-the-next-generation-full-featured-zkvm/14817) was really funny to dive into and can’t forget the work by one of the community favs 📜[Scroll](https://hackmd.io/@yezhang/B167uMZRs) they are one of the best research teams in the space

Privacy
-------

Privacy was one of the first goals with zkp systems, rn every single txn on ethereum is public while that might be good if you are hunting down a hacker or scammer general users might not want everyone to know their life savings if crypto has to go for better adoption.

One of the great implementations of this and vision was Tornado Cash which was sanctioned by OFAC and since then most of the liquidity that made it function has dried up 😭

[Aztec Network](https://aztec.network/) is Building on the privacy front of Ethereum like anyone can donate eth on Juicebox totally privately with the help of Aztec.

Solana Has its version of Zk.money where confidential transfers can be done with the he[lp of this program](https://github.com/solana-labs/solana-program-library/blob/master/token/program-2022/src/extension/mod.rs) its an extension of the spl-token-2022 program. If you wanna learn more about how it works feel f[ree to click here](https://github.com/solana-labs/solana-program-library/tree/master/token/zk-token-protocol-paper)

Amazing work by one of the Scroll ZKevm researchers →

[https://pseudotheos.mirror.xyz/](https://pseudotheos.mirror.xyz/)

Post on Zk privacy → [https://medium.com/cryptodigest/digital-identity-privacy-and-zero-knowledge-proofs-zk-snarks-3d092b509990](https://medium.com/cryptodigest/digital-identity-privacy-and-zero-knowledge-proofs-zk-snarks-3d092b509990)

And most of the ideas of rollups come from Vitaliks post Endgame → [https://vitalik.ca/general/2021/12/06/endgame.html](https://vitalik.ca/general/2021/12/06/endgame.html)

[https://nakamoto.com/cambrian-explosion-of-crypto-proofs/](https://nakamoto.com/cambrian-explosion-of-crypto-proofs/)

---

*Originally published on [Madhav Goyal](https://paragraph.com/@madhavg/state-of-zero-knowledge)*
