# Swap Aggregator

Somnex SpotX is a smart swap aggregator that searches liquidity across the Somnia ecosystem and executes the best total price (price + slippage + gas). It combines Somnex V2/V3, QuickSwap, Somnia Exchange, and other venues via real‑time smart routing.

***SpotX — Swap Aggregator UI***

<figure><img src="/files/EKzYgEkz43iaSGczDIQK" alt=""><figcaption></figcaption></figure>

## How it works

* Indexes pools across supported DEXs and Somnex pools.
* Simulates candidate paths and splits your order to minimize total cost.
* Displays route badges: Best Price • Smart Route • Across all DEXes.
* Minimizes slippage and gas while maximizing execution probability.

## How to use

1. Open [Somnex](https://somnex.xyz/) → SpotX and connect your wallet.
2. In the Pay field, choose the token and enter the amount.
3. In the To field, choose the token you want to receive.
4. Review the route preview, minimum received, slippage tolerance, and estimated gas.
5. Click Approve (first time) then Swap → Confirm in wallet.

## Tips

* If a route fails, slightly increase slippage tolerance or try a smaller size.
* Use stable pairs for lower slippage; volatile pairs may require higher tolerance.
* Verify token contracts to avoid imposters.

## Fees

Swap fee: TBD by venue. Network gas applies. The aggregator chooses the best combination of venue fees + gas to minimize your all‑in cost.

## Troubleshooting

* Insufficient liquidity: reduce size or try a different token path.
* Insufficient allowance: click Approve and confirm in your wallet.
* Price updated: re‑quote appears when market moves; review and accept.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.somnex.xyz/product-guides/swap-aggregator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
