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

# Multi-DEX Aggregator

> Multiple DEXs queried in parallel, optimal path selected

**The aggregation engine that finds optimal swap paths by querying multiple DEXs in parallel**

TED Protocol queries multiple decentralized exchanges simultaneously to find the best swap rates. Rather than relying on a single liquidity source, the aggregator fetches quotes from all available DEXs in parallel and routes your swap through the most efficient path.

***

### Supported DEXs

| DEX                | Chains                   | Features                                     | Best For                       |
| ------------------ | ------------------------ | -------------------------------------------- | ------------------------------ |
| **Curve Finance**  | Ethereum, Arbitrum, Base | StableSwap AMM, 0.01-0.04% slippage          | \$1,000+ stablecoin swaps      |
| **Uniswap V3**     | Ethereum, most L2s       | Concentrated liquidity, 0.01-1.00% fee tiers | General swaps, Permit2 support |
| **Uniswap V4**     | Ethereum, most L2s       | Singleton architecture, hooks, lower gas     | Next-gen swaps                 |
| **PancakeSwap V3** | BNB Chain                | Strong USDT liquidity                        | Asian markets, BSC swaps       |
| **DragonSwap**     | Kaia                     | Kaia native DEX                              | Kaia ecosystem routing         |

***

### How Aggregation Works

Traditional aggregators query DEXs **sequentially**—one after another—which can take 2,000ms or more when checking five exchanges.

TED Protocol queries all DEXs **simultaneously**:

* Total quote time = slowest individual response time
* **60-70% faster** quote discovery
* Typical response time **under 2 seconds**

For each swap request, the aggregator:

<Steps>
  <Step title="Fetch quotes">
    Fetches quotes from all available DEXs for your token pair
  </Step>

  <Step title="Calculate output">
    Calculates net output after accounting for fees and slippage
  </Step>

  <Step title="Compare gas costs">
    Considers gas costs for each possible route
  </Step>

  <Step title="Select optimal path">
    Selects the path that maximizes your output
  </Step>
</Steps>

*A 10-second caching layer with approximately 30% hit rate further improves performance while ensuring quotes remain fresh.*

***

### Routing Intelligence

#### Simple Stable Swaps

Routes through the DEX offering the best rate.

**Example:** 10,000 USDT → USDC on Ethereum

* Curve: 0.015% slippage ✓
* Uniswap 0.01% tier: 0.028% slippage
* Uniswap 0.05% tier: 0.050% slippage

*Curve selected, saving roughly \$1.30 vs next best option.*

#### Multi-Hop Routes

Engages when direct pools don't exist or have poor liquidity.

**Example:** 1,000 USDT → JPYC

* Direct conversion: 2.5% slippage (thin liquidity)
* Multi-hop: USDT → USDC (Curve 0.02%) → JPYC (Uniswap 0.15%) = **0.17% total slippage**

*16x improvement*

#### Split Routing

Optimizes large swaps by distributing volume across multiple DEXs.

**Example:** 100,000 USDT swap

* Single DEX: 0.08% slippage
* Split (60% Curve + 40% Uniswap): **0.038% slippage**

*Saves approximately \$42*

***

### Performance

| Metric                          | Value           |
| ------------------------------- | --------------- |
| Quote response time             | Under 2 seconds |
| Cache hit rate                  | \~30%           |
| Price improvement vs single DEX | 0.05% average   |
| Query success rate              | 99.9%           |

***

### Future Integrations

Additional DEXs are planned for integration based on liquidity depth and user demand:

* **Aerodrome** — Base
* **Velodrome** — Optimism
* **Camelot** — Arbitrum

*\*Future roadmap—timing subject to development priorities.*
