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.
maxAmountInon an exact-input request isEIN0001(referencemaxAmountIn) — it doesn’t mean anything there, the input is already the fixed side.- A
maxAmountInunder the market price isEIN0008providerRefused— 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:
EIN0001referenceswapType(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/previewdiscards exact-output offers whose input would exceedmaxAmountIn— they never appear inoffers[]. A provider that refuses the request outright, as one does for a cap under the price, makes the preview answerEIN0050instead of an emptyoffers[](known issue).GET /ordersechoesswapTypeon each entry’squoteobject, 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 carriesauction: {kind, exclusiveFor?, startTime, stopTime, slope, floor, ceiling} — the field table is
on Flows — Auctions; this section is what those fields mean for the
user.
floorequalsamountOut— the guaranteed minimum the recipient gets.ceilingisfloor + 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 worthfloor + 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
auctionkey at all. A winner whose context islimitorexclusiveLimitcarriesauctiontoo, withslope"0"andceilingequal tofloor: it doesn’t decay, and ranking treats it as firm. So tell a decaying winner byauction.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.