What Is Zero-knowledge Proof and How Does It Impact Blockchain?
ہوم
آرٹیکلز
What Is Zero-knowledge Proof and How Does It Impact Blockchain?

What Is Zero-knowledge Proof and How Does It Impact Blockchain?

Intermediate
شائع کردہ Jan 18, 2023اپڈیٹ کردہ Nov 16, 2023
7m


This article is a community submission. The author is Kenny Li, co-founder of Manta Network, a programmable privacy Layer 1 protocol powered by zero-knowledge proof technology.  

Views in this article are of the contributor/author and do not necessarily reflect those of Binance Academy.

TL;DR

Zero-knowledge proof (ZKP) is a cryptographic technology that allows the truth of a piece of information to be verified without revealing the information itself. It’s become an increasingly important technology in blockchain, cryptocurrency, and decentralized finance (DeFi) for enhancing privacy and security. 

Many DeFi projects are already using ZKPs to provide users with better privacy and security for services such as lending, borrowing, and trading. A number of Layer 1 blockchains are adding ZKP-based roll-ups or zkEVMs. Zero-knowledge proofs are expected to play an increasingly crucial role in the world of blockchain and Web3 as their applications are expected to become more widely adopted.

How Does Zero-Knowledge Proof Work?

Zero-knowledge proof is a method by which one party (the prover) can prove to another party (the verifier) that a statement is true without revealing any additional information. This is particularly useful when the information is sensitive and the prover doesn’t want the verifier to have access to it.

The prover provides a mathematical proof only they can generate and the verifier can use this proof to verify the truth of the statement. However, they cannot use the proof to reconstruct the original information.

Imagine a tunnel with two entrances, A and B. There is a locked door with a secret code blocking the only path and preventing people from walking through the tunnel from one end to another (A to B). You know the secret code and want to sell it to Mrs. X, who wants to access the tunnel.

You want her to pay upfront before you reveal the code to her but she first wants you to prove you really know the code. In this case, she can do so by standing in front of the tunnel and watching you walk into one of the entrances and come out of the other. This way, she will be satisfied that you really know the secret code.

Advanced Zero-Knowledge Proof Example

Imagine you have a friend who cannot distinguish between red and blue colors. You have two balls on display: one red and one blue. Your friend doesn’t believe, however, that the balls can be distinguished from one another. You want to prove they are different colors without revealing that you have a red and a blue ball. In fact, you don’t want to disclose any information about how you distinguish between them at all.

So how do we prove they can be distinguished while revealing zero knowledge about the identification process or defining features? The answer is simple. You ask your friend to hold the two balls behind their back before displaying one. They will then place the ball behind their back and randomly pick (50/50) one of the two to show again. Note that your friend will always know if they have switched the ball.

Your friend will then ask you, “Has the ball switched?” before confirming the validity of your answer. After giving your correct answer, your friend may be suspicious that you have guessed. They ask you to do it five additional times, meaning the chance of you having guessed correctly every time in the experiment would be:

The chances look slim! To be sure, you and your friend repeat the process 15 times. The chances then of you correctly guessing would be:

You would be almost certain the proof is correct at this point. If you and the friend repeat the experiment an infinite amount of times, the chance you would correctly guess every time tends to zero.

You have therefore proved to your friend that the balls are distinguishable with zero knowledge on your friend’s side of how this is done. He can, however, accept the finding with confidence.

Why Use Zero-Knowledge Proofs? 

The popularity of zero-knowledge proofs in blockchain and crypto is driven by the increasing demand for privacy and security in digital transactions. With the rise of blockchain technology and cryptocurrency, there is a growing need for a way to verify transactions without revealing sensitive information — a need ZKPs can meet.

Zero-knowledge proofs have attracted greater attention and interest in recent years, with many protocols utilizing ZKPs having been launched and major blockchains having built zero-knowledge roll-ups. A clear sign of zero-knowledge proofs’ popularity was seen at the DevCon 2022 conference, where over 20% of all talks were about this technology.

Key Developments

One key development in zero-knowledge proofs is the increased use of zk-SNARKs, a specific type of ZKP. zk-SNARKs have been widely adopted in various DeFi applications, such as private token transactions and shielded lending and borrowing. Another major development in zero-knowledge proofs is the increased focus on scalability and performance via zk-rollups. 

