Open the app

The circuit

One Groth16 circuit over BN254 serves every action: a join-split of 2 inputs and 2 outputs over a Poseidon Merkle tree of 23 levels, about 14,100 constraints. It is written in Circom with circomlib.

Public inputs

rootA recent root of the pool's tree (the pool checks it against its last 128)
publicAmountextAmount minus the relayer fee, in the field (negative values wrap)
extDataHashHash of everything outside the proof (below)
inputNullifier[2]Nullifiers of the two notes spent
outputCommitment[2]Commitments of the two notes created

What it proves

  • Each input with a non-zero amount is a leaf of the tree under root, at the index used in its nullifier.
  • The prover knows the spending key of each input, and each nullifier is computed from it.
  • The two nullifiers differ.
  • Each output commitment opens to its amount, owner key and blinding, and each output amount fits in 240 bits, so sums cannot wrap around the field.
  • sum(inputs) + publicAmount = sum(outputs).

What the proof binds

The contract recomputes the hash from the call and rejects the transaction if it differs from the public input:

extDataHash = keccak256(abi.encode(chainId, pool, extData)) mod p

extData = (recipient, extAmount, relayer, fee, refund,
           sealedNote1, sealedNote2, action)

So the chain, the pool, the recipient, the amount, the relayer, its fee, the gas drop, both sealed notes and the action (for a swap: the Uniswap v4 pool, the price floor, the deadline and the owner of the output) are all fixed when you prove. A relayer, or anyone who sees the transaction before it lands, cannot change any of them: a changed field gives a different hash and the proof fails.

Trusted setup

Phase 1 is the public perpetual powers of tau (2^15, 80 contributions). Phase 2 is specific to this circuit: one contribution with random entropy that was discarded, then a public beacon (the hex of talos shielded pool elysium 2026-12-02, 2^11 iterations). The proving files are served by the site:

/zk/talos_tx.wasma7d707bc35e131e413fe2cfda8400e7d860634674f22df5ba5fb7763f6a5a332
/zk/talos_tx.zkeya9dfc1a6708abb42bfff2120abf635d0c8749da5209672328747a79b3010737b
/zk/verification_key.jsonb62e51d852e98268f5a39eab076aecbf063ca21685cb0e3d520ba1a04089613b

SHA-256 of each file. The verification key is the one compiled into TalosVerifier.