Skip to main content
Merkle Street

Protocols, markets, policy, people

What a swap slippage limit changes before a trade

A swap slippage limit sets the minimum output an app will accept, helping you weigh a trade’s chance of execution against price changes before it lands.

Merkle Street Newsroom#f887614 min read

What a swap slippage limit changes before a trade

A swap slippage limit sets the least amount of tokens an app will accept in return before the trade fails. The app gets a quote, turns that quote into a minimum-output condition, and sends the transaction to a smart contract. If the contract cannot meet that condition when it processes the trade, it reverts instead of completing the swap.

For a typical automated market maker swap, the app reads prices from a liquidity pool, where token balances help determine the exchange rate. It estimates how much the requested input should buy, then applies the slippage tolerance. A 1% tolerance, for example, makes the minimum output roughly 99% of the quoted output; the exact calculation can depend on the app and route. An integration walkthrough for an app using Baseswap’s app integration flow covers the surrounding setup in more detail.

What happens between the quote and the swap?

The app’s quote is a snapshot, not a reservation. After the app reads the pool, another trade may change the token balances and therefore the price. The user also needs to approve or sign the transaction, and the network must include it in a block. That delay gives the pool’s state time to change.

The transaction carries the input amount and a minimum acceptable output, either directly or through a router contract that handles the route. When the transaction runs, the contract checks the pool’s current state and calculates the output. If the result meets the minimum, the swap completes and the tokens move. If it falls short, the contract reverts the swap. The user receives no swapped tokens, but may still pay a network fee for the failed transaction.

Think of the limit as a floor under the result. The quote says what the app expects; the floor says how far the result may fall before the contract stops. A tighter floor protects the agreed output but makes a revert more likely. A lower floor gives the transaction more room to complete at a worse rate.

Is slippage the same as price impact?

No. Price impact is the effect the trade itself has on the pool’s price; slippage is the difference between the quoted result and the result available when the transaction executes. A large trade against a small pool can have substantial price impact before it is sent. Other trades or delays can then add further movement between quote and execution.

Apps may display price impact, estimated output, fees, and slippage tolerance together, but these describe different parts of the trade. The price impact estimate helps explain the quote. The tolerance sets the minimum output condition. Neither guarantees that the transaction will execute at the displayed quote.

How should you choose a slippage limit?

Start with the app’s estimate and the trade’s conditions. A small tolerance is usually the better starting point when the quote is stable and the pool has enough liquidity: it limits how much worse the output can be before the swap reverts. If the trade fails repeatedly, raising the limit can help, but it also accepts a wider range of outcomes.

  • Check the minimum output shown by the app, not just the headline quote.
  • Consider whether a large trade or a thin pool could move the price during execution.
  • If you raise tolerance to get a transaction through, compare the new minimum output with the amount you are willing to receive.

There is no single tolerance that suits every swap. The useful setting is the narrowest one that allows a trade to execute under the conditions you accept. If the minimum output looks too low, wait for a steadier quote or reduce the trade size rather than approving a result you would not take.