Skip to content
Blockchain Post

News on how crypto works

Three Checks That Keep a Swap Quote from Going Stale

A swap quote can change before a transaction lands. Check its freshness, minimum output and deadline to understand when to refresh or reject the trade.

The Blockchain Post Editors4 min read#bed0a7

Three Checks That Keep a Swap Quote from Going Stale

A swap quote is stale when the market or route has changed since the app calculated what you should receive. Three checks help catch that gap: refresh the quote, set a minimum output, and give the transaction a deadline. They work at different stages: the first updates the estimate, while the others constrain what the submitted transaction can do.

Why can a swap quote go stale?

A decentralized exchange app builds a quote from the available pools and the amount you want to trade. A route may pass through one pool or several. Each pool’s reserves help determine the exchange rate, and the route can change as other trades alter those reserves.

The app then asks a wallet to sign a transaction. That takes time. Other trades may be confirmed before yours, changing the price or reducing liquidity on the chosen route. The estimate on screen is not a reservation; until your transaction executes, another trader can affect the pools it depends on.

QuickSwap integrations connect an app’s swap flow with routing and liquidity. For the integration mechanics, see how QuickSwap routes swaps and liquidity. Whatever the interface, a displayed estimate and an executed trade are separate steps.

How do you check that the quote is fresh?

Refresh the quote close to submission and compare the new output with the amount shown before. The app may recalculate the route as well as the expected amount, because a different path through pools can produce a better estimate. If the output changes sharply, pause and inspect the token pair, route, and trade size before signing.

Also check that the app is still using the intended network and tokens. A quote is only useful for the assets and chain it describes. A token with a similar name or symbol can be a different asset, and a route on one network does not execute on another.

What do minimum output and deadline protect?

Minimum output sets the least amount of the destination token that the transaction will accept. The app derives it from the quote and the slippage tolerance you choose. If the trade would return less by execution time, a properly configured transaction should fail instead of completing below that limit. A tighter tolerance reduces the price movement you accept, but makes failure more likely when pools are moving quickly.

A deadline limits how long the transaction remains valid. If it has not executed before that time, a router that enforces the deadline should reject it. This helps prevent an old transaction from executing much later under changed conditions. A deadline does not freeze the price during its validity window, so it works alongside minimum output rather than replacing it.

Before approving the transaction, check these three things:

  • The refreshed quote matches the intended token pair, network, and trade size.
  • The minimum output is acceptable for the trade, given the route and market movement.
  • The deadline is short enough that you would not want the transaction to execute after it passes.

What should you do when a swap fails?

A failed swap often means a condition was no longer met when the transaction reached the contract: the output fell below the minimum, the deadline passed, or the route could not complete. A failure can still consume network fees, even though the swap itself did not complete. Read the wallet or app’s error details, refresh the quote, and review the limits before trying again.

For most trades, refreshing immediately before signing and keeping a clear minimum output are the most useful checks. Use a looser tolerance only when you understand why the route needs it; otherwise, it can allow a worse fill than you intended. A fresh quote tells you what the app expects now, while the transaction limits define what you are willing to accept.