Zk rollups: The zero-knowledge movement

Kishan Kumar
Coinmonks
4 min readJun 9, 2023

--

Image Courtesy Kishan Kumar

Zero-knowledge (Zk) rollups are a layer-2 scaling solution that increases throughput on Ethereum by moving computation and state storage off-chain.

It can process thousands of transactions in a batch and then post minimal summary data to Mainnet.

They achieve this by bundling multiple transactions into a single proof, which is then submitted to the main chain.

The zk-rollups rely on zero-knowledge proofs, a cryptographic technique that allows one party to prove the validity of a statement without revealing any sensitive information.

What are zero-knowledge proofs? and what does zero mean?

It's a way to prove something is true without revealing any information. The "zero-knowledge" part of the name refers to the proof not disclosing any information beyond the statement's validity.

But how? Let's look at the figure below.

Image by @0xkishan

Example: The Ali Baba cave

This example is quite famous and easy to comprehend, so why not?

Suppose you want to prove to your friend Bob that you know the magic word to open a secret door in a cave. The cave has two entrances, A and B, that lead to the same point where the secret door is located. You can only open the door inside the cave by saying the magic word. But you don't want to tell your friend the magic word or show him the door. This might initially seem confusing, but I'll try to clear the smoke.

A zero-knowledge proof method for this problem would be like this:

  1. You (Alice) enter the cave from either entrance A or B while your friend waits outside.
  2. Your friend then chooses an entrance and calls it out to you.
  3. You come out of the entrance that your friend chose, proving that you can open the door from the inside.
  4. Let's say your friend is not convinced because you have a 50% chance to enter the cave from the same entrance your friend will choose and come out without opening the door. Like, Bob said, go via Path A and return via Path A. This doesn't make sense.
  5. However, if you repeat this several times, eventually, the probability of you coming out of the same entrance that your friend chooses each time would be very low. For example, Bob might say to go via A but reach via B or vice versa. If you pass every time, this convinces your friend that you know the magic word without revealing it or showing him the door.

Now, of course, the probability of you not having the key decreases at each iteration, but it never goes to zero. It is possible that you got lucky every damn time, thus fooling Bob into believing that you had the key.

Zero-knowledge proofs help preserve privacy and security in many applications, such as authentication, cryptography, blockchain, and more.

There are two types of zero-knowledge proofs such as

  1. Interactive and,
  2. Non-interactive.

Interactive zero-knowledge proofs require communication between the prover (Alice) and the verifier (Bob), while non-interactive ones do not. The above scenario of Alibab cave is an example of interactive ZKP.

Non-interactive zero-knowledge proofs are more efficient and convenient, but they rely on stronger assumptions and more complex techniques.

What are the advantages and disadvantages of zk rollups?

Advantages:

  • Scalability: By bundling multiple transactions into a single proof, zk-rollups significantly increase the transaction throughput of a blockchain.
  • Reduced gas fees: As the main chain only needs to verify a single proof instead of individual transactions, gas fees are reduced.
  • Security: Zk-rollups inherit the security of the underlying main chain, as it is the main chain that verifies the bundled transactions.
  • Privacy: Zero-knowledge proofs can provide privacy by hiding transaction details while proving their validity. E.g. In the case of Bitcoin, miners need to know about your transaction to validate it. But it is highly possible that they can exploit this information for their use. Such as, if they see many people buying Bitcoin, they can buy it before they confirm your transactions and include it in the block.

Disadvantages:

  • Complex technology: It isn't easy to wrap your head around by only looking at the theory as it relies on advanced cryptography and complex mathematics to understand or implement.
  • High upfront costs: Zk rollups require a lot of computational resources and gas fees to generate and verify the proofs, which can be expensive and time-consuming.

Some examples of zk rollup projects

In summary, zk-rollups are a promising Layer-2 scalability solution that leverages zero-knowledge proofs to bundle multiple transactions into a single proof, increasing transaction throughput and reducing gas fees. While they offer several advantages, their complexity, and limited support may pose challenges to widespread adoption.

Thank you for taking the time to read my article. I would greatly appreciate your support through claps and subscriptions if you found this article valuable.

If you would like to support my articles, I accept tips:

  • All EVM supported: 0x984275D74aED971128bBCdB11994149aa79f1d08
  • Lightning Address: 0xkishan@getalby.com
  • BTC address: bc1q7cq4cwvhdt2l3lw0m89rkmg52clh9asdynvls3

Dive into insightful articles on decentralized systems, Tech and AI trends: https://www.0xkishan.com. Do visit to show your support.

Thank you again.

--

--

Kishan Kumar
Coinmonks

Building PhonePe. Dive into insightful articles on decentralized systems, Tech and AI trends