> For the complete documentation index, see [llms.txt](https://docs.levelq.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.levelq.finance/architecture/off-chain-infrastructure/swaps-routing-algorithm.md).

# 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.
