APP GUIDE

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.

DustPoolV2withdraw
Uniswap V4swap
DustPoolV2deposit
New UTXOnote
ATOMIC — all steps succeed or entire transaction reverts

The Swap Flow

FROM
ETH
2.0
TO
$USDC
5,012.00
  1. 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.
  2. 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.
  3. 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's recipient is set to the adapter contract address.
  4. 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.
  5. 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.

DENOM_PRIVACY
1 ETH0.5 ETH0.3 ETH0.2 ETH4 chunks · random delays

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.

RATE1 ETH ≈ 2,506.00 USDC
SLIPPAGE0.5%
MIN_RECEIVED4,901.76 USDC
RELAYER_FEE2%

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

Swaps are only available on Ethereum Sepolia. Other chains support pool operations (deposits, withdrawals, transfers) but not swaps.

FEWER CHUNKS = FASTER

Use the denomination suggestions to pick a nearby amount that requires fewer chunks. Fewer chunks means a faster swap and less total gas.
FFLONKUniswap V4ChainlinkDustSwapAdapterV2