Testnet only. Sei Atlantic-2, chain 1328.Not audited. Test funds only.
TestnetOpen app

Protocol

Circuit and public inputs

The join-split statement and its eleven public inputs.

On this page
  1. What it proves
  2. Public inputs, in order
  3. By transaction kind
  4. Known gaps

packages/circuits/circuits/joinsplit.circom, JoinSplit(20): 12,606 non-linear constraints, 11 public inputs, Groth16 over BN254, circom 2.1.9, snarkjs 0.7.4. The second membership proof (aspRoot) was removed. Admission is still gated insertion, so that path was the same tree twice. That is the speed change (22,292 constraints before). It is live in the Atlantic-2 pool deployed on 27 Nov 2026. On-chain, the tree hashes dominate, and the hasher stays a separate library because inlining it does not fit in the contract size limit.

What it proves

  1. Every amount and the fee is below 2^96, and |extAmount| < 2^96.
  2. One private tokenId matches all four notes. It is not a public input.
  3. The public asset rule:
    isNone = (publicAssetId == 0)
    isNone * extAmount == 0
    isNone * fee       == 0
    (1 - isNone) * (tokenId - publicAssetId) == 0
    
  4. in0 + in1 + extAmount == out0 + out1 + fee.
  5. Each non-zero input has a valid path to root.
  6. nf_i == H(TAG_NULLIFIER, cm_i, leafIndex_i, spendKey_i) and nf_0 ≠ nf_1.
  7. outCm_j == H(TAG_COMMITMENT, tokenId, outAmount_j, outOwnerPub_j, outBlinding_j).
  8. chainId, pool and extDataHash are bound as public inputs.

Public inputs, in order

# Name Source
0 root calldata; must be a known root
1–2 nullifier0, nullifier1 calldata; unspent and distinct
3–4 commitment0, commitment1 calldata
5 extAmount signed, field-encoded as `x ≥ 0 ? x : r −
6 fee < 2^96
7 publicAssetId 0 (private) or 1/2
8 chainId block.chainid, never calldata
9 pool address(this), never calldata
10 extDataHash keccak256(abi.encode(recipient, relayer, enc0, enc1)) mod r

Every value is checked < r before verification.

By transaction kind

Kind publicAssetId extAmount fee recipient relayer
Deposit 1 or 2 > 0 0 0 0
Transfer / claim 0 0 0 0 any
Withdrawal 1 or 2 < 0 ≥ 0 ≠ 0 ≠ 0 if fee > 0

Known gaps

  • There is no in0 + in1 > 0 constraint, so a zero-value transfer can be proven without funds. The relayer's limits are the defence (Spec §17).
  • Ciphertext correctness isn't proven in the circuit. The sender's client checks it (Note encryption).
  • An independent circuit review hasn't happened. circomspect has been run.

Source: apps/web/content/docs/circuit.md