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

# Swap routing — multi-hop best-price paths on Fogo

> How Argyros finds the best swap path across DEXs on Fogo.

# Routing

Argyros evaluates multiple paths to find the best execution for every swap.

<Frame caption="A quote request goes into the routing engine, which compares direct, multi-hop, and split routes across every pool and returns the best-price quote.">
  <img src="https://mintcdn.com/argyros/r_t42XYOxJfxLnCX/images/routing.png?fit=max&auto=format&n=r_t42XYOxJfxLnCX&q=85&s=781fd0593f53312ed21f30a876cdd258" alt="Argyros routing: a quote request (tokenIn, tokenOut, amount, mode) enters the Argyros routing engine, which searches every pool on Vortex, Fluxbeam, Fogo.fun, and Moonit for the best price. It picks the best of a direct swap, a multi-hop route (up to 5 hops), or a split route across several pools, then returns a quote response (amountOut, price impact, route) that POST /swap turns into an unsigned transaction." width="4067" height="1118" data-path="images/routing.png" />
</Frame>

## Direct swaps

For common pairs with deep liquidity (e.g., SOL/USDC), a single pool often provides the best price. Argyros compares rates across all supported pools and picks the one with the lowest price impact.

## Multi-hop routing

When a direct swap isn't optimal, Argyros routes through intermediate tokens. For example, swapping Token A → Token B might execute as:

```
Token A → SOL → USDC → Token B
```

Each hop uses the best available pool. The routing engine evaluates all viable paths and selects the one that maximizes output (ExactIn) or minimizes input (ExactOut).

The routing engine supports up to **5 hops** on Fogo.

<Info>
  **Solana coming soon.** With P-Token optimization, Solana will support up to 7 hops, enabling deeper route search for exotic token pairs. See [Supported Chains](/concepts/chains).
</Info>

## Supported liquidity sources

| Source   | Type                   |
| -------- | ---------------------- |
| Vortex   | Concentrated liquidity |
| Fluxbeam | AMM                    |
| Fogo.fun | Bonding curves         |
| Moonit   | Bonding curves         |

## Price impact

Every quote includes price impact data:

| Severity   | Range     | Meaning                                          |
| ---------- | --------- | ------------------------------------------------ |
| `none`     | \< 0.1%   | Negligible                                       |
| `low`      | 0.1% – 1% | Normal for most trades                           |
| `moderate` | 1% – 3%   | Consider splitting into smaller trades           |
| `high`     | 3% – 5%   | Significant. Review before proceeding.           |
| `extreme`  | > 5%      | Very large trade relative to available liquidity |

## Slippage protection

The `slippageBps` parameter sets the maximum acceptable price deviation. If the on-chain execution price is worse than the threshold, the transaction reverts atomically. No partial fills.
