Skip to the article
Crypto Daybook

Markets, chains and policy news

Why swap slippage is set when the transaction is built

Setting slippage while building a swap turns a quote into an on-chain minimum output, balancing failed trades against poor fills as prices move before confirmation.

Crypto Daybook Newsroom3 min read

Why swap slippage is set when the transaction is built

Swap slippage is set when the transaction is built so the trade includes a minimum amount of tokens you agree to receive. That limit protects you if the price moves before the swap executes. A quote is only a snapshot; the transaction may wait while other trades change the price.

For example, if a quote offers 1 token, a 1% slippage setting can let the transaction accept as little as 0.99. The router, a contract that carries out the swap, checks the final amount against that floor. If it falls short, the swap fails instead of completing at a worse price. For a fuller look at how route choices affect this calculation, see paraswap.

What does the slippage setting change?

It changes the minimum output written into the transaction. The swap quote estimates what your trade could return using current market data. When the transaction is built, the app applies your tolerance to that estimate and sets the lowest return it will accept.

That means the setting is a boundary, not a promise that you will receive the quoted amount. A looser boundary allows more price movement before execution, while a tighter one rejects more outcomes. It does not improve the quote or reduce the market’s price impact, which is the change in price caused by the trade itself.

Why choose slippage before signing?

The signed transaction needs a clear rule for what counts as an acceptable trade. Once it is sent to the network, you cannot adjust that rule in place. If market conditions change beyond the limit, the transaction reverts, meaning the swap is undone. You may still pay a network fee for the failed attempt.

The trade-off is between execution and protection:

  • A low tolerance can prevent a poor fill, but the swap may fail after a small price move.
  • A high tolerance makes execution more likely, but allows the swap to return less than the quote suggests.
  • A fresh quote and newly built transaction can reflect current conditions without widening the limit on an old quote.

How should you set a practical limit?

Start with the trade’s expected output and the minimum you would accept. Check that the minimum shown in the wallet matches that choice before signing. If the swap keeps failing, refresh the quote first; the route or market price may have changed. Increase tolerance only if you are willing to accept the lower output it permits.

For most readers, the useful setting is the narrowest tolerance that still gives the trade a fair chance to execute. A transaction built from a stale quote can fail even with a reasonable limit, while an unnecessarily wide limit gives away control over the final amount.