Zero-Knowledge Proofs Arrive on Chromia

Zero-Knowledge Proofs Arrive on Chromia

Chromia’s unique architecture is known for combining scalability, data handling, and developer flexibility. Now, it’s added a powerful new capability: zero-knowledge proofs (ZKPs). As of July 1st, the ZKP Extension has been made available on testnet and will come to mainnet in the near future. This opens up new use cases and unlocks a range of privacy-preserving designs that weren’t possible before.

For developers eager to dive in, the code repository is publicly available, documentation is here, and a testnet demo showcasing how the system works can be accessed here.


Clarification About Extension vs. Base Level

The June monthly update announcing the release of ZKP incorrectly stated that “zero-knowledge proof verification is now integrated into the base layer of Chromia… Although [it was] originally planned as an Extension.”

During development, the team went back and forth on whether to implement ZKP at the base layer or as an Extension. In the end, it was implemented as an Extension.

What Are Zero-Knowledge Proofs?

A zero-knowledge proof allows someone to prove that a statement is true without revealing why it's true. For example, imagine a digital scale that beeps if your weight is over a certain threshold, but doesn’t display the actual number. You can prove that you're above (or below) the limit, without ever revealing your precise weight.

ZKPs rely on three core principles:

  • Completeness: If the statement is true, a valid proof will always verify.
  • Soundness: Invalid statements cannot produce valid proofs.
  • Zero-Knowledge: No extra information is leaked beyond the fact that the statement is true.

The core idea is that you know exactly what the machine does, and it can’t do anything it’s not supposed to. So you can trust the output without knowing the exact input.



How It Works

The ZKP implementation works in two steps: the generation of the proof and the verification of the proof.

First, a proof is generated on the user's local machine using something called a circuit.

The proof is then submitted to network nodes, which are able to verify it without revealing all the details about a given transaction.

From a user perspective, this all happens behind the scenes. You simply interact with the dapp while proof generation and verification happen in the background, allowing sensitive data to stay hidden while still ensuring everything is valid.



Three Demo Operations

The ZKP Demo Dapp has three ‘circuits’:

Shield: An account interacts with a contract and transfers tokens into a shielded state. The action is publicly visible.

Transfer: Token transfers between accounts and/or dapps take place in a shielded environment. An observer can tell when an account initiates a transfer, but they cannot see the amount sent or the resulting shielded balances of the sender or the receiver.

Unshield: When an account unshields tokens, the exit amount is public, but there’s no way to see how many shielded tokens they still hold.



Foggy Casino Analogy

Imagine a casino where the cashier cage is visible but the gaming floor is covered in a thick fog. 

When you arrive, you go to the cashier cage and exchange money for chips. Everyone can see this part because it’s out in the open. People know you converted, say, $500 into casino chips. 

Once you step onto the casino floor, it’s a different story. Now you're inside the fog. No one can see how much you bet, how much you win or lose, or how many chips you have at any given time. An outside observer may be able to see that you interacted with Game X or Game Y, while learning nothing about what actually happened during those interactions.

Later, you return to the cashier and trade some of your chips back for cash. People can see that you're cashing out $200. But they still can’t tell what you did on the casino floor, or whether you still have more chips in your pocket.

Chromia’s ZKP works in much the same way. There are public entry and exit points, but what happens while in a shielded state is heavily obscured. This design creates the ability to keep sensitive details private.




Potential Applications 

Using the same framework as the demo dapp, developers can utilize ZKPs to achieve different goals within a dapp. Here are some potential use cases:

Battleship-like games: At the end of a match, you can publicly prove that the end result is legit, without revealing the positions of each player’s ships before the game ends.

Reward and betting in games: Players can join a pool where they shield tokens and compete in 1v1 matches, placing bets on each game. The amounts won or lost remain hidden from the public, and players don’t have to reveal the size of their bankroll to their opponents.

On-chain voting: You can prove that the results of a vote are legitimate without revealing how each individual voted.

Identity verification: You can prove you meet certain criteria, like being 18 or older, without revealing your exact age or other personal details.

On-chain quizzes: This is not possible in a fully public blockchain setup, since the questions and answers would be visible to everyone. With zero-knowledge proofs, it becomes possible to check user responses and calculate a score without revealing the answers.



The Bottom Line

Chromia’s ZKP integration sets the stage for developers to build dapps with new levels of privacy, selective transparency, and control. 

Want to get involved? Explore the repo, try the demo, and let us know what you think!



About Chromia

Chromia is a Layer-1 relational blockchain platform that uses a modular framework to empower users and developers with dedicated dapp chains, customizable fee structures, and enhanced digital assets. By fundamentally changing how information is structured on the blockchain, Chromia provides natively queryable data indexed in real-time, challenging the status quo to deliver innovations that will streamline the end-user experience and facilitate new Web3 business models.

Website | X | Telegram | Instagram | Youtube | Discord  |  Reddit  |  LinkedIn  |  Facebook |