A compliant USDC privacy pool on Stellar. Deposit USDC, withdraw to a fresh address, and the on-chain link between the two is gone, proven with zero knowledge and verified inside a Soroban contract.
Built for Stellar Hacks: Real-World ZK. Research project, testnet only, not audited, no real funds.
Live app: eclipseprivacy.xyz · Demo video: watch on Loom
- Deposit. Pick a
secret+nullifier, postcommitment = Poseidon(nullifier, secret)with 1 USDC. The contract adds it to a Merkle tree. - Withdraw. From any wallet, prove in zero knowledge that you own one of the
tree's commitments (without revealing which), reveal a one-time
nullifierHash, and the contract pays out. No link to your deposit.
The proof is generated in your browser (secrets never leave the device) and verified on-chain with Stellar's native BN254 pairing. The Merkle tree is hashed with Stellar's native Poseidon, byte-identical to the circuit.
Privacy with an off-switch a regulator can use: the operator can freeze a flagged
note by its nullifierHash (the only identifier revealed at withdrawal), so a
tainted note cannot exit the pool. We deliberately avoid a commitment blocklist
(unenforceable, since withdrawals never reveal the commitment). A circuit-level
Association Set (Privacy Pools, Buterin et al.) is the decentralizable successor,
tracked as future work, not claimed in v1.
Live on Stellar testnet (protocol 27): deposit and withdraw settle on-chain, the Groth16 proof is verified by the contract, the pool pays recipient + relayer, and double-spends are rejected.
- Contract
CBRICYFV…7TBUCTS, fixed denomination 1 USDC. - Circuit
withdraw.circom, 5 public inputs, local Groth16 trusted setup. - Soroban contract:
__constructor / deposit / withdraw / backup_note / set_frozen / transfer_admin / accept_admin+ views. - 23 integration tests pass, including the full real-proof deposit→withdraw flow.
- Frontend: React, in-browser proving (Web Worker), Freighter wallet, encrypted note backup.
Tree reconstruction reads an on-chain commitment log, so it never depends on RPC event retention. An optional off-chain gasless relayer is included.
npm install && bash scripts/build-circuit.sh # circuit + trusted setup + proof
cd contracts/eclipse && cargo test # contract (27 tests)
cd frontend && npm install && npm run dev # dApp
See SECURITY.md for the threat model, tests, residual risks, and deployment status.
Stack: Circom + Groth16 (BN254) · Soroban · Stellar Poseidon/BN254 host functions · client-side proving (snarkjs/WASM) · React.
MIT, see LICENSE.
