ZK Compression for dummies

5veu...U4ZA
2 Sept 2024
71

The new Solana protocol who uses small zero-knowledge proofs.

Before starting with the new Light Protocol, we must first understand what Zero-Knowledge Proofs are.

It refers to a cryptographic concept that allows users to verify information without revealing the details of that information.


Let’s put it in simple terms: imagine that we want to enter a bar, but the bouncer needs to know if we are of legal age to allow us to enter.

The simple solution would be to give him our ID so he can verify that we are indeed of legal age. However, by giving him our ID, the bouncer would not only have access to our age but also to other sensitive information such as our full name, date of birth, address, etc.

By using a zero-knowledge proof, we can prove to the bouncer that we are of legal age without having to hand over our ID.

For this to work, the proof must meet three essential properties:

  1. Completeness: If what we say is true, we can convince anyone honest.
  2. Soundness: If what we say is a lie, no honest person will believe us.
  3. Zero Knowledge: The other person only learns that we are telling the truth, nothing more.


Zero-knowledge proofs are not proofs in the mathematical sense of the term, because there is a small probability, the soundness error, that a deceptive prover will be able to convince the verifier of a false statement. In other words, they are probabilistic and not deterministic. However, there are techniques to reduce the soundness error to insignificant values.

ZK Compression

Light Protocol and Helius Labs introduced a game-changer: ZK compression. This innovative technology lets developers shrink the size of data stored on the Solana blockchain, specifically for tokens and accounts.

This advancement is especially relevant because on Solana, all interactions and data are stored in accounts.

Solana accountssuch as PDAs (Program Derived Addresses), are the foundation of the network’s architecture. Each account stores crucial information, such as token balances, transaction history, and program configuration. However, this volume of data can lead to significant storage costs, especially for applications with high activity volumes.

ZK Compression massively reduces storage costs without sacrificing the network’s security or speed. This paves the way for more efficient and scalable applications built on Solana.

But how is this possible?

I like to explain everything in the simplest way possible, so I will do my best with this very abstract topic.

To achieve compression (and in the words of Swen Schäferjohann in the Lightspeed podcast), we take some accounts and compress them into one, which then ends as a hashing structure.

This “compressed account” is stored in Solana’s ledger space and not on-chain.

Through Merkle Trees, we can obtain this hashing structure and store the route on-chain. We store the underlying account state in the ledger and then specify in our transactions which account we want to read or write to and send this information on-chain.

In our transaction, we need to prove in some way that the state of the underlying account corresponds to this hash route and then, we can execute our own transaction function in our Solana Program.

And what are the benefits?

As we mentioned earlier, Solana’s architecture works through accounts, and these accounts must pay rent to store information on the blockchain.

Thanks to ZK compression, the information stored on the blockchain is considerably reduced, and therefore the costs decrease to the same extent.

Fragment from the website https://docs.lightprotocol.com/


Conclusion

In summary, ZK Compression emerges as a transformative element for Solana, boosting its capacity to accommodate a larger number of users, applications, and transactions, all without compromising security, decentralization, or privacy. This technology marks a significant step towards a more scalable, efficient, and secure future for Solana.

Want to know more?


Get fast shipping, movies & more with Amazon Prime

Start free trial

Enjoy this blog? Subscribe to aricr.sol

1 Comment