Use cases
A zero-knowledge proof lets you prove a fact without revealing the data behind it. “I’m over 18” without a birth date. “I’m on the voter list” without saying which voter. “Our reserves cover every deposit” without publishing a single balance. A Cardano validator can check that kind of proof in one transaction. The secret inputs never leave the prover’s machine.
This section walks through what that makes possible. Each page explains the real-world problem, the statement being proven, what stays private, how the proof reaches the chain, and the security questions you still have to answer. Most pages also link a runnable demo.
Identity & compliance
Section titled “Identity & compliance”DeFi & finance
Section titled “DeFi & finance”Governance & communities
Section titled “Governance & communities”Ownership & assets
Section titled “Ownership & assets”Supply chain
Section titled “Supply chain”Pick the right tool
Section titled “Pick the right tool”Almost every use case is built from a small set of patterns. Start from what you need to prove:
| You need to… | Approach | ZeroJ building blocks |
|---|---|---|
| Prove a predicate over a hidden value (age ≥ 18, carbon ≤ 50 kg, reserves ≥ liabilities) | Groth16 circuit | ZkUInt with @UInt(bits = …) and gte / lte comparisons |
| Reveal some issuer-signed attributes and hide the rest | BBS selective disclosure (no circuit, no trusted setup) | BbsService in zeroj-bbs; BbsProofVerify for on-chain checks |
| Prove you’re in a set without saying which member | Merkle tree + Poseidon | ZkMerkle.verifyProofPoseidon with PoseidonParamsBLS12_381T3.INSTANCE |
| Allow one action per person, credential or NFT | Nullifier | ZkPoseidon.hash(zk, PoseidonParamsBLS12_381T3.INSTANCE, secret, contextId), stored on-chain (sorted list, spent UTxO) |
| Rely on a fact someone else attested | Issuer signature checked inside the circuit | ZkEdDSAJubjub.verifyWithRegisteredKey |
| Stop a copied proof from paying someone else | Bind the recipient or the spent UTxO into the public inputs | recipient public input; a spend reference computed from ScriptContext in your validator |
| Prove facts about large private state (millions of entries) | Poseidon MPF / JMT (experimental) | zeroj-mpf-poseidon, zeroj-jmt-poseidon |
Groth16 on BLS12-381 is the default proof system for everything above. Circuits use Poseidon with explicit BLS12-381 parameters. For the concepts behind these patterns, read Circuits, constraints & witnesses and ZK on Cardano.
Run the demos
Section titled “Run the demos”The zeroj-usecases repository has complete Spring Boot apps for most pages here. Each one covers the circuit, proof generation, a Cardano transaction and on-chain verification, with a small web UI.
You need Docker (with Compose v2) and a Yaci DevKit devnet running on your machine:
# 1. Start a local Cardano devnet (outside the demos repo)devkit start# then, at the yaci-cli prompt:# create-node -o --start
# 2. Run a demo end to endgit clone https://github.com/bloxbean/zeroj-usecasescd zeroj-usecases./demo.sh proof-of-reserves --run
# 3. Stop it (Yaci keeps running)./demo.sh proof-of-reserves --stopdemo.sh tops up a devnet-only demo wallet, starts the app, opens its UI and, with --run, runs
the happy path. The demo names are proof-of-reserves, identity-kyc, nft-ownership, voting,
airdrop, dpp, selective-disclosure and reusable-kyc. The account-ownership demo ships
separately as a desktop app and CLI; see its page.
The demos use a single-party development trusted setup (they run with
-Dzeroj.allowInsecureTrustedSetup=true, and cached setup files are generated the same way). Real
deployments need keys from a multi-party ceremony; see
Trusted setup, explained.
Ideas to explore
Section titled “Ideas to explore”These ideas are not implemented as demos. They show how the same building blocks carry over to new problems.
- Private credit score for lending. A borrower proves “score ≥ 700” from a credit bureau’s
signed credential. That needs an in-circuit issuer signature (
ZkEdDSAJubjub), aZkUInt.gterange check and a public input bound to the loan UTxO. BBS is an option if revealing a score band is acceptable. - Sealed-bid auctions. Bidders publish
Poseidon(bid, salt)during bidding, then prove their bid clears the reserve price without revealing it. ZeroJ’s integration tests include sealed-bid example circuits: an annotation-styleAnnotatedSealedBidand a DSL version with a Yaci DevKit on-chain test. That’s a starting point, not a full auction protocol. - Anonymous feedback and whistleblowing. An employee proves membership in a Merkle tree of staff keys and publishes one nullifier per topic. The report’s hash is bound as a public input, so every report is from a real member and nobody can flood a topic. The shape is the private voting circuit.
- Payroll or treasury solvency. A DAO proves that a batch of private salaries or grants sums to
no more than the treasury balance, and that each payment falls within an approved band. That uses
ZkUIntsums and comparisons plus a Poseidon commitment to the batch, as in proof of reserves.
Next steps
Section titled “Next steps”- New to ZK? Start with Zero-knowledge in plain English.
- Build the core patterns yourself: Prove you’re over 18 and Private allowlist with a Merkle tree.
- Take a proof on-chain: Verify your proof on Cardano.