Routing and Quotes
A robust router evaluates executable routes rather than choosing a pool by TVL alone. The largest pool is not always the best price, and the best quoted price is not always executable.
Mainnet routing contracts
| Route class | Quoter | Execution router |
|---|---|---|
| Basic stable and volatile pools | Use the compatible views for the basic router | 0x2F0E010edC989bB4Dc3BFaF07750480bC16285d4 |
| Slipstream concentrated pools | 0xeE7DA209878f5748E18058C6C007B6Cd85ab451b | 0xb17125089BcAEf75f7C06d4b578ec624982CB2a8 |
| Mixed basic and Slipstream routes | 0x5354231C96Df65a0ab7360c8C9aE2168990138Ad | Execute each route with its compatible deployed router |
Pin these addresses and their matching ABIs together. The deployment page is the canonical address record.
Candidate discovery
- Fetch live pools and exclude unsupported or inactive factories.
- Keep pools containing the input token, output token or an approved connector asset.
- Model tokens as graph vertices and pools as edges.
- Support parallel edges, because the same pair can have stable, volatile and multiple concentrated pools.
- Search direct and bounded multi-hop paths; a maximum of three pool hops is a common practical limit.
Quote evaluation
For each candidate path:
- call the compatible quoter with the exact input;
- discard reverting or zero-output quotes;
- estimate gas where practical;
- validate token behaviour;
- compare final output after fees and estimated execution cost;
- select the route that best matches the application's objective.
The pool with the most liquidity can produce a worse quote than a smaller pool with a more appropriate curve, active range or fee setting.
Mixed routes
A mixed route can traverse basic and concentrated pools. Its encoded path must preserve logical token direction even when that direction is opposite to a pool's internal token0/token1 order.
Never copy route-type constants from another deployment without checking Raphael's router and quoter implementation.
Execution
Once a route is selected:
- derive the minimum output from the user's slippage tolerance;
- request only the required token approval;
- set a short, reasonable deadline;
- simulate the exact call;
- submit through the correct Raphael router;
- confirm the receipt and actual output.
Refresh stale quotes. A quote is not a reservation of pool state; it is a snapshot of one block that the next block may contradict.