Expand description
Most Liquid algorithm implementation.
This algorithm finds routes by:
- Finding all edge paths up to max_hops using BFS (shorter paths first, all parallel edges)
- Scoring and sorting paths by spot price, fees, and liquidity depth
- Simulating paths with actual ProtocolSim to get accurate output (best paths first)
- Ranking by net output (output - gas cost in output token terms)
- Returning the best route 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.