Routing, defined
A swap between two assets rarely has just one path. It can go directly through a single pool, hop through an intermediate token, or split across several pools at once. Smart order routing evaluates those options and chooses the combination that returns the most after fees and gas.
Without routing, you take whatever one venue offers. With it, the system searches the paths available and assembles the best result. That is why a routed swap usually beats a naive one on a thin or fragmented pair, where no single pool holds enough depth to fill the order well on its own.
What routing weighs
Good routing balances several factors at once, because optimizing one in isolation can hurt the net result.
- Liquidity depth on each candidate path, since deeper pools move the price less.
- Price impact of the order size on each pool, which grows with how much of the depth you take.
- Gas cost of a longer or split route versus a direct one, since extra hops cost extra gas.
- Whether splitting the order across pools reduces total price impact enough to justify the added gas.
- For cross-chain, which bridge or intent engine serves the path and what it delivers net.
A worked example, in concept
Picture a swap of one token for another where no single pool is deep. Pool A can fill part of it at a good rate, but taking the whole order there moves the price against you and the last portion fills poorly. Pool B is shallower but untouched, so its first slice is cheap. A direct route through either alone leaves value on the table.
Routing tests combinations. It might send part of the order through Pool A, part through Pool B, and a remainder through a two-hop path via an intermediate token that happens to be liquid on both sides. It then subtracts the gas each path adds. If splitting three ways nets more than any single route after that gas, routing picks the split. If the extra gas outweighs the saved impact, it keeps the route simpler. The goal is the largest net output, not the cleverest path.
Routing inside an aggregator
An aggregator applies routing across many engines at once. It does not just pick the best single venue. It compares routed results from several engines and takes the strongest net outcome. That layered comparison is what turns fragmented liquidity into one good quote, and it works the same way for a same-chain swap or a cross-chain one, with the cross-chain case also weighing the bridge or intent path.
Multiswap compares routes across nine engines and ranks by net received with gas priced in, then lets you execute on the winning route non-custodially, with execution today handled through the Multiswap Telegram bot. The routing does the hard part of searching and splitting, and you see the result as a single ranked quote.