# Smart Order Routing

SwapMode's Smart Order Routing (SOR) system represents a state-of-the-art routing procedure that meticulously factors in several considerations to secure the most favorable prices for users. This advanced SOR not only evaluates prices across both the V2 and V3 pools, but it also weighs the gas costs and slippage linked with each transaction. Such meticulousness ensures users access the most competitive prices, all while keeping gas fees to a minimum. As the matrix of V2 and V3 welcomes new pool types, the SOR remains in a perpetual state of growth and adaptation. This guarantees that all pools within the matrix can facilitate trades and act as liquidity reservoirs. Moreover, any custom pool constructed atop V2 and V3 can tap into this amalgamated liquidity, ensuring traders consistently enjoy the best possible swap rates.

In SwapMode V3, the smart order router meticulously scans for the best rates across every pool for a specific pair, weighing factors like fee tiers, liquidity, and slippage. The router then pinpoints the most cost-effective path in terms of gas expenses, ensuring users secure the optimal swap rates with the lowest gas cost and the least possible slippage.

SwapMode unveils an advanced smart router that substantially elevates the trading engine through the integration of split routing capabilities and access to the entirety of liquidity. This enhanced smart router astutely pinpoints the best trading route by harnessing liquidity from both V2 and V3 pools, complemented by multi-hop and split routing functionalities.