zk-SNARKs

Zero-knowledge succinct non-interactive argument of knowledge (zk-SNARKs) is a specific type of zero-knowledge proof that allows a statement to be verified without revealing any information about the statement itself.

zk-SNARKs have been already used on applications such as Zcash and JP Morgan Chase’s blockchain-based payment system. It’s also been used as a way to securely authenticate clients to servers.

Zk-Rollups

Zk-rollups are a scaling solution for blockchain networks that facilitates the batching of multiple transactions into a single, larger transaction that is then recorded on the blockchain. For example, BNB Chain launched its zkBNB testnet built on zk-rollup architecture in 2022.

zkBNB can bundle hundreds of transactions into a single batch off-chain and generate a cryptographic proof to prove the validity of all the transactions. zk-rollups provide a balance between scalability and security and are suitable for high-scale, low-latency settings.

Use Cases For Zero-Knowledge Proofs

Zero-knowledge proofs have many use cases, some of which have already been realized; others are expected to become a reality in the future. Some major ZKP use cases include: 

Digital identity verification

Zero-knowledge proofs can be used to verify the identities of users without revealing any sensitive personal information. This can be useful in applications such as digital voting systems, where the identities of voters must be verified without compromising their anonymity.

Privacy-preserving transactions

One of the most popular use cases for zero-knowledge proofs in crypto is to enable privacy-preserving transactions. For example, Manta Network’s MantaPay decentralized application (DApp) uses ZKPs to enable users to make transactions on the decentralized exchange (DEX) without revealing their identities or transaction details. This allows users to maintain their privacy while still being able to use the platform for transactions.

Shielded transactions

Zcash is a cryptocurrency that uses zero-knowledge proofs to enable shielded transactions. In such transactions, sender and recipient addresses, as well as transaction amounts, are obscured from the public blockchain, providing added privacy for users.

Tokenization and ownership verification

Zero-knowledge proofs can also be used to tokenize assets and verify their proof of ownership. For example, a property can be tokenized and any party can verify its ownership without publicly revealing any other information.

Global compliance

Some countries have strict regulations regarding the collection and sharing of financial information, which can be difficult for decentralized platforms to comply with. Zero-knowledge proofs can be used to share the required information with regulators while keeping it private from other parties.

This can help bridge the gap between decentralized platforms and traditional financial institutions, making it easier for DeFi to comply with regulations in various jurisdictions.

The Future of Zero-Knowledge Proofs in Blockchain

Zero-knowledge proofs are likely to bring about new technological innovations in future. Some ZKP-related future developments worth paying attention to include: 

Cross-chain privacy layers

As the blockchain and DeFi ecosystems continue to grow and evolve, there is an increasing need for interoperability across different blockchain networks. Cross-chain privacy layers will allow transactions to be conducted on different blockchain networks while preserving the privacy of the parties involved.

zk-STARKs

Another area to watch out for is the increased use of zk-STARKs (zero-knowledge scalable transparent argument of knowledge), a newer type of zero-knowledge proof that is considered more efficient and secure than zk-SNARKs. Another advantage of zk-STARKs over zk-SNARKs is that the former are faster to verify and do not require a trusted set-up.

User-friendly toolkits 

Zero-knowledge proof technology can be complex, and not every development team has expertise in this particular area of cryptography. User-friendly ZKP toolkits can help bridge this gap and make it easier for developers of different backgrounds to use the technology. 

Limitations of Zero-Knowledge Proofs

Zero-knowledge proofs represent a unique method of verifying the truth of information while preserving privacy, but they don’t provide a 100% guarantee. While the probability of verification when the prover is lying is negligible, users should be aware that ZKPs are not bullet-proof.

In addition, algorithms used by zero-knowledge proofs need intense computational resources. In some types of ZKPs, intensive computing is necessary because they require many interactions between verifiers and provers. In others, the algorithms are extremely computationally intense, which could potentially limit ZKPs’ applications.

Closing Thoughts

Zero-knowledge proofs are rapidly gaining attention because of their unique properties of privacy preservation and scaling potential. The increasing application of this technology in blockchain, cryptocurrency, and DeFi will likely bring more innovative services that greatly benefit users. Zero-knowledge proofs are expected to play a crucial role in creating DApp ecosystems that are more secure, private, and efficient.

Further Reading