A private swap spends notes in one token and creates a note in another. The trade itself happens on a public venue, executed by Sotto's swap adapter — so the trade is public, but whose balance paid for it and who received the output is not.
The adapter flow: one transaction
- Your wallet builds a vault proof that unshields the input amount with
ExtData.recipient = VaultSwapAdapterandExtData.adapterData = order. The order is the target router, its calldata, the output token, the minimum output, and the one-time note key, blinding and encrypted output for the result. Because the order is part ofextDataHash, nobody can change it after the proof is made. - The vault checks the proof, marks the nullifiers spent and records the new commitments — all state changes first.
- The vault transfers the input to the adapter and calls
onUnshield. Only registered adapters get this call. - The adapter checks that the router is on its allow-list and swaps exact input: all of the input must be spent, and the output must reach
minOut. - The adapter calls
vault.shield(...)once with the output. The vault allows exactly one such re-entrant shield, from the adapter it is calling, and computes the new commitment on chain — so the note can hold an amount that is only known at execution time.
Adapters hold no funds between transactions. If any step fails — a price moved past your minimum, a router reverted — the whole transaction reverts and your notes stay unspent.
Routing
The wallet asks several venues for a quote and picks the best output:
- KyberSwap (aggregator across Elysium DEXs);
- Uniswap v2/v3-style pools and Ramses v3/v4 pools;
- launchpads: Montra bonding curves and pools, Ascend, Volta and Clanker launch pools, and other supported launchpads (see Onchain and quick trades);
- two-hop routes for tokens paired with something other than HYPE or USDC — for example WHYPE → KNTQ → meme, or via MONTRA or VOLTA. The second leg (
SwapLeg2) swaps everything the first delivered and requires the intermediate balance to be back where it was, so nothing stays behind.
Quotes are fetched through Sotto's quote proxy, so the venues never see your IP address.
Checks before you sign
Your wallet does not trust the route it was given. Before building the proof it runs three checks:
Route check
It decodes the router calldata and refuses any route whose output would go anywhere other than the adapter (ROUTE_RECIPIENT). Supported decoders cover the Universal Router, Montra, KyberSwap and Ramses.
Price check (independent)
It compares the route's output with a lower bound it computes itself, through its own Elysium RPC connection, by quoting on-chain venues at a fixed ladder of reference sizes — 0.025 × 4^k HYPE and 1 × 4^k USDC — that never includes your amount, your recipient or the adapter. If the route pays less than that bound minus max(slippage / 2, 0.5%), the swap is refused. Pairs that no independent venue can quote are refused by default. This protects you even if the quote service were compromised.
Fee check
The relayer fee must be within the wallet's own ceiling (see Relayer).
Slippage
- Default 3%, adjustable up to 10%.
- The minimum output (
minOut) is enforced on chain by the adapter: you never receive less. - A quote shown in the app is valid for 30 seconds; the wallet re-quotes after that and refuses if the new minimum is below the one you saw.
Rounding of the public input
The adapter's trade is public: input token and amount, output token and amount, route. Exact amounts can link trades — selling exactly what you bought links the two. So the wallet rounds the amount that leaves the pool: to three significant digits, picked at random among nearby round values, never above what you asked for. The difference stays private in your balance. See Privacy model.
The output note holds the exact output; its amount is read from the public Shielded event.
Speed
The swap form proves while you edit it (a prepared swap), so a click only relays: 0.8–1.2 seconds from click to inclusion in measured runs. If the quote moves too far or the proof's root ages, the wallet re-proves in the background. See Speed.
Fees
| Swap fee | 0.3% of the input |
| Relayer fee | about 0.005 WHYPE, from your gas note |
| Venue fees | the venue's own pool fees, inside the quote |