Hi all,
I want to start somewhere specific: a thread from February that I think identified an important open problem but didn’t get a follow-up.
When the Maya Protocol retroactive grant was being discussed, @ emersonian raised what he called “traceable Orchard.” The framing was precise — when someone deposits into an Orchard address and the system immediately sweeps those funds into a transparent vault before processing the swap, the match between deposit amount and later withdrawal is close enough in amount and timing that the privacy gain is much smaller than it appears. @ itz, Maya’s application owner, confirmed this directly: “You’re right, support right now is as you mention ‘traceable orchard’. Right now, it has to go through our transparent vault. We currently do GG20 and would have to add FROST to fully support Orchard.”
@ZolyDevMaya added something important alongside that: even in a future version where FROST replaced the transparent vault and Maya’s ZEC custody was genuinely shielded, the non-ZEC leg of any cross-chain swap still settles on Bitcoin, Ethereum, or whichever transparent chain is on the other side — and swap metadata stays visible on Mayachain. That’s a fundamental ceiling for cross-chain DEXs. It’s not a criticism of Maya’s work, it’s just what cross-chain architecture looks like when only one side has privacy.
I want to be clear: the Zcash community was right to support that grant. Maya’s engineering was serious and their honesty about the limitations was admirable. @ daira supported it, @ emersonian said he’d have doubled the amount, and the community broadly agreed. The retroactive grant was well-deserved for work that was already shipped and running on mainnet.
But the question that came out of that thread — what would genuinely shielded pool custody actually require, and has anyone built it? — still doesn’t have an answer. That’s what this proposal is about.
The problem, stated plainly
If you hold ZEC and want to swap it for another asset today, every path available puts your funds through a transparent address at some point:
Maya Protocol, which has done more than anyone to bring shielded ZEC to cross-chain trading, confirmed as recently as March 2026 that all inbound swap addresses are transparent, even when routing from a shielded source to a shielded destination. That will improve over time, but it is the current state.
Wrapped ZEC on Ethereum-based DEXs means bridging out of the Zcash network entirely, abandoning every privacy guarantee Zcash provides, and introducing bridge risk on top of it.
Centralized exchanges have been narrowing support for shielded deposits specifically, and some jurisdictions block shielded withdrawals entirely.
None of this is a failure of the projects involved — it reflects a genuine technical gap. The threshold signature systems that allow multiple validators to jointly control large amounts of crypto (GG20, MPC schemes generally) work cleanly with transparent addresses. They do not support Orchard addresses, because Orchard spend authorization uses re-randomized Schnorr signatures (RedDSA), and generic MPC systems don’t implement the re-randomization that Orchard requires for unlinkability.
The Zcash Foundation solved this. Their re-randomized FROST implementation (ZIP-312, frost-rerandomized over RedPallas) is specifically designed to produce spend authorization signatures compatible with Orchard, while maintaining the unlinkability property that makes Orchard private. They declared it production-ready in 2024 and have been encouraging wallet integration. Zenith’s 2025 grant is building wallet multi-sig on top of it.
Nobody has built DeFi pool custody on top of it. That’s the gap.
What ZPrivDEX builds
A constant-product AMM — the same x * y = k formula behind most decentralized exchanges — where two things are structurally different from every existing Zcash DEX integration:
Pool custody lives in Orchard unified addresses. The spending key for the pool is never held by any single party. Instead it’s distributed across a 5-of-9 threshold using ZcashFoundation/frost with the frost-rerandomized ciphersuite over RedPallas. Signing ceremonies use the frostd and frost-client tooling that ZF has already released. Partially Created Zcash Transactions (PCZTs) handle the multi-round signing flow, using the pczt crate already in librustzcash. A compromised coordinator can delay operations but cannot steal funds without 5 valid threshold shares.
Trade validity is enforced by a Halo2 zero-knowledge proof. The circuit proves that x_old * y_old = x_new * y_new — the AMM invariant — without revealing what x_old, y_old, x_new, or y_new actually are. The circuit uses halo2_proofs 0.3.0 and the Pallas curve: the same crate and same curve as Zcash’s Orchard protocol, which means it composes naturally with Orchard’s note commitment and nullifier constraints in the full implementation. The public input is a commitment to the pool state. The verifier — the FROST signer group — confirms the trade was fair before co-signing the output transaction, without seeing the balances.
This combination means pool funds never touch a transparent address. No transparent vault, no sweep-and-restore pattern. Just Orchard notes, FROST custody, and ZK math.
A third component — decentralized lightwalletd — runs in parallel. ZCG has an open RFP for this. A shielded DEX that depends on a centralized sync server is fragile in ways that matter for a privacy tool. This piece gets built as a standalone public-good library regardless of how the rest of ZPrivDEX is received. It’s infrastructure the whole ecosystem needs and the RFP has been sitting open.
Where @ZolyDevMaya’s point actually helps this proposal
The structural ceiling they identified — that cross-chain swaps are inherently limited because the non-Zcash leg settles transparently — doesn’t apply to a same-chain AMM. ZPrivDEX trades only between Zcash-native assets: ZEC, and ZSA tokens once NU7 activates (ZIP-226/227). There is no cross-chain leg to worry about. The entire swap lifecycle — deposit, trade proof, output — stays within the Zcash shielded pool. It’s a narrower scope than Maya’s cross-chain vision, but for the privacy properties, that narrowness is actually the point.
Technical proof of concept
I have a working implementation of the pool invariant constraint system in Halo2. Around 350 lines of Rust, halo2_proofs 0.3.0 over Pallas, 11 tests covering both valid pool transitions (completeness) and attack scenarios including pool drain attempts, inflated outputs, and tampered public inputs (soundness). The full proof generation demo runs end-to-end in under 30 seconds on a laptop.
The code is almost ready to publish. I am deliberately not posting a half-finished repository in a community thread — that does more harm than good for credibility. It will be linked in the GitHub application, and I’ll update this post with the link when it’s up. If you’re technically inclined and want to see the circuit code before then to evaluate whether the constraint system design makes sense, message me directly. I’d rather show it to technical reviewers informally first.
The FROST custody system and lightwalletd layer are designed but not yet coded. The circuit prototype exists to validate the hardest claim in the proposal: that you can enforce AMM fairness in Halo2 without revealing pool balances. That’s the part that fails quietly if the design is wrong.
Three things I’m genuinely uncertain about and want community input on
Signer set decentralization. Cryptographically a 5-of-9 threshold is sound. Practically, if 6 of 9 signers are the same organization, the security model collapses to something much weaker. For launch I can publish packaged signer daemon binaries and clear setup documentation to make it easy for community members to run nodes, and I can commit to publishing the full signer set composition publicly so anyone can audit who is running what. But building real trust in a distributed signer group takes time that can’t be shortcut. I’m curious how others in this community think about “good enough for launch” on signer distribution, and whether there are precedents from other Zcash infrastructure projects worth looking at.
Proof generation time at full circuit scale. The prototype circuit is small. The production circuit — with Poseidon pool state commitments and Orchard note validity constraints added — will be considerably larger. I’ve designed a fallback: split the pool invariant proof and the spend authorization proof, link them by commitment hash, generate in parallel. That solves proving time at the cost of more complexity in the verifier. I won’t have real benchmarks until M3. If the committee has asked other ZK-based proposals hard questions about this, I’d like to know what those questions were so I can address them proactively.
NU7 dependency for the ZSA work. Everything through M7 — FROST custody, the ZK-AMM, the audit, lightwalletd — runs on current Zcash. M8, which adds ZSA pool pairs and a ZEC-collateralized ZUSD stablecoin, depends on NU7. If NU7 slips past its target, M8 reschedules by mutual agreement with ZCG rather than being rushed against an unstable protocol surface. That’s my plan, but I want to name it explicitly rather than quietly hoping the timeline holds.
Budget summary
$203,000 over 13 months, 8 milestones. Roughly 68% is engineering compensation for two people at below-market rates for this type of cryptography work. The largest external cost is a security audit ($35,000, targeting Least Authority who audited Sapling — the right firm for FROST and Halo2 in the same engagement). The rest is infrastructure and a contingency buffer.
I know this is a large ask for a team without a prior ZCG grant. I’ve tried to account for that by making every milestone deliverable independently verifiable by someone outside the project, and by building the circuit prototype before asking rather than after. The full breakdown is in the GitHub application when it goes up.
What I want from this thread
Real criticism, not encouragement. Specifically: if the FROST/Orchard composition has a problem I haven’t seen, if the circuit approach has a flaw, if there’s existing work that already does what I’m describing, I want to know now. The formal application goes in after this thread has had time to breathe and I’ve incorporated whatever comes out of it.
One more thing. I want to be careful that nothing in this post reads as diminishing Maya’s work. It doesn’t. @ itz and @ ZolyDevMaya were transparent about their architecture in a way that a lot of projects aren’t, and the community recognized that. The “traceable Orchard” framing @ emersonian introduced is useful vocabulary, not a criticism. ZPrivDEX addresses a different and narrower problem: what does fully shielded AMM custody look like on a single chain. Maya solved cross-chain liquidity access with the tools available. These are adjacent problems, not competing ones.
Thanks for reading.