671d96
Set Slippage Tolerance for a Token Swap: Work From Minimum Received
Set slippage tolerance by choosing the lowest output you accept, then adjust until minimum received matches—and verify after the swap.
Block Times Newsroom5 min read

To set slippage tolerance for a token swap, start from the lowest output you are willing to accept, not from a default percentage. Review the quote, enter a custom tolerance until the displayed minimum received matches that floor, sign, and then read the receipt. The swap worked when the received amount meets the signed minimum received.
That ordering matters more than it used to. The old habit was to pick 0.5% or 1% before looking at the quote, but a percentage on its own says nothing about whether the fill is acceptable. Current AMM swap screens show price impact and minimum received next to the tolerance field; the field is a control for the minimum, not a risk meter. For an exact-input swap, you fix the input, for example 1 WETH, and the output is quoted in DAI. Price impact is already deducted in that quoted output. Slippage tolerance is the extra deterioration in output you allow after the quote, on top of the impact your trade itself causes.
Set the Tolerance From Your Output Floor
Your output floor is the worst DAI amount you will accept for that exact WETH input; every setting follows from it. The swap quote is not the benchmark—an independent reference is, because the quote already embeds the pool's price impact. If the independent price for 1 WETH is 3,150 DAI and the swap quote is 3,100 DAI, the 50 DAI gap is price impact. A 1% slippage tolerance adds another 31 DAI of accepted deterioration, taking the minimum to 3,069 DAI against a reference price of 3,150. A 3.2% tolerance matches a 3,000 DAI floor.
On an AMM like SpookySwap, the swap page quotes before you sign. Open the swap tool on spookyswaps.app, choose WETH as the input and DAI as the output, enter the exact WETH amount, and look at the quoted output. Then set the tolerance so the displayed minimum received stays at or above your floor.
- Review the quote for the exact swap you intend to make. Do not estimate from a previous trade; the pool depth and route can change.
- Set a custom tolerance and read the displayed minimum received, not the percentage. The confirmation screen lists price impact and minimum received separately; price impact is already in the quoted output, and minimum received is what your tolerance controls.
- Adjust until the minimum received matches your output floor. If the quote is 3,100 DAI and the floor is 3,000 DAI, set the tolerance no higher than roughly 3.2%, not a round default.
- Sign the transaction with that confirmed minimum.
- After the receipt appears, check the actual output against the signed minimum. The swap worked when the received output is at or above the minimum received you signed.
When a Swap Reverts, Refresh Before You Widen
A swap that fails does not mean your tolerance was too low; it means the market moved more than your floor allowed. If the pool price moves beyond your tolerance before the transaction lands, the exact-input router reverts and you pay the gas for a failed transaction. The on-chain parameter behind that field is amountOutMinimum; if the execution output falls below it, the swap is not executed. Uniswap's swap protections document the same minimum-output check.
Raising the tolerance makes the transaction more likely to land through a larger price move, but it also gives a sandwich attacker more room to profit at your expense. Raising it does not reduce your own trade's price impact. On an exact-input swap, the output floor is the real protection; the tolerance is simply the maximum deviation you are willing to sign.
When a swap reverts, refresh the quote and read the error. If the quote's price impact has risen above your budget, reduce the swap size or wait for the pool to rebalance. If the route is stale, a fresh quote may fix it. Only after that diagnosis should you widen the tolerance, and only to the smallest value that keeps the minimum received above your floor.
The practical answer, then, is to treat slippage tolerance as a bound, not a permission slip. Start with an independent reference, subtract everything you are willing to lose, and set the tolerance that turns that floor into a minimum received. A reverted swap costs gas; a bad fill costs principal. When the two conflict, the floor wins.
What Happens After the Quote
Two questions separate the quoted output from the executed output.
Can a swap receive more than quoted?
Yes, favorable movement can improve received output. A slippage tolerance sets a floor, not a cap. If the pool moves in your favor before execution, the router can deliver more than the quote and the swap still succeeds.
Is swap deadline the same as slippage?
No. A deadline limits execution time, while slippage tolerance limits accepted execution deterioration. They are separate parameters: a transaction can expire for being stale, or fill at a worse price within tolerance, or both.
Slippage, Sandwich Attacks, and Stuck Swaps
The two situations that make slippage settings concrete are an attack and a transaction that will not land.
How do sandwich attacks affect swaps?
A sandwich attack places a transaction before and after yours to move the pool price against you. The attacker sees your pending swap, buys the same pair ahead of it, lets your swap fill at a worse rate, then sells back into the pool. A tight tolerance limits how much worse that fill can be; reducing swap size or moving to a deeper pool helps more than widening the tolerance.
Can I cancel a pending swap?
Once a swap is broadcast, you cannot cancel it from the UI. You can try to replace it with another transaction using the same nonce, usually with a higher gas price, or wait for it to expire if the transaction has a deadline. If it fails, the contract reverts and you lose only the gas spent.