Skip to main content

Why Proofs?

An indexer scans the Zcash blockchain and builds a registry of names. But why should anyone trust it? What if it:

  • Fabricates a registration that never happened on-chain?
  • Charges the wrong fee?
  • Registers a name twice?
  • Tampers with the registry state?

ZK proofs eliminate these questions. Each proof is a cryptographic certificate that the registration was processed correctly. Anyone can verify the proof independently.

What Each Proof Verifies

The ZNS prover uses SP1 -- a RISC-V zero-knowledge virtual machine. For every REGISTER transaction, the prover checks four things inside the zkVM:

  1. Name validity -- 3-63 characters, lowercase alphanumeric + hyphens
  2. Fee sufficiency -- the transaction paid enough ZEC for the name length
  3. Ed25519 signature -- the signature over "REGISTER:{name}:{address}" is valid
  4. Merkle tree insertion -- the name didn't already exist, and the new state root is correct

If any check fails, the proof cannot be generated.

Public Outputs

Each proof commits 8 values that are permanently bound to it:

OutputDescription
nameThe registered name
addressThe Zcash unified address
pubkeyThe Ed25519 owner public key
value_zatThe fee paid (in zatoshis)
block_heightThe Zcash block containing the transaction
txidThe Zcash transaction ID
old_rootMerkle tree root before this registration
new_rootMerkle tree root after this registration

The txid and block_height pin the proof to a specific Zcash blockchain transaction. Anyone can look up the txid on a Zcash node and confirm the memo and value match.