> For the complete documentation index, see [llms.txt](https://dirolprotocols-organization.gitbook.io/dirol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dirolprotocols-organization.gitbook.io/dirol/general-concept.md).

# General Concept

The aggregator acts as a smart router, finding the most efficient way to swap one token for another.

<mark style="color:$info;">For example, to swap token A for token B, the aggregator:</mark>

* Searches for all possible swap paths
* Calculates which yields the most token B
* Can split the amount across multiple paths for maximum efficiency

### Example:

*<mark style="color:$info;">You want to swap 100 USDT for ETH:</mark>*

* **Option 1:** All via Uniswap
* **Option 2:** 70% Uniswap + 30% SushiSwap
* **Option 3:** USDT → WBTC → ETH

**The aggregator picks the path with the highest ETH output.**
