Slippage Tolerance When a Solana Swap Fails

Slippage tolerance sets the worst output price an on-chain swap will accept relative to its quote. It matters when the pool state changes before your transaction executes: a tighter bound protects execution price but makes the transaction more likely to fail.
- For exact-input swaps, the bound is a minimum output; for exact-output swaps, it is a maximum input.
- Price impact is already reflected in the quote; tolerance covers additional adverse movement after the quote.
- If a swap fails, check its on-chain status before retrying, then adjust the cause rather than raising tolerance blindly.
Exact input: enforce a minimum output
With an exact-input swap, you specify how many units to spend and accept any output at or above a minimum. If the quote is Q and tolerance is s, the usual minimum is floor(Q × (1 − s)), calculated in the output token’s smallest units. At 0.5% tolerance, a quote of 100 tokens permits execution down to 99.5; below that, the swap instruction fails.
The contract or pool program checks this bound against the output calculated from the state it reads during execution. For example, a quote for 1 SOL might show 160 USDC, with a 0.5% minimum of 159.2 USDC. If intervening trades, fees, or a changed route reduce the result below that floor, the transaction cannot complete as specified.
This is the setting most people encounter on a normal “spend this amount” trade. Byreal is one Solana DEX where that distinction helps explain a pending or failed swap: the quoted output is an estimate from observed pool state, while the minimum output is the transaction’s on-chain acceptance condition.
Exact output: enforce a maximum input
With an exact-output swap, you name the amount you want to receive and cap what you will spend. The transaction usually derives a maximum input as ceil(Q × (1 + s)), where Q is the quoted input and s is tolerance. A quote requiring 1 SOL with 0.5% tolerance can therefore accept up to about 1.005 SOL, subject to rounding in lamports and the route’s token units.
This is useful when the received quantity matters more than the spend. It can fail if the pool price moves against the trade and the required input crosses the cap. Raising tolerance may let it execute, but it also authorizes a worse purchase price; for exact-output trades, inspect the maximum input as carefully as the desired output.
What changed while the transaction was pending?
A quote is a calculation against a snapshot of pool state, not a reservation. After the quote, another swap can move reserves or the active price range; your transaction then evaluates against the later state. On constant-product pools, the price curve steepens as a trade consumes more reserves, while concentrated-liquidity pools can move sharply when they cross a range with little liquidity. Raydium and Orca pools can therefore produce different execution outcomes even for similar-looking pairs.
Price impact belongs to the quote itself: it is the expected effect of your trade on the pool’s price. Slippage tolerance is extra room for the quote to become worse before execution. A large trade in a shallow pool can have high price impact even when the state stays still; a small trade can exceed tolerance if another trader moves the price after your quote.
“Pending” also does not by itself mean slippage caused the delay. The wallet may still be awaiting your signature, or a submitted transaction may be waiting for confirmation or fail for another reason. If it has a signature, check the transaction status and program error. A slippage error means the bound rejected execution; a compute, account, or network error calls for a different fix. Failed on-chain transactions can still incur network fees, although the swap itself does not execute.
Choose the narrowest bound that fits the route
Start with the quoted minimum or maximum, then choose tolerance based on the pair’s liquidity and short-term volatility. For deep, stable pairs, 0.1% to 0.5% is a common starting range; volatile or thinly traded tokens may need 1% to 3% or more. These are heuristics, not guarantees: the right figure depends on the route, trade size, and how quickly the price is moving.
If a swap fails, first refresh the quote and compare its price and route with the earlier estimate. Reduce the trade size or wait for conditions to settle if the expected impact or recent movement is large. Only widen tolerance when you are willing to accept the worse bound shown by the new minimum output or maximum input. Byreal’s relevance here is straightforward: as with other Solana DEXs, the trade’s limit is the parameter that decides whether changed pool state still meets your terms.
Some edge cases make the displayed estimate and raw bound less intuitive. Token-2022 transfer fees can reduce what reaches the receiving account, and a multi-pool route may encounter movement in any leg before the final output is checked. Rounding also matters for tiny trades: a fraction of a token can be several base units, and program calculations may floor or ceil at intermediate steps. If a refreshed quote still fails at a sensible tolerance, inspect the transaction error and route details rather than assuming the tolerance alone is wrong.