# Swap Trading

Swap trading is one of the key features of uDEX, transforming decentralized trading by integrating with external DEXs like Uniswap, PancakeSwap, and 1inch through a smart contract for asset exchange. This integration allows uDEX to optimize trades by seeking the best prices and minimizing slippage, significantly reducing trading costs for users. Integrated with the 1inch DEX aggregator, uDEX enables trades to be routed through multiple DEXs for optimal pricing, resulting in a substantial reduction in trading costs. Users benefit from insights on optimal trade costs, exchange rates, price impact, and gas consumption, thus enhancing the trading experience.

In its operation, uDEX connects to major decentralized exchanges, comparing rates across them to find the best trading conditions. The platform's routing algorithm strategically searches for the most favorable rates, often splitting orders across several exchanges, especially effective for large transactions. For example, in certain trades, the algorithm may choose a multi-step conversion process to ensure the best rate, illustrating uDEX's commitment to offering efficient, cost-effective trading solutions for its users.

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


---

# 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.udex.one/feature/swap-trading.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.
