Skip to content
docs

findRoutes

findRoutes(chainId, deployment, table, tokenIn, tokenOut, limit?): object

Defined in: protocol-swap2-curve/src/routes.ts:155

Candidate routes tokenIn → tokenOut: at most MAX_ROUTE_POOLS pools and MAX_ROUTE_STEPS steps, no token or pool twice, at most one wrap and one ERC-4626 hop. Ranked fewest pools first, then by the thinnest pool’s TVL, and cut to limit. truncated says the cut (or the search budget) dropped some.

number

CurveDeployment

CurveChainPools | undefined

`0x${string}`

`0x${string}`

number = MAX_QUOTE_CANDIDATES

object

routes: CurveRoute[]

truncated: boolean