Route splitting and price impact
Why one order across four pools costs less than one order into one pool, what the convexity of the curve has to do with it, and where splitting stops paying.
Read the pieceLiquidity for a Solana pair is rarely in one place. The same token may trade against SOL in a constant-product pool, against a stablecoin in a concentrated-liquidity pool, and against both on a second venue with a different fee tier. A router exists because the best price for a given size is often a weighted combination of those pools rather than any single one of them.
Splitting works for a specific mathematical reason: price impact grows faster than linearly with size, so two half-size fills against two pools cost less in total than one full-size fill against one. The same convexity explains why an optimal split is uneven rather than an even division, and why the gains shrink with each additional leg until the added fees and the added failure surface outweigh them.
That failure surface is the part traders underestimate. Every extra hop adds accounts to the transaction, consumes more compute, and creates more state that can change between the quote and execution. A route that prices better on paper and lands less often is not obviously the better route, which is why this section treats price improvement and reliability as two axes rather than one.
How a router turns one order into several fills, why splitting lowers price impact, and what a longer route costs you in fees and failure risk.
Why one order across four pools costs less than one order into one pool, what the convexity of the curve has to do with it, and where splitting stops paying.
Read the pieceDirect pool swaps are cheaper in compute and simpler to reason about. Aggregation wins on price for size. A comparison table and a decision checklist.
Read the pieceRouting decisions only pay off if you can price them. The cost section turns route shape into a line-by-line cost figure and a measurement you can compare across paths.
Definitions and mechanics. What a quote is, what moves it, and which parts of the gap between quote and fill you actually control.
The full cost stack of a swap, the risks that inflate it, and the measurement discipline that tells you whether a change helped.