Route discovery
Four direct V3 candidates. One reference block. Maximum raw output among responding routes.
Implemented · direct V3 only
01Candidate construction
ETH normalizes to WETH. The server queries the configured factory at fee tiers 100, 500, 3000 and 10000. Missing pools are discarded; existing pools must expose the expected token pair, factory and unlocked slot0.
Pool identity, slot0 and QuoterV2 reads are pinned to the same latest block. quoteExactInputSingle simulates exact input with no explicit sqrt-price limit, accounting for liquidity and tick crossings. Pool existence does not guarantee enough depth for an amount.
02What best means here
Among successful candidates, the largest raw amountOut wins. Candidates share an output token, so no unit conversion is needed. Ties do not imply a unique economically superior route.
This is not a global search. There is no multihop, splitting, aggregator, cross-chain or gas-adjusted objective. An RPC failure can exclude a better candidate; availability limits the comparison set.
03Spot comparison and impact
The spot comparator uses sqrtPriceX96, raw input and token ordering with integer arithmetic. Quoter output includes fees and liquidity traversal; the spot comparator deducts no fee. Displayed impact therefore includes fee effects, not only liquidity price impact.
Execution accepts impact from −1% to 5%, inclusive. Below −1% is inconsistent and above 5% blocks. A zero spot comparator yields a defensive 100% sentinel, not a measured market impact. Negative impact is not a guaranteed arbitrage.
05Output and timing bounds
The browser recomputes minimumOut and binds chain, symbols, addresses, fee, amount, slippage and deadline. Schema checks and local encoding reduce response tampering risk but do not establish a trusted external price.
A route may disappear and state may change after quoting. A successful quote does not guarantee inclusion or prevent a later revert.