Expand description
Most Liquid algorithm implementation.
This algorithm finds routes by:
- Finding every route between the two tokens as a sequence of tokens, no pools chosen yet
- Ranking those sequences by spot price and liquidity depth, deepest first
- Solving each sequence hop by hop, taking the pool that pays most at the amount that reaches it — one simulation per pool per hop rather than per pool combination, and never the same pool on two hops
- Ranking the solved sequences by net output (output less gas, in the output token)
- Building swaps for the winner alone, with stats recorded to the tracing span
Structs§
- Depth
AndPrice - Algorithm-specific edge data for liquidity-based routing.
- Most
Liquid Algorithm - Algorithm that selects routes based on expected output after gas.