1 min read

Slippage tolerance exceeded on Solana: fix

This error means the price moved further than your slippage setting before the swap ran, so it was cancelled. Raise the tolerance a little, reduce the trade size, or retry when the price is steadier.

The exact error by program

The same problem has a different code in each program. Find the program in your explorer logs:

ProgramCodeNamePage
Jupiter6001 (0x1771)SlippageToleranceExceeded0x1771
pump.fun (buy)6002 (0x1772) / 6042 (0x179a)TooMuchSolRequired / BuySlippageBelowMinTokensOut6002
pump.fun (sell)6003 (0x1773)TooLittleSolReceived6003
PumpSwap6004 (0x1774)ExceededSlippage6004
Raydium CLMM6017 (0x1781)PriceSlippageCheck6017
Raydium CPMM / AMM v46005 (0x1775) / 30 (0x1e)ExceededSlippageRaydium
Meteora DLMM6003 / 6004ExceededAmount / ExceededBin SlippageToleranceDLMM

What the error means

A swap includes a minimum amount you will accept. If the price moves past it between your click and execution, the swap reverts instead of filling at a worse price.

Common causes

  • A tolerance that is too low for a fast-moving or thin token.
  • A trade large relative to the pool.
  • Slow submission, which gives the price time to move.

Fix

  1. Raise slippage a little and try again.
  2. Split a large trade into smaller ones.
  3. Use a higher priority fee so the transaction lands sooner.

Do not set slippage very high on illiquid tokens, because you may fill at a much worse price. Background: what slippage is.

Questions

Do I lose the fee when a swap fails?

Usually you still pay the network fee for a failed transaction.

Is high slippage safe?

It makes swaps succeed but can fill at a poor price.

More error fixes

All 52 →