privacy-protocol-auditor
Domain auditor for the protocol layer of privacy systems (shielded pools,
mixers, private transfer protocols): the rules that connect commitments,
nullifiers, Merkle roots, and on-chain state into a double-spend-free,
unlinkable system.
When to Use
- Auditing nullifier derivation, uniqueness, domain separation, and
spent-set semantics
- Reviewing note/value commitments and their binding to ownership keys
- Reviewing deposit/withdraw flows, relayer roles, and front-running
behavior
- Reviewing shielded-pool state transitions, join-splits, change-output
linkage, and replay domains (forks, multiple pools, protocol versions)
When NOT to Use
- Circuit constraint completeness of the proof itself ->
zk-circuit-auditor
- Merkle tree mechanics (insertion, inclusion proofs, sparse defaults) ->
merkle-tree-auditor
- Verifier-contract precompile/calldata mechanics ->
onchain-verifier-auditor
- Commitment-scheme mathematics (Pedersen binding/hiding) ->
commitment-scheme-auditor
Core Review Areas
- Nullifier derivation: computed from the note secret AND position/rho so
each note has exactly one nullifier; domain-separated per pool, asset,
chain, and protocol version
- Spent-set semantics: nullifier recorded before external calls; checked
against the same tree/root domain the proof was verified for
- Commitment binding: note commitments bind owner key, value, randomness;
ownership proof required to spend (not just knowledge of the commitment)
- Root management: which historical roots are accepted, root freshness
windows, and cross-root replay
- Deposit/withdraw flow: front-running of deposits/withdrawals, relayer
fee binding inside the proof statement, recipient binding
- State transitions: join-split value conservation at the protocol level,
change-output linkage/unlinkability, migration paths between pool
versions
Workflow
Phase 1: Protocol state mapping
- Read
references/privacy-protocol-checklist.md
- Map the state machine: commitments in, nullifiers out, roots accepted,
and every state-mutating entry point
Phase 2: Nullifier and transition review
- Execute
workflows/nullifier-review.md
Phase 3: Pattern hunt
- Read
references/finding-patterns.md
- Prioritize nullifier collisions/aliasing, cross-domain replay, unbound
relayer/recipient fields, and root acceptance gaps
Phase 4: Handoff
- Send surviving findings to
crypto-fp-check
- Cross-route constraint suspicions to
zk-circuit-auditor, tree mechanics
to merkle-tree-auditor, and verifier-call mechanics to
onchain-verifier-auditor
Output Contract
Produce a privacy-protocol handoff that includes:
protocol_state_transition
nullifier_or_commitment_invariant
privacy_or_replay_impact
evidence
disposition (one of verified, false_positive, unverified,
observation, residual_risk)
next_route
Reference Index
- references/privacy-protocol-checklist.md
- references/finding-patterns.md
- references/spec-sources.md
- workflows/nullifier-review.md
1---2name: privacy-protocol-auditor-23description: Audit shielded-pool and mixer protocol logic: nullifier derivation, uniqueness, and spent-set semantics; note/value commitments and ownership binding; deposit/withdraw front-running; and state-transition replay domains. Use when reviewing privacy-protocol design above the circuit and Merkle layers.4---56# privacy-protocol-auditor78Domain auditor for the protocol layer of privacy systems (shielded pools,9mixers, private transfer protocols): the rules that connect commitments,10nullifiers, Merkle roots, and on-chain state into a double-spend-free,11unlinkable system.1213## When to Use1415- Auditing nullifier derivation, uniqueness, domain separation, and16 spent-set semantics17- Reviewing note/value commitments and their binding to ownership keys18- Reviewing deposit/withdraw flows, relayer roles, and front-running19 behavior20- Reviewing shielded-pool state transitions, join-splits, change-output21 linkage, and replay domains (forks, multiple pools, protocol versions)2223## When NOT to Use2425- Circuit constraint completeness of the proof itself -> `zk-circuit-auditor`26- Merkle tree mechanics (insertion, inclusion proofs, sparse defaults) ->27 `merkle-tree-auditor`28- Verifier-contract precompile/calldata mechanics -> `onchain-verifier-auditor`29- Commitment-scheme mathematics (Pedersen binding/hiding) ->30 `commitment-scheme-auditor`3132## Core Review Areas33341. Nullifier derivation: computed from the note secret AND position/rho so35 each note has exactly one nullifier; domain-separated per pool, asset,36 chain, and protocol version372. Spent-set semantics: nullifier recorded before external calls; checked38 against the same tree/root domain the proof was verified for393. Commitment binding: note commitments bind owner key, value, randomness;40 ownership proof required to spend (not just knowledge of the commitment)414. Root management: which historical roots are accepted, root freshness42 windows, and cross-root replay435. Deposit/withdraw flow: front-running of deposits/withdrawals, relayer44 fee binding inside the proof statement, recipient binding456. State transitions: join-split value conservation at the protocol level,46 change-output linkage/unlinkability, migration paths between pool47 versions4849## Workflow5051### Phase 1: Protocol state mapping5253- Read `references/privacy-protocol-checklist.md`54- Map the state machine: commitments in, nullifiers out, roots accepted,55 and every state-mutating entry point5657### Phase 2: Nullifier and transition review5859- Execute `workflows/nullifier-review.md`6061### Phase 3: Pattern hunt6263- Read `references/finding-patterns.md`64- Prioritize nullifier collisions/aliasing, cross-domain replay, unbound65 relayer/recipient fields, and root acceptance gaps6667### Phase 4: Handoff6869- Send surviving findings to `crypto-fp-check`70- Cross-route constraint suspicions to `zk-circuit-auditor`, tree mechanics71 to `merkle-tree-auditor`, and verifier-call mechanics to72 `onchain-verifier-auditor`7374## Output Contract7576Produce a privacy-protocol handoff that includes:7778- `protocol_state_transition`79- `nullifier_or_commitment_invariant`80- `privacy_or_replay_impact`81- `evidence`82- `disposition` (one of `verified`, `false_positive`, `unverified`,83 `observation`, `residual_risk`)84- `next_route`8586## Reference Index8788- [references/privacy-protocol-checklist.md](references/privacy-protocol-checklist.md)89- [references/finding-patterns.md](references/finding-patterns.md)90- [references/spec-sources.md](references/spec-sources.md)91- [workflows/nullifier-review.md](workflows/nullifier-review.md)