A zero-knowledge proof lets you prove a statement is true without revealing the underlying data. Haycen Money uses Groth16, a well-established zk-SNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) proving system.
When a user wants to mint, transfer, or burn tokens, they generate a proof locally on their device. This proof mathematically guarantees — for example — that the sender has enough balance to cover a transfer, without revealing the balance or the amount. The smart contract then verifies this proof on-chain in constant time.
Proof Circuits
Haycen Money uses four distinct proof circuits:
- Registration — Proves ownership of a cryptographic key pair when registering to use the system.
- Mint — Proves that a confidential mint operation is valid, using a nullifier to prevent double-minting.
- Transfer — Proves the sender has sufficient encrypted balance to cover the transfer amount.
- Burn — Proves that the amount being burned does not exceed the user’s encrypted balance.
Trusted Setup
Groth16 requires a one-time trusted setup ceremony to generate the cryptographic parameters used by each circuit. This is a two-phase process:
Phase 1 — Powers of Tau (shared across all circuits)
Haycen Money’s underlying circuits use parameters from the Hermez (iden3) Powers of Tau ceremony — a public, multi-party computation with hundreds of participants. The security guarantee is straightforward: as long as at least one participant was honest, the parameters are secure. This phase produces the shared alpha, beta, and gamma values used by all verifier contracts.
Phase 2 — Circuit-specific setup (unique per circuit)
Each circuit (mint, transfer, burn, registration) undergoes its own Phase 2, which encodes the circuit’s specific constraints into proving and verification keys. This produces the delta values — the circuit-specific component that differs between each verifier contract.
The result: each verifier contract has hardcoded cryptographic constants. The shared constants (alpha, beta, gamma) come from the public Hermez ceremony. The unique constants (delta) come from the circuit-specific Phase 2. No party holds a secret key that could forge proofs — that is the entire point of the ceremony.
These parameters can be independently verified:
snarkjs zkey verify <circuit>.r1cs powersOfTau28_hez_final_15.ptau <circuit>.zkey