Why Did My Swap Fail? Common DEX Swap Errors and Fixes

— By Tony Rabbit in Tutorials

Why Did My Swap Fail? Common DEX Swap Errors and Fixes

A failed DEX swap usually traces back to one of five causes: slippage set too low, not enough gas or priority fee, a token tax that triggers a revert, a honeypot blocking sells, or an expired Solana blockhash. Here is how to diagnose each and fix it fast.

If you are asking "why did my swap fail," the short answer is that your transaction was rejected before it could settle, and on a decentralized exchange (DEX) that almost always comes down to one of five things: slippage set too low for the token, not enough gas or priority fee, a token tax that forces a revert, a honeypot that blocks selling, or, on Solana, an expired blockhash. The frustrating part is that on EVM chains like Ethereum, BNB Chain, or Base, a reverted swap still burns the gas you paid, so you can lose money without ever trading. This guide walks through each cause, how to read the actual error, and a clear fix flow for every scenario.

Key Takeaways

  • A reverted swap on EVM chains still costs gas, even though no trade happened.
  • Slippage that is too low is the single most common cause of failed swaps on volatile or taxed tokens.
  • Raising slippage too high protects you from reverts but invites sandwich bots, so balance it.
  • A token where buys succeed but every sell fails is the classic signature of a honeypot.
  • On Solana, most "failures" are expired blockhashes or low priority fees, not bad tokens.

The most common cause: slippage too low for volatility or tax

Slippage tolerance is the gap you allow between the price you see and the price you actually get. If the token moves, or charges a buy/sell tax, and the final price falls outside your tolerance, the contract reverts to protect you. On a fast-moving memecoin a 0.5 percent default is almost guaranteed to fail. If the token has a 5 percent transfer tax, any slippage below that tax will revert every single time because the router can never deliver the minimum output you demanded.

The fix is to match slippage to reality. For a stable, liquid pair, 0.5 to 1 percent is fine. For a volatile small cap, 3 to 8 percent is often needed. For a taxed token, your slippage must exceed the combined buy or sell tax plus a small buffer for price movement. If you want the full mechanics, see our guide on what slippage is in crypto. The catch: do not just crank it to 49 percent. High slippage is an open invitation for sandwich bots to front-run and back-run your trade, draining value you authorized away with that wide tolerance.

Insufficient gas, priority fees, and Solana blockhash failures

On EVM chains, every swap needs enough native token (ETH, BNB, MATIC) to pay gas. If your wallet holds the token you want to trade but not enough of the gas token, the swap fails before it starts. This is a distinct problem from slippage, and we cover the wallet-level fix in how to fix insufficient funds for gas in MetaMask. Setting your gas limit too low can also cause an "out of gas" revert mid-execution, which still costs you the gas consumed.

Solana works differently. There is no per-token gas balance problem, but two issues dominate. First, priority fees: during congestion, a transaction with a low or zero priority fee gets dropped by validators, so you must bump it. Second, expired blockhashes: a Solana transaction references a recent blockhash, and if it is not confirmed within roughly 60 to 90 seconds, the network rejects it as stale. Both show up as a generic failure in your wallet. If you keep hitting these, our walkthrough on how to fix transaction simulation failed on Solana breaks down the priority-fee and blockhash retry flow.

Token tax and transfer restrictions causing reverts

Many tokens apply a tax on every buy or sell, routed to marketing wallets, liquidity, or the deployer. Others add transfer restrictions: max wallet caps, max transaction size, cooldown timers, or blacklists. Any of these can make a swap revert even when your gas and balance are perfect. A common case is buying more than the per-wallet limit, or selling during a cooldown the contract enforces.

The diagnosis is to check the token's contract before blaming your wallet. A token scanner or the DEXTools security panel will surface buy/sell tax percentages and flag restrictions. If the tax is 8 percent and your slippage is 5 percent, you have found your answer. The fix is to raise slippage above the tax, or to reduce trade size below the max transaction limit. If the contract is paused or your address is blacklisted, no slippage setting will save you, and that is a strong signal to walk away.

Honeypot tokens: when a failed sell is actually a trap

This is the dangerous one. A honeypot is a token engineered so that anyone can buy but only the deployer can sell. Buys go through smoothly, the chart looks healthy, and then every attempt to sell reverts. If your buys succeed and your sells fail no matter how high you push slippage or gas, you are almost certainly in a honeypot. No setting will fix it because the contract is doing exactly what it was written to do.

SymptomLikely causeFirst fix to try
Reverts on both buy and sellSlippage too low vs tax/volatilityRaise slippage above the token tax plus buffer
Fails before submittingNot enough native gas tokenTop up ETH/BNB/SOL for gas
Buys work, every sell revertsHoneypot or sell blacklistStop; no fix, funds likely trapped
Solana drops after ~1 minuteExpired blockhash or low priority feeRaise priority fee and resubmit quickly

Protect yourself before you buy, not after. Run any new token through a security check and read our breakdown of what a honeypot token is so you can spot the contract patterns that disable selling. A simulated sell on a scanner is the cheapest insurance you will ever buy.

How to read the revert reason in your wallet or explorer

You do not have to guess. Most wallets show a short error like "transaction reverted" or "execution reverted," and a block explorer gives you the full picture. Open the failed transaction hash on Etherscan, BscScan, or Solscan, and look for the revert reason string. Messages like "INSUFFICIENT_OUTPUT_AMOUNT" or "Too little received" point straight at slippage. "TRANSFER_FROM_FAILED" often means an approval or tax issue. "Out of gas" means your gas limit was too low.

If you see "execution reverted" with no detail, the contract failed a require check without a message, which is common with taxed and restricted tokens. Our deep dive on execution reverted error causes and fixes maps the most frequent revert strings to their real meaning so you can act instead of retrying blindly and paying gas again.

A diagnose-and-fix flow for each cause

Work through this order and you will resolve almost every failed swap. First, check that your wallet holds enough native gas token; if not, top it up. Second, open the failed transaction on an explorer and read the revert reason, which usually names the cause directly. Third, if the reason points at output amount, raise slippage to just above the token's tax plus a small volatility buffer, never to an extreme that invites sandwiching.

Fourth, if you are on Solana and the transaction simply vanished, increase the priority fee and resubmit fast before the blockhash expires. Fifth, if buys succeed but sells revert no matter what you change, stop trying; that is a honeypot or a sell restriction, and pushing more gas at it only loses more money. The discipline is simple: read the error, match it to the cause, and apply the one fix that actually addresses it rather than spamming retries.

This article is for educational purposes only and is not financial advice.