Privacy Swaps
Swap tokens privately through the DustPoolV2 ZK-UTXO pool. The adapter withdraws, swaps on Uniswap V4, and re-deposits the output — all in one atomic transaction.
How Privacy Swaps Work
Privacy Swaps execute an atomic three-step flow through DustSwapAdapterV2. Your browser generates an FFLONK proof to withdraw from DustPoolV2, the adapter swaps the withdrawn tokens on a vanilla Uniswap V4 pool, then deposits the output back into DustPoolV2 as a new UTXO note. The on-chain record never links your input to the swap output.
The Swap Flow
- 01
Select input and output tokens
Choose the token pair (e.g., ETH to USDC) and enter the amount you want to swap. Your shielded pool balance is shown next to the FROM field. - 02
Get quote from Uniswap V4
The app fetches a real-time quote from the Uniswap V4 pool quoter. The estimated output, exchange rate, and minimum received amount (after slippage and relayer fee) are displayed in the price info panel. - 03
Generate FFLONK proof
Your browser generates a zero-knowledge proof using the DustV2Transaction circuit (~12,400 constraints). The proof demonstrates ownership of valid UTXO notes without revealing which ones. The proof'srecipientis set to the adapter contract address. - 04
Relayer calls DustSwapAdapterV2
The proof and swap parameters are sent to the relayer. The adapter atomically (1) withdraws from DustPoolV2, (2) swaps on the Uniswap V4 pool, (3) computes a Poseidon commitment and deposits the output back. If any step fails, the entire transaction reverts. - 05
Output deposited as new UTXO note
The swap output arrives as a fresh shielded note in DustPoolV2. Your browser saves this note (encrypted in IndexedDB). You can withdraw, transfer, or swap it again — it is indistinguishable from any other note in the pool.
Denomination Privacy
When enabled (default ON), the denomination privacy engine splits your swap amount into common-sized ETH chunks (e.g., 1, 0.5, 0.3, 0.2, 0.1 ETH). Each chunk is swapped in a separate transaction with random 1-5 second delays between them. This prevents amount correlation — an observer cannot link your swap to a specific deposit by matching the exact amount.
The app suggests nearby rounded amounts that require fewer chunks. Fewer chunks means a faster swap and less total gas.
Price & Slippage
The reference price comes from a Chainlink oracle, with the pool spot price as fallback. Slippage tolerance is configurable: 0.1%, 0.5%, 1%, or a custom value up to 50%. If price impact exceeds 50%, the UI shows a red warning — this indicates low pool liquidity.
Relayer Fee
A 2% fee is deducted from the swap output to cover gas costs and relayer operations. The minimum received amount shown in the price panel already accounts for both slippage tolerance and the relayer fee.
CHAIN AVAILABILITY
FEWER CHUNKS = FASTER