Should I increase slippage or gas limit? Know what to change
Should I increase slippage or gas limit after a failed swap? Raise slippage if output moved; raise gas only when gas used hit the limit on the explorer.
Crypto Talk Editorial3 min read
Raise slippage only if the swap reverted because the output fell below your minimum; raise the gas limit only if the transaction ran out of gas. A failed swap is reverted, so your input tokens stay in your wallet, but you still pay for the gas used.
Start with the failed transaction on the block explorer. The status line and gas figures help identify which setting, if any, needs to change. KyberSwap is a decentralized exchange aggregator that finds swap routes across supported liquidity sources and networks; its transactions can be checked the same way.
Should you raise slippage after the revert?
Raise slippage when the revert reason says the amount returned was too low. Slippage tolerance is how much the output can fall below the quoted amount before the swap fails. A changing price can push the output past that limit.
Refresh the quote first, then increase slippage a little if the refreshed swap still needs more room. A fee-on-transfer token takes a fee from the amount transferred, so less may arrive than the quote expected. These tokens often need higher slippage to complete a swap.
If the explorer shows gas used below the gas limit, the transaction did not run out of gas. Raising the limit cannot fix an output amount revert. Use the revert reason to decide whether to adjust slippage.
Should you raise the gas limit or retry unchanged?
Raise the gas limit when gas used equals the gas limit shown on the explorer. That points to an out-of-gas failure: execution used all the available gas before it could finish. Only gas actually used is charged, even when a swap fails.
Compare both figures before retrying. For instance, if the transaction used less gas than its limit and the revert mentions a low return amount, the issue is the output, not the gas allowance. If neither the status nor the figures point to either problem, refresh the quote and retry unchanged.
Choose a fix based on what the transaction shows:
- Raise slippage: the revert is about output amount. Refresh the quote, then raise slippage a little if needed.
- Raise the gas limit: gas used equals the limit, indicating out of gas.
- Refresh and retry unchanged: neither the revert reason nor the gas figures point to those failures.
For a fee-on-transfer token, account for the smaller received amount when setting slippage. Then retry once with the setting that matches the explorer evidence.