Tukar
A private way to send money home, on Stellar. Fiat in → shielded USDC transfer → fiat out. Private in the middle, accountable at the edges.
Find Your Way (Sep 1 – Oct 12, 2026): what is new in this window
Tukar started in June 2026, so it is not a from-scratch build. This is what changed during Find Your Way, so judges can tell the new work from the old:
- Protocol 28. Moved to Stellar SDK v17 and corrected the code that had drifted from it.
- A guard closed. A rules audit found a check that stopped at the write path, so it was extended to cover the rest.
- Operator monitoring. It now sees every deposit that is actually in the pool.
- Judge feedback answered. Claims the code did not support were corrected, untested paths got tests, and the open audit-request gate on the live pool is disclosed.
- Demo. Re-recorded from the live site, with every sped-up second labelled, plus a 1:45 live cut.
Full list: git log --since=2026-09-01.
Tukar is a consumer cross-border payments app: the everyday job of sending
money home to family, made private. It ships as mobile-first Sender and Receiver
apps (/sender, /receiver) with real fiat in and out at the edges, and a
private cross-border remittance corridor underneath. Built for the
Stellar Hacks: Real-World ZK
hackathon, where it placed 5th, and a Grand Finalist in the Stellar APAC
hackathon's Payments & Consumer Applications category, because that is what it
is: a way for a person to pay another person across a border. Money enters in one country, crosses the corridor
with its amount and counterparties hidden on-chain in the shielded transfer leg,
and exits as local fiat in another country. (Deposits and withdrawals are public at
the edges, by Privacy-Pools design; see
the privacy model.)
At each edge, zero-knowledge compliance proofs keep the corridor auditable
without ever exposing the private payment graph.
Tukar's moat is not the payment, it is the compliant on-chain privacy. A consumer sends money privately, and a regulator can still check a fact on-chain via selective disclosure. That is the part a plain wallet or a plain mixer does not have.
Stellar's whole reason for existing is moving real money across borders. Tukar takes that exact rail and makes it confidential and compliant, following Stellar's privacy strategy and the shape the Privacy Pools whitepaper argues for (visible deposits/withdrawals, private transfers, ASP + selective disclosure for compliance). One difference is worth knowing up front: the whitepaper proves association at withdrawal, Tukar proves it at deposit. See ARCHITECTURE.md for why, and for what that costs.
Where Tukar sits in Stellar's privacy stack
Stellar's privacy stack has two complementary tiers, and Stellar itself draws the line (Confidential Tokens preview, Jun 2026):
- Confidential, not anonymous. OpenZeppelin's Confidential Tokens (Noir + Nethermind UltraHonk) hide balances and amounts but keep sender/recipient visible. Ideal for treasury, payroll, institutional settlement, with known counterparties.
- Anonymous (privacy pool). The tier that also hides the counterparties. The Confidential Tokens post names Stellar Private Payments (SPP) here: "privacy pool implementations ... shield both the parties and the amounts." Tukar is in this tier. Its shielded transfer leg hides amount and who-paid-whom, which is exactly the cross-border-remittance threat model (a corridor must not leak the payment graph).
So Tukar isn't an alternative to Confidential Tokens. It's the more-private remittance tier of the same stack, and it ships the same compliance primitives Stellar shipped (auditor/selective disclosure + an ASP allow/deny policy), built independently during the hackathon. Honest scope: Confidential Tokens is an official, audit-in-progress preview; Tukar is a hackathon implementation of the privacy-pool tier, with its ZK verified live on testnet.
What makes Tukar different
Most on-chain privacy projects stop at "hide the payment." Tukar is built for one specific job, cross-border remittance, and three things set it apart from generic private-payment or encryption-infra work:
- Compliant privacy, not just privacy. Private in the middle, accountable at the
edges. Every deposit carries an ASP compliance proof that authenticates the
depositor (
sourceKeypinned tofield(from), so you can't deposit as someone else), and a holder can prove one fact to a regulator via selective disclosure, verified on-chain. A corridor a regulator can audit is a corridor a licensed anchor can actually run. That's the wedge a pure mixer doesn't have. - Remittance end-to-end, not a generic shield. Fiat-in → shielded crossing → fiat-out to local currency, across 10 corridors. The privacy serves the payment; the payment isn't an afterthought to the privacy.
- Oracle-gated settlement. The off-ramp rate is read on-chain from Reflector and gates fund release (min-receive on the median of 5 records, fail-closed). The privacy layer is bound to real-world FX, so funds never move on a stale or manipulated rate. No pure-privacy project ties settlement to an on-chain oracle.
Put together, that is a privacy-pool remittance corridor with ASP compliance and
selective disclosure, a combination with no catalog equivalent. The wedge in one line is
private for users AND provable to regulators, on the chain built for cross-border
money. So "this already exists (LumenShade / Moonlight / Fairblock)" misses the
combination: those are privacy primitives or infra on other models, not a compliant
remittance corridor on Stellar's anchor rail with in-circuit ASP compliance, four
contract-verified disclosure types, and a load-bearing settlement oracle. For an honest
map of the neighbours (Confidential Tokens, LumenShade, Moonlight, Fairblock) and exactly
where Tukar differs and where it stays composable, see
docs/COMPETITIVE.md.
Market, users, and business
Who it's for. The end users are the migrant worker sending money home and the family receiving it in local currency. The paying customer is the licensed anchor or PSP that needs a private corridor it can still audit. B2B2C, so Tukar doesn't acquire consumers one at a time.
Market. Remittances into low- and middle-income countries reached about $669B in 2023, and sending $200 still costs about 6.2% on average, more than double the UN's 3% target and barely changed in a decade. Public stablecoin rails cut that fee but expose every amount and counterparty; pure privacy tools hide it but can't answer a regulator. A licensed corridor needs both, which is the gap Tukar fills.
Model. Tukar is the private settlement leg between anchors. Revenue is a thin take-rate on settlement volume, paid by the anchors and PSPs that route through the corridor. Go-to-market is one high-volume lane with one licensed anchor first, then more corridors; the post-hackathon path is a Stellar Community Fund build award on the same rail.
Recognition. Tukar placed 5th in Stellar Hacks: Real-World ZK, the hackathon run by the Stellar Development Foundation on DoraHacks, and was a Grand Finalist in the Stellar APAC hackathon, Payments and Consumer Applications category. That is outside validation by Stellar ecosystem judges. It is recognition, not users or volume, and not an endorsement by SDF or SCF.
Honest status. This is a testnet build with no users or revenue yet. The above is the opportunity and the model, not traction.
Built by. One person, Pugar Huda Mantoro, who has built similar systems before, solo (live links checked 2026-09-21):
- Privacy and confidential settlement across several chains: Segel (source), a confidential sealed-bid OTC desk on Stellar with Vickrey settlement proven in Circom/Groth16 on BN254 and verified by Soroban, the closest prior work; Bisik on Canton; Senyap on Midnight; Diam on iExec Nox (1st, iExec Vibe Coding Challenge); Sealed Pair on Sui with Walrus (Best Walrus Integration, Tatum x Sui); Saksi, a confidential holder register for tokenized RWAs; and Jalin, an execution router for the STRK20 shielded pool.
- Compliance and proof of reserves: Amanah, a compliant RWA treasury agent on Casper, and Utuh, a completeness layer for Creditcoin's Attestcoin Protocol.
- Stellar: Segel, Tukar, and Pulsar, AI agent billing via an MPP session on testnet.
- Payments: KasPay, a Kaspa payment gateway (Top 10 Finalist and Community Choice, Kaspathon).
This is a record of building, not of scaling. None of these has run at production volume or had paying users. The nearest thing to reuse by others is Brownie to Ape, a migration codemod validated on five open-source repositories including Yearn Finance, and that is not scaling either.
Sources: World Bank, Migration and Development Brief 39 (Dec 2023) for remittance volume; World Bank Remittance Prices Worldwide for the average cost of sending $200.
What shipped this session, and what's still ahead
The core (8 circuits, 15 Soroban contracts, 333 Cargo and 282 webapp tests, the live corridor, in-circuit compliance, four selective-disclosure types, and the oracle gate) runs on testnet today. The compliant-privacy-pool idea is crowded on Stellar, so the differentiation deepens along five lines, and this session moved most of them from reference demos into working, testnet-live features. Each item below is real and on testnet unless marked, and the honest limits stay in the limits section further down.
- A compliance-and-privacy layer for anchors, not another app. Tukar is the private,
compliant settlement layer a licensed Stellar anchor (e.g. Yellow Card, Cash Abroad, both
live anchors) plugs into, with policy configurable per corridor. There is now an on-chain
per-corridor policy registry that stores each corridor's compliance policy on-chain, and a
preview enforcement pool that rejects over-cap withdrawals on-chain. The global ASP
allow-root and deny-list stay the enforced policy on the live pool; per-corridor on-chain
enforcement ships on a preview track because the live pool has no upgrade hook (a state
migration is the production step). An admin timelock ships on the same preview track: the
five compliance-critical setters (
set_asp_root,set_deny_list,set_fx_oracle,set_auditor,set_policy_registry) are behind propose then a mandatory delay then execute, with cancel and pending views, so a stolen admin key can no longer flip the allow/deny controls in one transaction (e2e-proven on-chain, cargo 78/78). Applying it to the live pool via the migration and pairing the admin with a Stellar multisig account is the remaining step. B2B2C infrastructure, so rival privacy apps become integrators rather than competitors. - FATF Travel Rule. Beyond the Regulator's IVMS101 reference tab, Tukar now speaks a real OpenVASP TRP 3.2.1 Travel Rule exchange with a TRISA companion node alongside it, so two anchors exchange the required originator and beneficiary data without leaking the public payment graph. TRISA activation needs the operator to register a test VASP and host the node.
- Proof-of-personhood via Reclaim. Rather than build KYC, Tukar populates the ASP
allow-list from Reclaim (zkTLS proof-of-personhood, live on
Stellar): a server-side verify checks the Reclaim proof and an allow-list update loop
has the operator apply
set_asp_root, so a verified person is added to the on-chain allow-root with no redeploy. idOS reusable KYC is integrated alongside it: a user shares an existing credential from a trusted issuer and the server reads and verifies it (needs the idOS consumer env). It does not feed the allow-list: idOS names a credential's owner by idOS user id, and a consumer cannot read that owner's registered wallets, so a verified share cannot be bound to a Stellar address. Reclaim is the path onto the allow-list. - Cross-chain via Circle CCTP V2. Bidirectional CCTP V2 (EVM <-> Stellar) is wired, so value moves into and out of the corridor across chains. The burn leg needs a user EVM wallet to sign.
- Recurring private remittances. Recurring on-chain sends ship with wallet-signed authorization and a private per-owner store, so a worker can schedule a monthly send.
Two more pieces landed alongside these. An exact liability accumulator folds each deposit's
proven amount into an on-chain running total and subtracts the public off-ramp amount on each
withdraw, so attest_reserves checks the total against custody with no depositor opening
witnesses at read time; a no-redeploy voluntary aggregate any set of depositors can
contribute to also ships.
Read the numbers before reading that as proof of reserves for the corridor, because they are
not close. On 2026-09-12 the live pool holds 61 leaves and 5,682 USDC. The accumulator is
deployed on its own preview pool with leaf_count 1 and total_liabilities 10000000, which is
one note of 0.1 USDC. The reserves contract pointed at the live pool returns latest_attestation
null and is_solvent false, because no attestation has ever been posted. The voluntary
aggregate reports covered_count 0 and proven_liabilities 0 against those 5,682 USDC. So the
mechanism is built and exercised, and its coverage of the live corridor is zero. Applying it
there needs the state migration, which is Tranche 1 work. It is also worth being exact about the
word cryptographic: the accumulator itself is an i128 counter compared against balance(), and
the cryptography is the pre-existing amount-binding proof that fixes what each deposit may add.
The
accumulator folds +amount on deposit and -released (the public, proof-bound off-ramp amount) on
withdraw, so the on-chain total equals the exact live outstanding liabilities, a tight solvency
statement rather than an over-count.
And a public /verify receipt verifier with a note-status double-spend API lets anyone check
a disclosure receipt or a note's spent status without trusting the operator, backed by an
oracle-signed rate attestation on the off-ramp quote.
Still ahead: per-corridor on-chain enforcement on the live pool (a state migration) and TRISA activation (the operator's VASP cert and host). They are the path from the working testnet build to a production, multi-anchor corridor.
TL;DR for judges
What: a private cross-border remittance corridor. Real testnet USDC enters, crosses with amount + counterparties hidden on-chain in the shielded transfer (deposit/withdraw edges public by design), exits, with ZK compliance proofs at the edges and selective disclosure to regulators.
ZK is load-bearing: seven Circom/Groth16/BN254 circuits do the real work, four core (shielded transfer, ASP compliance, selective disclosure, trustless tree update) plus three selective-disclosure variants (threshold, aggregate, two-sided range). Without them the product does not exist.
It runs on Stellar. The 8 core contracts below are live on testnet and all exercised (7 additive contracts bring the deployed total to 15, see
deployments/testnet.json):Contract Role Verified on testnet pool orchestration, token custody, root/nullifier/commitment sets deposit · withdraw · disclose · double-spend rejected disclosure verifier selective disclosure to regulator verify→true; tampered →InvalidProoftransfer verifier shielded JoinSplit verify→truecompliance verifier ASP allow/deny verify→truemerkleUpdate verifier trustless root advance verify→true; fake root →InvalidProofthreshold verifier disclosure: amount ≤ a figure (amount hidden) verify→trueaggregate verifier disclosure: Σ portfolio ≤ cap, bound to an on-chain audit request verify→truerange verifier disclosure: two-sided band lower ≤ amount ≤ upperverify→trueContract addresses (Stellar testnet). Copy-paste form of the table above:
pool CBIYQACYOKDBPYDGU7DMSHPGJEWP2ZRETXDVOTC5HTU5RJBGDK2MHTWJ transfer verifier CACHZSWXJJAGW5UKA5KME73YV5BVYOXFKGT5KUSXIAS3JJJM4QY3PUNE compliance verifier CDXYGM37TRH4JXBZKVPOOEIDX5L7NUVUXJ63E5BHW2W7O4SKQMWXBCG2 disclosure verifier CAYGURQQK3LCQSQLD4FMPXVYGDXHL3K4GAM6URLCEXCXL2JCORLJ4W4V merkleUpdate verifier CCA3T54EKN3RJD77LRQJ2P664ZF3U4STPRQIK4IIQWPACRLXB3JS3X6H threshold verifier CDGOSIZQIMACRLIE76SQKKHUOKURGTGC4T2CKM2K62YP6463QR2KLHVR aggregate verifier CCTN437J4BX6S4JDMGUZFS2IEHV4ECHHK4ZLMM3N6VU5IIX2777AZJYA range verifier CDUONEVPPH7WI7EPSXZE3YXEF4FHHJM7HFJOTZBCJNJSUG26UMENUPQW USDC (SAC, testnet) CAT6F6HX4B2DBPSS4SIZ257IYSMKDKRJSEGIQTKBDS7LOFRMDXVGFVA2Network: Stellar testnet (
Test SDF Network ; September 2015). The same ids live indeployments/testnet.json.🌐 Live site: https://tukar-six.vercel.app, a Next.js app. The landing page (
/) opens onto the product surfaces: Sender (/sender) and Receiver (/receiver), mobile-first consumer PWAs; Regulator (/regulator) and Operator (/operator), desktop dashboards; and the pitch deck (/deck). Send builds compliance + amount-binding proofs in your browser and deposits real USDC on-chain (watch the pool's commitment count rise); the receiver off-ramps to fiat; and a regulator audit produces a disclosure proof verified on-chain by the live Stellar verifier. No install needed. The consoles are open to view, and each sensitive action gates itself: a deposit needs the ASP allow-list (proven in-circuit), issuing a regulator audit request needs the auditor key, and operator admin writes build an offline-signed command (the admin key never enters the browser). One tap activates the built-in testnet key (funded and allow-listed) to sign, or connect Freighter to sign with your own; when several people test at once a UI hint suggests Freighter to avoid sharing one key's sequence. Pick a destination corridor, 10 of them (Indonesia, Philippines, Vietnam, Thailand, India, Mexico, Brazil, Argentina, Nigeria, Colombia), and the off-ramp converts at a live USD→local exchange rate. For Mexico, Brazil, Argentina and Thailand (the first SEA corridor with an on-chain FX oracle), the receiver's revealed fiat figure is computed on-chain by the pool contract itself, which cross-contract-reads Reflector, Stellar's decentralized SEP-40 FX oracle (pool.offramp_quote→ Reflectorlastprice), so the number comes from our Soroban contract reading a partner oracle on-chain, not a client-side hardcode (the other corridors fall back to a public FX API). For those four corridors the withdraw also carries an optional min-receive gate: it passes the live quote asmin_local_out, and the pool re-reads Reflector on-chain at settlement and refuses to release below ~99% of it (SlippageExceeded), failing closed if the feed is down, so the oracle is load-bearing for fund movement, not just display. A plain withdraw (no gate) still settles in USDC and never touches the oracle.One unified app (
webapp/). The live site is a single Next.js app inwebapp/: the landing page plus four role-specific apps over the same live pool and the same in-browser proving. (The old all-in-one/democonsole is retired; it now redirects to the landing page.)- Sender (
/sender) and Receiver (/receiver), mobile-first consumer apps: Sender funds the corridor and builds the shielded deposit; Receiver holds/receives a note and off-ramps to local fiat. - Regulator (
/regulator), an auditor dashboard that requests and verifies the selective-disclosure proofs (exact, threshold, aggregate, range) on-chain. - Operator (
/operator), a corridor-operator dashboard over pool activity and state.
- Sender (
Run locally:
cd webapp && npm install && npm run dev→ http://localhost:3000.Gasless, natively: fees can be sponsored by a relayer via Stellar's native fee-bump (CAP-15), the no-gated-token alternative to a Launchtube paymaster. Proven on testnet:
npm run demo:feebump(a tx signed by one account, fee paid by another). Seedocs/ALTERNATIVES.mdfor how each externally-gated integration (Launchtube, Mercury, passkeys, SEP-24) maps to a native alternative and what's verifiable here.Demo video (self-hosted, always available): ▶ Watch the narrated walkthrough plays on slide 8 of the pitch deck, or open the raw file directly at
/demo-id.mp4. Short on time? The 1:45 live demo cut is the same capture trimmed to the payment itself. The team presentation video is at/team.mp4. The full cut is a 3:10 1080p walkthrough of the real on-chain flow across all four apps (connect → compliance proof on the device → on-chain deposit → claim note → the local figure read on-chain from Reflector → anchor quote → on-chain withdraw → selective disclosure → verified on-chain → a tampered receipt rejected on-chain → regulator audit, Travel Rule and compliance export → operator pool, reserves, policy and oracle → the public verify page), narrated with a neural voice and captioned throughout. Every frame is the running app: Playwright drives and records it (video/capture.mjs),edge-ttsnarrates (video/vo.py), and Remotion composes it into the kraft-and-label world (video/src/). On-chain waits are sped up, never cut, and the frame says by how much. Rebuild withcd video && npm run vo && npm run capture && npm run prep && npm run render. The script lives invideo/script.json, with the longer reading scripts indocs/DEMO_VO_SUBTITLES.mdand a slide-by-slide deck script indocs/DECK_SCRIPT.md.
Production readiness
Tukar is deployed and running, not a prototype in a branch.
- Live production deployment. https://tukar-six.vercel.app
(Next.js static export on Vercel). Pitch deck at
/deck, demo video at/demo-id.mp4, team video at/team.mp4. - Mobile-responsive. Sender and Receiver are mobile-first PWAs; Regulator and Operator consoles adapt from desktop to a mobile drawer. No horizontal overflow at 390px on any surface.
- Loading and error states. Every on-chain read shows a skeleton while pending; failures surface as toasts with honest messages (stale oracle, RPC blip, account not allow-listed, insufficient funds), never a silent failure.
- Monitoring and analytics. Vercel Web Analytics and Speed Insights are integrated
(
@vercel/analyticsand@vercel/speed-insightsinwebapp/app/layout.tsx) for page traffic and Core Web Vitals. - Smart contracts on testnet. 8 Soroban contracts (pool plus 7 verifiers); addresses in the
contract table above and in
deployments/testnet.json. 333 passing Cargo tests across the eight crates (pool 55, pool-enforced 71, pool-timelock 89, pool-accumulator 78, policy-registry 6, reserves 6, reserves-aggregate 12). - Architecture and docs.
docs/ARCHITECTURE.md,docs/ONCHAIN.md,docs/TESTING.md. - Real on-chain wallet interactions. Every send, withdraw, and disclosure is a real testnet transaction. The pool and its activity are publicly verifiable on stellar.expert. The built-in testnet key and Freighter both sign real transactions.
- Commits. Public repository with well over 15 meaningful commits (see the git history).
Still needed for full Level 4 (real data the team must provide, not fabricated): at least 10
real users onboarded with proof of their wallet interactions, and a short user-feedback summary.
Tukar is a testnet build; real users and their feedback are the honest next step. See
docs/ONBOARDING.md for the Google Form spec, the export-to-README
process, the proof-of-wallet-interactions method (stellar.expert), and the improvement-plan
template. The exported responses sheet gets linked here once real testers are collected.
Screenshots
| Landing (desktop) | Sender (desktop) |
|---|---|
![]() |
![]() |
| Operator monitoring (desktop, live testnet reads) | Regulator console (desktop) |
|---|---|
![]() |
![]() |
| Sender (mobile, 390px) | Receiver (mobile, 390px) | Operator (mobile, 390px) |
|---|---|---|
![]() |
![]() |
![]() |
Public receipt verifier: 
Mobile-first actor apps at 390px and desktop monitoring consoles, all read live from Stellar testnet. The Operator console is the live monitoring surface (pool health, reserves, oracle freshness). Web Analytics and Core Web Vitals appear in the project's Vercel dashboard once Web Analytics is enabled and traffic arrives.
Features and how they work
A quick map of what's in the box and the mechanism behind each. The deep dives follow in the next two sections.
- Shielded transfer (the private crossing). Each note enters a Merkle tree as a Poseidon
commitment; spending it reveals only a nullifier, which the pool rejects if it has been seen
before (no double-spend). The
transferJoinSplit circuit proves membership, correct nullifiers, and value conservation without revealing the amount or the parties. - In-circuit compliance (ASP allow + deny). Every deposit proves the depositor is in the
allow-list Merkle root and not in the sanctioned deny-list, with the proving key pinned to
field(from)so you can't deposit as someone else. Compliance lives in the proof, not a promise. - Selective disclosure (four kinds). A holder proves one fact and nothing else: the exact amount, a threshold (at or under a figure), a two-sided range, or an aggregate (sum at or under a cap). Each produces an exportable receipt.
- Aggregate completeness (on-chain). The regulator registers an audit request on-chain;
disclose_aggregaterejects any hash that was never registered, so a holder can't cherry-pick which payments to include (UnknownAuditRequest). - On-chain verification. Proofs are built in the browser (snarkjs/WASM, secrets never
leave the device) and verified by Soroban BN254 contracts. Genuine returns valid; tampered
returns
InvalidProof; a cross-wallet double-spend is rejected asNullifierUsed. - Trustless tree. The
merkleUpdatecircuit proves that inserting a leaf intoold_rootyields exactlynew_root, so the tree advances with no admin backdoor. - Oracle-gated off-ramp. The local-currency rate is read on-chain from the Reflector SEP-40 oracle on a median of five sources; the withdraw carries a min-receive gate and fails closed if the feed stalls, so funds never move on a bad price.
- Fiat edges (SEP anchors). On and off ramps run over SEP-10 plus SEP-24 against SDF's reference anchor, with live Onramper quotes as the licensed off-ramp path. The SEP calls are real; the testnet reference anchor's KYC is a test stub, so no real fiat moves. Going live swaps in one licensed anchor and the SEP flow is identical.
- No-install wallet. A one-tap built-in testnet key (no seed phrase) signs real testnet transactions, or connect Freighter for your own key.
- Four apps. Sender and Receiver are mobile-first consumer apps (send, claim, cash out); Regulator and Operator are desktop consoles (verify plus audit requests; pool health, ASP policy, oracle, and config).
- Compliance depth in the consoles. The Regulator maps a verified disclosure to the IVMS101 payload two anchors would exchange, and now speaks a real OpenVASP TRP 3.2.1 Travel Rule exchange with a TRISA companion node (TRISA activation needs the operator's VASP cert and a hosted node). The Operator has compliance-policy-as-code with EU / US / APAC presets, an on-chain per-corridor policy registry, and a preview enforcement pool that rejects over-cap withdrawals on-chain. The global ASP allow-root and deny-list stay the enforced policy on the live pool; per-corridor enforcement is on a preview track because the live pool has no upgrade hook (a state migration is the production step).
- Proof-of-personhood (Reclaim). A person proves personhood with Reclaim
zkTLS; a server-side verify checks the proof and an allow-list update loop has the operator
apply
set_asp_root, adding them to the on-chain allow-root with no redeploy. - Proof-of-reserves. An exact liability accumulator folds each deposit's proven amount into an
on-chain running total and subtracts the public off-ramp amount on each withdraw, so the pool
attests full-pool reserves (
attest_reserveschecks the total against custody) with no depositor opening witnesses at read time. The total folds +amount on deposit and -released on withdraw, so it equals the exact live outstanding liabilities, a tight solvency statement rather than an over-count. A no-redeploy voluntary aggregate any set of depositors can contribute to also ships. - Public receipt verifier. A
/verifypage and a note-status double-spend API let anyone check a disclosure receipt or a note's spent status without trusting the operator; the off-ramp quote carries an oracle-signed rate attestation. - Recurring sends. Schedule a monthly private send with wallet-signed authorization and a private per-owner store, layered on the corridor.
- Cross-chain (Circle CCTP V2). Bidirectional CCTP V2 (EVM <-> Stellar) is wired to move value into and out of the corridor across chains; the burn leg needs a user EVM wallet to sign.
- Also. The anonymity set is surfaced in the UI, gasless fee-bump (CAP-15) is a proven primitive, a tuned Content-Security-Policy ships on all routes, and the corridor spans 10 destinations.
What the ZK is doing (load-bearing)
The zero-knowledge is not decorative. It is the entire product. Eight circuits, all Groth16 over BN254, generated client-side in the browser (WASM) and verified on-chain by Soroban contracts using Stellar's native BN254 host functions (added in Protocol 25/26; testnet runs Protocol 28 "Adapter" today). Secrets never leave the device. Four are the core; the other three are selective-disclosure variants (see the disclosure family below).
| Circuit | Proves | Where |
|---|---|---|
| transfer | Note ownership, correct nullifiers (no double-spend), Merkle inclusion, value conservation | the private transfer |
| compliance | Source ∈ ASP allow-list and ∉ deny-list, bound to the authenticated depositor | deposit only, not withdraw |
| disclosure | A confidential commitment opens to a disclosed amount, bound to an audit request | regulator view |
| merkleUpdate | Inserting a leaf into a known old_root yields exactly new_root |
trustless tree advance |
| thresholdDisclosure | A commitment's amount is ≤ a threshold, without revealing the amount | regulator view |
| aggregateDisclosure | The sum of 1..5 confidential payments is ≤ a cap, bound to an on-chain audit request | regulator view |
| rangeDisclosure | A commitment's amount is in a two-sided band lower ≤ amount ≤ upper, amount hidden |
regulator view |
The disclosure circuit is Tukar's differentiator: the selective-disclosure
layer that turns "private payments" into compliant private payments. See
docs/ARCHITECTURE.md for the full design.
Selective disclosure comes in four types, all compiled, soundness-tested, and live on-chain with each proof bound through the pool to a real deposit:
- Exact (
disclosure.circom). A commitment opens to a disclosed amount. - Threshold (
thresholdDisclosure.circom). The amount is ≤ a reporting figure without revealing the exact amount, the predicate real reporting rules actually want.npm run test:threshold→ 4/4 (under/at-threshold proves with the amount kept private; over-threshold and a mismatched commitment are unprovable). Wired into the demo's Regulator step ("≤ Threshold · amount hidden") and verified live on the deployed verifier:≤ $1000proves with the amount hidden;≤ $100on a $500 payment is honestly shown unprovable. - Aggregate (
aggregateDisclosure.circom). The sum of 1..5 confidential payments is ≤ a cap without revealing any amount (a periodic CTR-style report in ZK). Completeness is enforced on-chain: the proof is bound to anauditContextHashan auditor registers on-chain for the full required set (register_audit_request), anddisclose_aggregaterejects any unregistered hash, so a holder can't report a cherry-picked subset.npm run test:aggregate→ 10/10 (including a substituted note, a wrongctxNonceand a flippedactiveflag, each UNPROVABLE). - Two-sided range (
rangeDisclosure.circom). The amount is in a reportable bandlower ≤ amount ≤ upper, amount hidden.npm run test:range→ 5/5 (in-band proves, boundaries inclusive, below/above and a wrong opening unprovable).
The threshold, aggregate, and range verifiers were deployed additively on top of the four core contracts, giving 8 contracts (pool + 7 verifiers) live on testnet.
What's real (not mocked)
This started as a demo and was hardened, increment by increment, through many adversarial self-audit rounds into a security-hardened testnet system (not professionally audited, see the caveats below). What that means concretely:
- Real USDC, real custody. The pool custodies a real testnet USDC asset
(SAC
CAT6F6HX...FVA2, issuerGC7SWGHR...SY3B).depositmoves the actual amount you type into the pool;withdrawreleases it. - Amount ↔ commitment binding.
depositrequires a second (disclosure) proof that the commitment opens to exactly the deposited amount, so privacy can't decouple the hidden note value from the tokens that moved. - Correct withdraw value semantics. A withdraw carries a negative
publicAmount(r − amount, value leaving the shielded set) and the pool binds the released amount to that field-negative, so it cannot be told to release more than the proof authorizes (AmountNotBound). - Binding closes the double-spend bypass. The pool never accepts a pre-built
public-input vector; it builds the verifier's inputs from the typed signals
itself, so the spent nullifiers / recorded commitments / root / amount are
exactly the ones the proof attests. A valid proof with tampered nullifiers →
InvalidProof. - Fully trustless tree, no admin backdoor. The root advances only via
register_root_verifiedwith amerkleUpdateproof (registering a fake root with a real proof →InvalidProof). The admin root-override was removed; the commitment count is idempotent (no double-count). - Reliable global Merkle accumulator.
register_root_verifiedrequiresold_root == current_root, so the tree is a single append-only accumulator (not a per-session view), and inserting from a stale root is rejected. The ordered leaves live in durable contract state, read vialeaves()/leaf_range(start,count)/leaf_count(paginated, so it scales), so any client reconstructs the exact tree from on-chain state, reload-safe and multi-user-correct, with no dependency on RPC event retention. Leaf/root entries get their TTL extended on each insert (long-lived pools stay readable), and the client auto-retries the concurrent-deposit race. Verified live: leaves accumulate 0→1→2→3→4 across independent sessions/clients. - Compliance that authenticates the depositor (key-on-
from). The compliance circuit'ssourceKeyis a public input the pool pins tofield(from) = keccak256(from XDR) mod r, anddepositrequire_auth(from)s. So the proof shows this authenticated depositor is in the ASP allow-list (and not deny-listed), not merely that some approved source exists. An unapproved key can't deposit. (The shared demo key is allow-listed so the no-install demo works; the design is correct for real-wallet users.) - Real trusted setup. All seven proving keys are derived from the Hermez
perpetual Powers-of-Tau ceremony (
powersOfTau28_hez_final_14.ptau). Phase-1 has no locally-known toxic waste. Verifiers + pool were regenerated together so keys and verifiers stay in sync. - On-chain Poseidon, and a correction. The live pool exposes
poseidon_hash(a,b), a circomlib-exact Poseidon hand-rolled from BN254 Fr host ops (poseidon_hash(1,2)returns0x115cc0f5...4417189a, exactly circomlibjsposeidon([1,2])). It costs13.6M CPU per hash, and we used that to argue a depth-10 insert (135M) can't be hashed on-chain. That premise was outdated. CAP-75 (Protocol 25) added nativeposeidon_permutation/poseidon2_permutationhost functions, which SDF wraps in thesoroban-poseidoncrate. With those, one hash costs ~1.53M CPU and a full depth-10 insert ~10.8M (native test env). On testnet, a real insert simulates at ~12.7M CPU, about an eighth of the per-tx budget. Themerkle-nativecontract is deployed on testnet. It rebuilt the live pool's 64-leaf tree on-chain and reached the same root (seemerkleNative). The live pool still advances its tree with themerkleUpdateSNARK because it was deployed before this and has no upgrade hook.merkle-nativeis the measured replacement path for the next pool, not something the live pool runs today. - Optional real wallet.
webapp/components/WalletProvider.tsxadds an optional Freighter connection (sign deposits with your own wallet, with a one-click testnet faucet); the embedded throwaway key stays the no-install default. - Reload-survivable notes. Your notes persist in
localStorage(keyed by pool), so a page reload restores them, and because the tree reconstructs from durable on-chain state, a deposited note stays withdrawable after you close the tab (verified live: deposit → reload → withdraw the restored note). - Bearer notes (true P2P). A shielded note is the spendable asset, so the receiver can export it as a portable string (and a scannable QR) and hand it to anyone, who imports it on a different device and withdraws. No shared account, no server. The tree reconstructs from chain anywhere, and the imported note's leaf index is resolved on-chain by commitment at withdraw time (verified live: export → fresh wallet → import → on-chain withdraw). Demo keys only. The string carries the note's secret, so treat it like cash.
- Payment requests (the reverse direction). The receiver can ask for money: generate a request (a string and a QR, carrying just an amount + the payee address, no secrets), and the sender loads it to pre-fill the corridor send form and fulfills it with a normal shielded deposit (verified live: request → load → on-chain deposit). Together with bearer notes this closes the P2P loop. Request money one way, hand over a spendable note the other.
- Adversarially self-audited. A read-only audit (see
docs/SECURITY.md) hardened the contract. The verifier's return is now asserted (no fail-open), the deposit amount range and tree capacity are bounded, withdraw resolves the note's real on-chain index, and the withdraw recipient is bound into the proof (the contract recomputeskeccak256(recipient ‖ amount), so a withdraw proof can't be replayed to a different recipient), and compliance now authenticates the depositor (key-on-from, above). The only remaining caveat is that the shared demo key's secret is public, so the public demo itself isn't access-controlled, though the design is correct for real wallets.
55/55 pool unit tests + 6/6 circuit-soundness (plus disclosure-variant
soundness suites: threshold 4/4, two-sided range 5/5, aggregate 10/10) + a
19-point threat model. CI runs the pool tests, the in-browser
proving flow, and the circuit-soundness suite on every push (.github/workflows/ci.yml).
Real-click browser e2e (npm run test:e2e, = playwright test) across
chromium/firefox/webkit plus a 390px mobile project, against the deployed site by
default or a local build with QA_BASE=http://127.0.0.1:3100. Playwright drives genuine
clicks through the full on-chain flow (deposit → reveal → withdraw → disclose →
tamper-rejected), on-chain ASP forge-rejection, corridor switching, graceful junk-input
handling, UI gating, and a cross-wallet double-spend: export a bearer note, reset to
a second holder, import, and the on-chain NullifierUsed (#2) rejects the second
spend, all with zero uncaught page errors. Back-to-back txns on the shared demo key ride
a rebuild-and-retry that self-heals transient testnet faults (sequence races,
TRY_AGAIN_LATER, RPC 5xx); a contract revert like that double-spend #2 is
deterministic and is never retried, so it surfaces immediately.
CI runs the chain-free half of that suite on every push, 63 chromium tests
(routes / a11y / edge-inputs / failure / mobile / resilience) against a real
next start build. The specs that spend the shared testnet key's USDC (features,
exhaustive, p28-live) and the push specs (need a real Chrome + CRON_SECRET) stay a
local/manual sweep; the CI job says so in a comment rather than pretending otherwise. See
docs/TESTING.md §6.
Trusted setup is independently verifiable: all seven deployed proving keys
provably derive from the real Hermez ceremony. snarkjs zkey verify <r1cs> pot14_hez.ptau <zkey> returns ZKey Ok! for every circuit (TESTING.md §5).
Honest limits, and how far it's actually built
- The fiat edges run against SDF's testnet reference anchor, not a licensed one (its KYC
is a test stub and no real fiat moves; the corridor settles in testnet USDC). The anchor
SEP protocols themselves are really integrated. Tukar publishes
a SEP-1
stellar.toml, andnpm run sep:anchorauthenticates (SEP-10 JWT) and opens a real interactive USDC on-ramp (SEP-24) against SDF's reference anchor, plus SEP-6/SEP-31/info, 5/5 live (docs/ALTERNATIVES.md§6). It's also wired into the app UI: the wallet bar's anchor on-ramp and the Receiver's "Withdraw via anchor (SEP-24)" sign the SEP-10 challenge (built-in key or Freighter) and open the real anchor window, with the SEP-24 transaction status polled live. A production ramp needs a licensed KYC anchor (business, not code). The ASP allow-list is a real, configurable policy, not a single seeded witness:scripts/build-asp.mjsbuilds it from a list of approved Stellar accounts (field(addr) = keccak256(addr XDR) mod r, the exact value the pool pins asfield(from)), and the admin re-points the live policy withset_asp_root, no redeploy.npm run test:aspproves the widening is sound (4/4): a non-demo approved account produces a real compliance proof that verifies and is bound to its key, while a non-member and a deny-listed account are rejected by the circuit itself; the demo-only build still reproduces the deployed root (non-breaking). Corridors span 10 destinations. - Phase-2 of the trusted setup, multi-party and now the live keys. A runnable
multi-party phase-2 ceremony ships and has been run + verified for all seven
circuits.
npm run ceremony(orscripts/ceremony-phase2.sh) does 3 independent contributions + a public random beacon andsnarkjs zkey verify→ZKey Ok!; committed transcripts atceremony/<circuit>/TRANSCRIPT.txtfor all seven (transfer, compliance, disclosure, merkleUpdate, thresholdDisclosure, aggregateDisclosure, rangeDisclosure) anddocs/CEREMONY.mdfor the production (independent-party) flow. These ceremony keys are now the deployed keys. The seven livefrontend/circuit/*_final.zkeyare byte-identical to the ceremony output and the on-chain verifiers embed the matching VKs. Honest caveat: the demo ran all rounds on one machine to prove the process; the one-honest-party soundness guarantee needs genuinely independent contributors, which a production ceremony provides. - The off-chain Merkle witness (path) is computed in the browser; on-chain
integrity is enforced by the
merkleUpdateproof. - Tree scale: the accumulator now paginates (
leaf_range), bumps TTL on each insert, and auto-retries the concurrent-deposit race, so it holds up beyond demo scale (bounded only by the tree capacity, 2¹⁰ = 1024 leaves). A very-long-lived production pool would still want a periodic TTL-maintenance job and an indexer for fast reads. - Aggregate (portfolio) disclosure, completeness enforced on-chain via an audit registry.
The variable-count aggregate proves the sum of the active payments is under the cap. Two layers
make it a complete report: (1) the circuit binds the report to an audit-request hash
(
auditContextHash = Poseidon(ctxNonce, commitments, active)) so it can't be trimmed relative to a request, and (2) an auditor role registers that hash on-chain for the full required set (register_audit_request), anddisclose_aggregaterejects any unregistered hash (UnknownAuditRequest). So a holder can't mint their own request for a cherry-picked subset, since it isn't registered. Honest scope: completeness holds when the auditor is an independent regulator; in the no-install demo the auditor role is the demo key (every demo role is one person), so the demo exercises the mechanism rather than a true separation of parties. - New-feature scope, honestly bounded. Four of this session's additions ship with a stated
ceiling. The liability accumulator folds +amount on deposit and -released on withdraw, so
the on-chain total equals the exact outstanding liabilities of whatever pool carries it and
attest_reservesis a tight solvency statement for that pool. On the live corridor its coverage is zero: the accumulator runs on a preview pool holding one note, and the reserves contract aimed at the live pool has no attestation posted. Applying it to the live pool needs the state migration. Per-corridor on-chain cap enforcement on the live pool needs a state migration (the live pool has no upgrade hook), so it ships on a preview track for now. Circle CCTP V2 is bidirectional and wired, but the burn leg needs a user EVM wallet to sign. The TRISA companion node is real code but needs the operator to register a test VASP and host the node before it activates (the OpenVASP TRP 3.2.1 path runs without that). - Not audited. Do not use with real assets.
Built on Stellar's BN254 Groth16 verification, which arrived in Protocol 25 "X-Ray" and 26 "Yardstick" and is unchanged in Protocol 28 "Adapter", the protocol testnet runs today. The verifier pattern is adapted from Nethermind's stellar-private-payments reference (Apache-2.0 / GPLv3).
Tech stack
- Zero-knowledge: Circom 2 circuits, Groth16 over BN254, proved and verified with snarkjs; Poseidon hashing via circomlibjs. Proofs run client-side in the browser (WASM), so secrets never leave the device. Trusted setup from the Hermez phase-1 ptau plus a 3-contribution phase-2 ceremony.
- Smart contracts: Rust on Soroban (Stellar). The core corridor is 8 contracts (a pool plus 7 BN254 verifiers); 7 additive contracts (policy registry, reserves, reserves verifier, reserves aggregate, enforcement pool, exact accumulator, timelock pool) bring the deployed total to 15. 333 passing Cargo tests.
- Stellar standards: SEP-1 (stellar.toml discovery), SEP-24 (interactive deposit and withdraw), SEP-41 / SAC (USDC), with SEP-31 as the cross-border positioning. Native fee-bump (CAP-15) as a proven gasless primitive.
- Oracle: Reflector SEP-40 FX oracle, read on-chain by the pool for the off-ramp gate.
- Frontend: Next.js (App Router), React, TypeScript, Tailwind CSS. Static export, deployed on Vercel; installable PWA. Freighter wallet plus a built-in testnet key.
- Tooling: Node and npm, Playwright for browser QA, Cargo for contract tests.
Repository layout
circuits/ Circom. transfer, compliance, disclosure, merkleUpdate, reserves,
thresholdDisclosure, aggregateDisclosure, rangeDisclosure (8, all ✅ on-chain)
contracts/pool/ Stateful corridor pool (Rust/Soroban). Orchestrates verifiers,
token custody, native poseidon.rs ✅
deployments/ testnet.json holds the live contract ids + findings
webapp/ Unified Next.js app. Landing + four role apps (sender, receiver,
regulator, operator) + /deck; in-browser ZK proving (the live site)
frontend/ Committed ZK artifacts for CI: circuit/ (no-circom prove/verify
fallback) + tree.js (client Poseidon Merkle tree)
scripts/ build / prove / convert / deploy / browser-test helpers
docs/ ARCHITECTURE.md, SECURITY.md (threat model), ONCHAIN.md, TESTING.md, DEMO_SCRIPT.md
_reference/ Nethermind stellar-private-payments (study only, gitignored)
Run it
npm install # snarkjs, circomlib, circomlibjs
# A) Off-chain: compile + prove + verify the four CORE circuits (Groth16/BN254)
# (the three disclosure variants build via circuit:threshold / :aggregate / :range)
# First run fetches the real Hermez phase-1 ptau (~19 MB) and asserts each zkey
# derives from it (reproducibly waste-free); reused on later runs.
npm run circuit:all # or circuit:disclosure / :transfer / :compliance
# B) Tests: in-browser proving flow + circuit soundness (negative tests)
npm run test:proving
npm run test:negative # full QA report: docs/TESTING.md
# C) Launch the app (in-browser ZK proving)
cd webapp && npm install && npm run dev # -> http://localhost:3000
The Next.js app bundles
snarkjsandcircomlibjsand serves the circuit artifacts locally, so proving runs entirely in the browser.
On-chain (the contracts are already deployed, IDs above):
- Build a verifier WASM with a circuit's VK:
scripts/wsl-build-verifier.sh - Build the pool contract:
scripts/wsl-build-pool.sh(cargo testincontracts/pool→ 55/55) - Deploy + invoke reproduction:
docs/ONCHAIN.md
Soroban contract builds run in WSL/Linux. Windows lacks the MSVC
link.exethe host build scripts need. WSL Ubuntu (cargo + gcc) builds cleanly.
License
Source code under Apache-2.0 unless noted. Portions adapted from Nethermind's stellar-private-payments (Apache-2.0 / GPLv3) and circom/circomlib (GPLv3).






