Common DEX Errors and How to Fix Them: Uniswap, PancakeSwap, and More
Common DEX Errors and How to Fix Them
Stop losing gas to failed transactions — diagnose and fix swap errors on any DEX
Few things in crypto are more frustrating than a failed DEX transaction. You set up your swap, confirm it in your wallet, pay gas, and then watch it revert with a cryptic error message that tells you nothing useful. Even worse, you still lose the gas fee. These errors are so common that they drive beginners away from DeFi entirely, and even experienced users waste gas regularly.
This guide covers the most frequent DEX errors across Uniswap, PancakeSwap, SushiSwap, Jupiter, and other major decentralized exchanges. For each error, you will learn what it actually means, why it happens, and exactly how to fix it so your next swap goes through.
In This Guide
- Step 1: Fix Slippage Tolerance Errors
- Step 2: Resolve Token Approval Issues
- Step 3: Handle Insufficient Liquidity Errors
- Step 4: Fix Gas Estimation Failures
- Step 5: Troubleshoot Stuck or Pending Transactions
- Step 6: Deal with Price Impact Warnings
- Tips and Best Practices
- FAQ
What You'll Need
- A wallet like MetaMask, Rabby, or Phantom connected to a DEX
- Basic understanding of how token swaps work on decentralized exchanges
- Enough native tokens (ETH, BNB, SOL, etc.) for gas fees
- Familiarity with token approvals and transaction confirmation
Step-by-Step Guide
Step 1
Fix Slippage Tolerance Errors
The most common DEX error is a transaction reverting due to slippage. This happens when the token price moves beyond your allowed tolerance between the time you submit the transaction and when it gets confirmed on-chain. By default, most DEXs set slippage at 0.5%, which works for major tokens but fails for volatile or low-liquidity ones.
To fix it, increase your slippage tolerance in the DEX settings. For major token pairs, 1-2% is usually enough. For small-cap or newly launched tokens, you may need 5-12% or even higher. Be cautious with very high slippage settings though, as they make you vulnerable to sandwich attacks where MEV bots front-run your trade. On Solana-based DEXs like Jupiter, priority fees also help your transaction confirm faster, reducing the window for price movement.
Step 2
Resolve Token Approval Issues
Before swapping a token for the first time on an EVM-based DEX, you need to approve the DEX contract to spend your tokens. If you skip this step or your previous approval has expired or was revoked, the swap will fail. The DEX usually prompts you automatically, but sometimes the approval transaction fails silently.
Check your token approval status on the DEX interface. If the swap button says "Approve" instead of "Swap," click it first and wait for the approval transaction to confirm before attempting the swap. If you previously set a limited approval amount and are trying to swap more than that limit, you will need to approve again. Use a tool like Revoke.cash to audit and manage all your outstanding token approvals.
Step 3
Handle Insufficient Liquidity Errors
This error means the pool does not have enough tokens to fill your order at the current price. Either the pool is too small for your trade size, or the token pair does not have a direct trading pool and the DEX cannot find a viable routing path. This is common with new or micro-cap tokens.
Solutions: reduce your trade size, try a DEX aggregator like 1inch or Jupiter that finds the best route across multiple pools, or check if the token has more liquidity on a different DEX or chain. For very small tokens, the only available pool might be on the chain where the token was launched, so make sure you are on the correct network.
Step 4
Fix Gas Estimation Failures
A gas estimation error usually means the transaction will fail if submitted, and your wallet is warning you before you waste gas. The root cause is often a token that has special transfer mechanics — tax tokens, rebase tokens, or tokens with buy/sell fees built into their contracts. These non-standard transfers confuse the gas estimator.
For tax tokens, increase slippage to account for the token's built-in tax. If a token has a 5% buy tax, you need at least 6-7% slippage. Check the token's documentation or contract on a block explorer to understand its fee structure. If gas estimation fails even with high slippage, the token contract may have a trading restriction like a cooldown period, maximum transaction size, or a whitelist that blocks your address.
Step 5
Troubleshoot Stuck or Pending Transactions
A transaction that stays pending for a long time usually means your gas price is too low for current network conditions. On Ethereum, this happens during high congestion when your max fee is below what miners need to include your transaction. On Solana, pending transactions typically just expire after a timeout.
On EVM chains, you can speed up a stuck transaction by resending it with the same nonce but a higher gas price. In MetaMask, click on the pending transaction and select "Speed up." If you want to cancel it instead, send a zero-value transaction to yourself with the same nonce and higher gas. On Solana, simply retry the transaction with a higher priority fee. Never submit multiple transactions while one is pending, as they will all queue up behind the stuck one.
Step 6
Deal with Price Impact Warnings
A high price impact warning means your trade is large relative to the pool size and will move the price significantly against you. A 1% price impact means you are getting roughly 1% less value than the quoted rate. Most DEXs show a warning at 3-5% impact and block trades above 15% because the execution would be terrible.
To reduce price impact: split your trade into smaller pieces executed over time, use a DEX aggregator that routes across multiple pools to minimize impact on any single pool, or try a different DEX with deeper liquidity for that pair. For large trades, consider using a limit order feature if available, which fills your order gradually as liquidity becomes available rather than hitting a thin pool all at once.
Tips and Best Practices
- Bookmark the block explorer for each chain you use (Etherscan, BSCScan, Solscan). When a transaction fails, check it on the explorer for a more detailed error message than what the DEX shows.
- Before swapping a new token, search for its contract address on a token scanner like Token Sniffer or GoPlusLabs to check for honeypot mechanics or hidden fees.
- On Ethereum, use tools like Blocknative or the MetaMask gas estimator to check current gas prices before submitting. Waiting 30 minutes during a gas spike can save significant money.
- If a token consistently fails to swap, check if it has been flagged or delisted on the DEX. Some tokens are blocked for scam or security reasons.
- Keep a small buffer of native gas tokens in your wallet at all times. Running out of ETH for gas while holding other tokens is a common and avoidable problem.
Important: Setting slippage extremely high (above 15%) makes you vulnerable to sandwich attacks where bots extract value from your trade. Only use high slippage for tokens you have verified require it. Never approve unlimited token spending for contracts you do not trust. Use limited approvals for the exact amount you intend to swap. If a token cannot be sold on any DEX, it is likely a honeypot scam designed to let you buy but not sell. Do not invest more trying to find a way to sell. Failed transactions still consume gas. On Ethereum mainnet, a failed swap can cost $5-20 in wasted gas. Simulate your transactions first using tools like Tenderly to check if they will succeed.
Ready to start trading?
Trade on Bitget Try CoinTech2u
Affiliate links — we may earn a commission at no extra cost to you.
Frequently Asked Questions
Why did my swap fail but I still lost gas?
Blockchain transactions consume gas whether they succeed or fail. The gas pays validators for processing your transaction, and they did the computational work even if the swap condition was not met. This is why simulating transactions before submitting saves money.
What slippage should I use for normal swaps?
For major token pairs like ETH/USDC on high-liquidity pools, 0.5-1% is fine. For mid-cap tokens, 1-3%. For small-cap or newly launched tokens with tax mechanics, 5-15% may be necessary.
How do I know if a token is a honeypot?
Before buying, check the token contract on Token Sniffer, GoPlusLabs, or De.Fi scanner. These tools analyze the contract code for sell restrictions, hidden fees, and owner-only functions that could block your ability to sell.
Can I recover gas from a failed transaction?
No. Once a transaction is mined on-chain, the gas fee is consumed regardless of outcome. This is a fundamental aspect of blockchain design. Prevention through simulation and correct settings is the only approach.
Alex Rivera
Crypto Educator
Alex breaks down complex crypto concepts into beginner-friendly step-by-step guides.
Disclaimer: This article is for informational purposes only and does not constitute financial advice. Cryptocurrency investments carry significant risk. Always do your own research and never invest more than you can afford to lose. This article may contain affiliate links.