Slippage tolerance is the maximum shortfall from a swap’s quoted output that you agree to accept before the transaction reverts. Set it to cover ordinary price movement while your transaction waits to be included, not to compensate for a poor route or a large price impact.
What does slippage tolerance control?
A swap quote estimates how many output tokens the pools will return at the moment you request it. The router also receives a minimum output: the quote multiplied by one minus your tolerance. If the completed swap returns less than that minimum, the transaction reverts instead of delivering an amount below your limit.
For example, a quote of 4.8 WETH with 0.5% tolerance sets a minimum of 4.776 WETH. You may receive more if the price improves before execution, but not less; if the output falls below 4.776 WETH, the swap fails. The key mechanism is that the router checks the final output against the minimum when it executes, after the route’s pools have been used.
For routed trades, the state of any pool along the path can change before your transaction lands. When checking a quote, how SpookySwap routes swaps through pools matters because activity in an intermediate pool can affect the final output too. A wider tolerance may let the trade complete after a move, but it does not make that move cheaper.
How do you choose a setting for a routed swap?
Start with the quoted output and estimated price impact, then consider how much the market can move while your transaction is pending. Price impact is the route’s estimated effect on the pool prices from your trade itself; slippage tolerance is your limit on how much worse the realized output may be than the quote. Raising tolerance does not reduce price impact.
Suppose SpookySwap quotes 1,000 USDC for 0.38 WETH and estimates 0.4% price impact. At 0.5% tolerance, the minimum is 0.3781 WETH. If ordinary movement during confirmation often exceeds that margin for this pair, a slightly higher setting may reduce failed swaps; if the pool is quiet and confirmations are quick, a lower setting can protect your output.
Use the pair’s liquidity, route length, recent volatility and your chain’s confirmation time as your criteria. More hops mean more pools whose prices may change, but route length alone does not tell you the right tolerance: a deep, stable route can be safer than a short route through a thin pool. Check the quoted output and price impact each time rather than reusing a high setting simply because a previous swap reverted.
What should you check before sending?
First, confirm the output token and route, then compare the quote with the minimum output shown for your chosen tolerance. If the minimum is too low for the trade, refresh the quote or try a different route; accepting a much worse fill can cost more than the time saved by avoiding a retry. For a large order, splitting it may reduce price impact, though it can add transaction fees and extra steps.
Second, check the transaction deadline if the interface exposes it. A deadline limits how long the swap can execute; after it expires, the transaction should fail rather than trade against a stale quote. A longer deadline can help when confirmation is slow, but it also leaves more time for pool prices to move before the minimum-output check.
If a trade reverts, inspect the reason before changing settings. A minimum-output failure may justify refreshing the quote or nudging tolerance upward; an approval issue, insufficient gas, or an expired deadline needs a different fix. In my place, I’d keep tolerance near the smallest margin that covers normal confirmation-time movement and re-quote when the route or market changes.
Top comments (0)