What amount and maxAmountIn mean on a POST /quote request, how a winner’s terms can be firm or decaying, what “who carries the fill risk” means, and where slippage tolerance applies.

Exact input (the default)

swapType absent, or "exact-input": amount is what the user spends, in the source asset’s base units. The quote answers with amountIn (what the winner charges — on the token-in lane the escrow’s wrapped native, so not always the amount you sent) and amountOut (what the recipient receives — the number that can vary with the market).

Exact output

swapType: "exact-output": amount is what the recipient receives, and maxAmountIn caps what the user will pay — the quote answers with the input the user must pay, capped at maxAmountIn when it’s set.
  • maxAmountIn on an exact-input request is EIN0001 (reference maxAmountIn) — it doesn’t mean anything there, the input is already the fixed side.
  • A maxAmountIn under the market price is EIN0008 providerRefused — not a form error, a fact about the corridor: raise the cap, or accept a different amount; do not retry unchanged.
  • A token-in source cannot be exact-output: EIN0001 reference swapType (Get quote — Request). That lane’s price is only known from what the user spends, so it can’t fix the output side.
  • POST /quote/preview discards exact-output offers whose input would exceed maxAmountIn — they never appear in offers[]. A provider that refuses the request outright, as one does for a cap under the price, makes the preview answer EIN0050 instead of an empty offers[] (known issue).
  • GET /orders echoes swapType on each entry’s quote object, so a client rendering history doesn’t need to remember which request it was.

Firm and auctioned winners

Some winners settle at a fixed price; others decay. When the winner carries a pricing context (a Dutch auction, or a limit price: see the last point below), the quote carries auction: {kind, exclusiveFor?, startTime, stopTime, slope, floor, ceiling} — the field table is on Flows — Auctions; this section is what those fields mean for the user.
  • floor equals amountOut — the guaranteed minimum the recipient gets.
  • ceiling is floor + slope · (stopTime − startTime) — the opening price.
  • The settler pays floor + slope · (stopTime − max(now, startTime)) at fill time — never below the floor. Every one of these fields is bound to the witness the user signs, so the settler can’t quietly pay less.
  • Ranking (score:v3) treats a decaying winner as worth floor + 0.5 · (ceiling − floor) when comparing candidates. Firm offers win ties against an auctioned offer of the same computed value.
  • A winner with no pricing context has no auction key at all. A winner whose context is limit or exclusiveLimit carries auction too, with slope "0" and ceiling equal to floor: it doesn’t decay, and ranking treats it as firm. So tell a decaying winner by auction.kind (dutchAuction, exclusiveDutch), not by the key alone.
The served OpenAPI description and the SDK’s type comment describe startTime as when exclusivity ends, while the hub’s reference describes it as when decay (and exclusivity) begins. This reference follows the hub’s reference; verify against the settler contract before relying on either reading.

Execution classes

executionClass on the quote response names who carries the fill risk once the order is open: The hub’s reference names the classes and says only “who carries the fill risk”. PROVIDER_NATIVE_UNCOVERED candidates are admitted only when the deployment enables infinity.flags.uncoveredRoutes; the escrow product is registered under this class.

Slippage on the token-in lane

slippageBps (1–1000; absent or 0 means 50 = 0.5%, fixed in the hub’s code) applies only to the token-in lane (oif-swap-token) — it’s ignored on every other lane, so setting it elsewhere is harmless but has no effect. swapInput.amountMax on the quote response is the ceiling to show the user as the real cost, not amountIn — this is also the anchor the Fees note points at, since the token-in lane’s slippage tolerance is the closest thing the hub has to a variable cost. A POST /quote/preview offer’s amountIn on this lane is already slippage-widened — the figure a wallet would be asked to approve.

See also