Zero-Knowledge Proofs Explained

Share IT

With several ZK-based projects announcing their milestones, it looks like we may finally be on the verge of a real blockchain revolution.

Itโ€™s common knowledge that blockchains donโ€™t scale. As much as weโ€™d love to see them used massively, itโ€™s impossible for now due to their technical limitations.

We first saw it in 2007 when Bitcoinโ€™s popularity skyrocketed, and its congestion reached a previously unseen level. Now, the same is happening on Ethereum where gas price has increased 30โ€“50 times compared
to the โ€œboring timesโ€.

To solve the problem, countless companies have been working on scalability solutions, but for a long time, this sphere hasnโ€™t seen any promising projects close to market launch. However, it looks that finally, a real revolution might be just around the corner, with the game-changer being the zero-knowledge cryptography

Zero-Knowledge Proofs Explained

Zero-knowledge cryptography has been an object of great interest in the blockchain community for several years now. ZK proofs are used to prove to one party (the verifier) that another party (the prover) possesses some knowledge but without revealing the knowledge itself. The only information conveyed and proven to the verifier is that the prover does possess this knowledge.

Imagine Victor and Peggy that went to the park to juggle balls. Victor is color-blind, so he doesnโ€™t distinguish red and green colors. Peggy, on the other hand, sees the difference between them.

Source: Zero-Knowledge Blockchain Scaling, Ethworks
Source: Zero-Knowledge Blockchain Scaling, Ethworks

If they decided to take two ballsโ , green and red, Victor wouldnโ€™t see any difference between them. If Peggy wanted to prove to him that she does see the difference, sheโ€™d ask him to grab one ball in each hand and put them behind his back. Then, heโ€™d repeatedly switch them in his hands and display one to Peggy, asking if itโ€™s different from the previous one.

Peggy would always be able to tell if the one heโ€™s displaying is different because she distinguishes red and green colours. Thus, Victor can be pretty sure that Peggy knows the difference between the balls although, for him, theyโ€™re identical. The color of each ball is never revealed to him, which forms a zero-knowledge proof.

Scaling Blockchain with Zero-Knowledge Proofs

Zero-knowledge proofs can be used to generate cryptographic proofs that some computation has been performed outside of a blockchain in accordance with predefined rules. As theyโ€™re significantly smaller than the data they represent, verifying them is much cheaper than verifying the transaction data itself. 

Scalability solutions based on zero-knowledge proofs leverage two types of computer programs: the prover and the verifier. While the first one is responsible for generating them, the second oneโ€Šโ€”โ€Šno surprise hereโ€Šโ€”โ€Šhandles the verification. 

As zero-knowledge proofs donโ€™t reveal anything about the transactions they represent, the verifier doesnโ€™t learn anything about usersโ€™ transfers. Itโ€™s responsible merely for checking whether the proof has been generated according to the rules. Due to that, even if the prover turns malicious and creates a fake proof, this proof will never get verified positively. 

Thanks to the distinct roles of the prover and the verifier, ZK-based scalability solutionsโ€™ third-party servers donโ€™t need to be trusted. Verifiers accept only valid proofs, which eliminates the possibility of a collusion. 

Different Approaches to Zero-Knowledge Scaling

The ongoing ZK-based projects approach the scalability issue from various sides. Although there are not many of them (yet), we can already distinguish three distinct types of architectures: zkRollup, validium, and volition

What they differ in is mainly the data availability issue. Transaction data and information about usersโ€™ balances may be held on the blockchain or outside of it, which results in the fundamental trade-off between scalability and security.

Source: Zero-Knowledge Blockchain Scaling, Ethworks
Source: Zero-Knowledge Blockchain Scaling, Ethworks

Storing data on-chain is as secure as having assets directly on Ethereum. It makes the data available any time, so when a scalability solution providerโ€™s server ceases to exist or turns malicious, users may construct a proof that they hold a certain amount of tokens and withdraw them directly from the smart contract. ZK-based solutions keeping data on-chain are referred to as zkRollups.

The solutions storing data off-chain weaken Ethereumโ€™s security guarantees by introducing the data availability problem. When a scalability solution provider stops collaborating, users cannot withdraw their funds unless they have other access to the data representing their balances. The solutions storing data outside the main chain are called validiums

Validiums offer lower security, but also provide higher scalability. Such solutions arenโ€™t subject to their blockchainโ€™s limitation, which allows for higher transaction throughput than in the case of on-chain storage.

Recently, another hybrid solution has been proposed. It would allow users to pick whether the data will be stored on-chain or off-chain for every single transaction. Such scalability solutions are referred to as volitions.

Thereโ€™s Much More Than That

If youโ€™d like to learn more about how the above solutions work or what scalability products have already been launched to the market, download Ethworksโ€™ report on zero-knowledge scaling. It explains the mechanisms behind zkRollups, validiums and volitions with an overview of the most interesting ZK-based projects. And all that in plain English!

Share IT
Gaurav
Gaurav

Get Daily Updates

Crypto News, NFTs and Market Updates

Can’t find what you’re looking for? Type below and hit enter!