# Swaps: Routing Algorithm

LevelQ's investment products often involve multiple tokens, and for optimal token swapping, the platform utilizes a proprietary Many-to-Many routing algorithm.&#x20;

This off-chain algorithm monitors pools in all supported Decentralized Exchanges (DEXes) and constructs an efficient transaction path, minimizing swap fees, price impact, and gas costs. A key feature of the algorithm is its ability to split transactions when the total price impact is too high, allowing LevelQ to reduce overall DEX fees.&#x20;

This routing mechanism is actively employed in LevelQ Boosted Indices during rebalancing and maintenance events, ensuring cost-effective and optimized token swaps.


---

# 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.levelq.finance/architecture/off-chain-infrastructure/swaps-routing-algorithm.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.
