In any single-trade model you cannot simultaneously have all three of: public verifiability of the AMM invariant, hidden individual trade amounts, and no trusted intermediary. If trade amounts are hidden, pool state delta is not publicly derivable, so any node verifying the invariant must trust whoever published the pool state. If pool state is public, trade sizes are visible as the delta. The only escape from this trilemma requires batch processing with threshold encryption.
Penumbra’s zSwap solves this precisely by having users encrypt their swap amounts to a threshold key controlled by validators, aggregating the encrypted amounts homomorphically, decrypting only the batch total, and then computing the clearing price from that total — individual amounts are never revealed even to the validators, only the net batch flow.This is the correct architecture for a shielded DEX that achieves all three properties simultaneously.
Penumbra themselves could not ship individual trade amount privacy in their initial mainnet release because the threshold cryptography infrastructure required was not yet available.This is the state of the field, not a gap specific to this proposal.
Given this, I want to be precise about what ZPrivDEX v1 actually achieves and what it does not claim:
What it achieves:
Trader identity is private. Zcash’s Orchard note commitment and nullifier scheme means any full node can verify a valid trade occurred without learning who made it, what their balance is, or their transaction history. This is meaningful — on every transparent DEX today, trader identity and full history are public.
FROST custody removes single-party fund control. No single entity can move pool funds unilaterally. This is an improvement over every existing Zcash DEX integration regardless of the ZKP question.
The AMM invariant is publicly verifiable when pool state is public. Any full node can verify it without trusting anyone.
What it does not achieve in v1:
Individual trade size privacy. With public pool state, delta is visible. This is the honest limitation.
The path to full privacy:
Batch processing with threshold encryption over Zcash’s FROST infrastructure is the direction. Users submit encrypted trade intents. The FROST signer group aggregates the encrypted amounts homomorphically and decrypts only the batch total to compute the clearing price. Individual amounts remain hidden even from signers. This is architecturally aligned with how FROST is already used in this design and is the correct item for the research roadmap.
I should have stated these boundaries clearly from the beginning of this conversation. Thank you for the precision — this exchange has produced a more honest design document than what was originally proposed.
With public pool state, the ZKP’s role narrows to proving trader identity privacy — who traded, which note they owned, where the output goes — without revealing any of that to public observers. Trade size is visible as the pool delta. Identity is not. That is a narrower guarantee than originally described but it is real and it is what Orchard’s note model is designed to provide.
@hanh @zooko