Skip to main content
Hashbeam

Crypto protocols, markets and policy

e46c51

When a Swap Quote Goes Stale, Requote Before Signing

A swap quote is a snapshot, not a promise: refresh it, inspect the new minimum output and route, then sign only the transaction you intend to execute.

The Hashbeam Desk··5 min read

Abstract cover artwork for When a Swap Quote Goes Stale, Requote Before Signing

When a swap quote goes stale, request a fresh quote and review its execution limits before signing. A quote estimates what a route can return from the state the router observed; it does not reserve liquidity or lock a price. Pool reserves can change while you compare quotes, approve a token, or wait for a transaction to be included. For a fuller account of the wallet-to-execution flow, see fermi swap; the key point here is that the displayed estimate and the signed transaction’s limits do different jobs.

Start by distinguishing the quote from the transaction. A quote service may simulate a route against recent chain state and return an estimated output, route, gas estimate, and suggested slippage bound. The wallet then builds or receives a transaction that calls a router or another execution contract. Between those steps, another trade can move a pool price, liquidity can change, or the transaction can wait in the mempool. A recent quote can still execute differently; an old quote is a reason to refresh, not proof that a trade is unsafe or impossible.

What does a stale quote change?

A stale quote can make the expected output inaccurate, but whether the trade can execute depends on the signed transaction’s constraints. In an exact-input AMM swap, the input amount is fixed and the transaction typically sets an amountOutMinimum: the least output the router may accept. In the Uniswap V2 Router’s exact-input methods, execution reverts if the output falls below that minimum. For an exact-output swap, the corresponding protection is an amountInMax, which caps what the router may spend to obtain the requested output.

Those bounds turn price movement into a clear trade-off. If the market moves within the allowed range, execution can proceed with a worse result than the estimate, but not beyond the transaction’s limit. If it moves past the bound, the transaction reverts rather than settling outside that limit. A revert does not complete the swap, but an included failed transaction can still consume gas. The quote’s headline output is therefore not the protection: the encoded minimum output or maximum input is.

Not every swap uses the same contract path. An aggregator may choose among pools or route through multiple pools; an RFQ or solver-based order may use a signed offer with its own expiry and fill rules. Check the route and the execution details presented by the wallet. Do not assume that an AMM router’s amountOutMinimum or deadline applies to every order type.

What should you check before signing?

Request a new quote if the displayed one has aged during review, or if the wallet warns that the price or route changed. Then compare the new quote with the transaction the wallet is asking you to sign. Focus on the limits and destination, not only the estimated output. A changed route can mean different contracts or calldata even when the token pair looks identical.

  • Confirm the network, input token, output token, recipient, and exact input or output amount.
  • Read the updated minimum output or maximum input and decide whether that bound is acceptable.
  • Check whether the route, fees, price impact, or estimated gas changed since the previous quote.
  • Inspect the spender for any token approval and the destination contract for the swap; an approval authorizes token spending, while the swap call executes the trade.

If the refreshed quote crosses your own price limit, cancel the flow and wait or change the trade size. Do not widen slippage merely to make a failing quote pass: a wider bound increases the range of outcomes the transaction can accept. A large price impact can also come from the trade’s size relative to available liquidity, so refreshing alone may not improve the quote; reducing the size can change the route and output.

What does the transaction deadline protect?

A deadline limits how long a router transaction remains valid for execution; it does not keep its quoted price fixed. In router methods that accept a deadline, the contract checks the supplied timestamp during execution and reverts if the deadline has passed. If the price moves before that time, the minimum-output or maximum-input check still decides whether the swap can settle. The deadline addresses delay; the slippage bound addresses price movement.

A short deadline can cause a transaction delayed by network congestion to revert after it reaches a block, costing gas. A long deadline gives a pending transaction more time to execute under changed market conditions, though the output bound still limits an AMM swap when properly set. If your wallet shows a pending transaction, check its status before submitting another trade: the original may still execute while pending, and a second submission can create a separate trade or compete for the same account nonce.

The practical rule is simple: refresh after a meaningful delay or a changed route, inspect the transaction’s actual limits, and sign only if those limits still match your intent. A quote is useful for comparing routes; the calldata’s execution checks determine what the contract will accept.