> ## Documentation Index
> Fetch the complete documentation index at: https://docs.unipayfi.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# Swap

> Exchange SOL for USDC/USDT with optional privacy protection

# Swap

Exchange SOL for USDC or USDT using on-chain liquidity aggregators. Choose between direct wallet swaps or privacy-enhanced routing that breaks the link between your input and output addresses.

## Supported Pairs

<CardGroup cols={2}>
  <Card title="SOL → USDC" icon="arrow-right">
    Swap native SOL for USD Coin
  </Card>

  <Card title="SOL → USDT" icon="arrow-right">
    Swap native SOL for Tether
  </Card>
</CardGroup>

## Execution Modes

### Wallet Mode

Direct swap through on-chain aggregator. Client queries on-chain aggregator for best available rate across all DEXs, aggregator returns a versioned transaction with optimal routing, your wallet signs the transaction in the browser, and transaction is broadcast through a stateless proxy service.

```typescript theme={null}
// Quote request
const quote = await aggregator.getQuote({
  inputMint: SOL_MINT,
  outputMint: USDC_MINT,
  amount: inputAmount,
  slippageBps: slippageTolerance
});
```

### Private Mode

Anonymous swap through routing layer. Quote the same pair through the routing layer for privacy-enhanced execution. Send SOL to the provided temporary address. Routing layer executes the swap using its own addresses. You receive USDC/USDT from an address unrelated to your input wallet.

## Slippage Protection

Configure your tolerance for price movement during execution:

| Setting    | Tolerance    | Use Case                   |
| ---------- | ------------ | -------------------------- |
| **Auto**   | Dynamic      | Recommended for most users |
| **0.5%**   | Low          | Stable market conditions   |
| **1%**     | Medium       | Normal market volatility   |
| **3%**     | High         | High volatility periods    |
| **Custom** | User-defined | Advanced users             |

<Warning>
  Swaps that exceed your slippage tolerance are rejected before you sign the transaction.
</Warning>

## Pricing & Quotes

### Quote Refresh

* **Auto-refresh**: Every 10 seconds while quote is displayed
* **Manual refresh**: Click refresh button anytime
* **Quote expiry**: 30 seconds for wallet mode, 60 seconds for private mode

### Price Impact

| Swap Size    | Typical Impact |
| ------------ | -------------- |
| \< 10 SOL    | \< 0.1%        |
| 10-100 SOL   | 0.1-0.5%       |
| 100-1000 SOL | 0.5-2%         |
| > 1000 SOL   | > 2%           |

## Liquidity Sources

Unipay aggregates liquidity from major Solana DEXs: Raydium, Orca, Jupiter, Meteora, and Phoenix.
