Failed transactions on DEXs: why you paid gas for nothing
A failed transaction on a DEX is the worst kind of spending: you pay the network fee, get nothing in return, and the chain records your attempt forever. Most failures are not mysteries. They are the same five causes, and every one of them is preventable with settings you control.
The five causes, in rough order of frequency:
- Slippage set below the pair's real volatility
- Gas priced below current priority fees
- A stuck nonce blocking everything queued behind it
- Quotes built against state that moved before landing
- Token mechanics the pool or contract does not support
Cause one: slippage too tight
The most common failure. Your trade quoted at one price, the market moved while the transaction was pending, and the execution fell outside your slippage tolerance, so the contract reverted. You paid gas for the revert.
Prevention: set tolerance to the pair's actual volatility, not to a round number. Tight tolerance on a volatile pair is a donation to the network.
Cause two: gas set too low
On chains with priority markets, an underpriced transaction sits in the mempool until it is dropped or expires. The fee you saved never got spent, and the trade never happened.
Prevention: let the wallet estimate current priority fees, and raise them deliberately when the trade is time-sensitive.
Cause three: nonce gaps
Send two transactions from the same wallet and the second waits for the first. If the first is stuck, the second is stuck behind it, and both eventually die. Pending transactions block the wallet until replaced or cancelled.
Prevention: wait for confirmation before sending the next transaction, or use replacement with a higher fee on the same nonce.
Cause four: stale quotes and state
Prices move, pools drain, and approvals expire. A transaction built against old state reverts when it lands: the pool no longer has the reserves the quote assumed, or the approval is gone.
Prevention: execute quickly after quoting, and re-quote after long waits. On concentrated pools, check that liquidity still sits where the route assumed.
Cause five: contract reverts you caused
Trading a token with transfer taxes or transfer restrictions through a pool that does not support them reverts on arrival. Approving the wrong spender, or sending a native asset to a contract that expects a token, fails the same way.
Prevention: test small first on unfamiliar tokens, and read the token contract's behavior notes before large positions.
The recovery habit
When a transaction fails: read the revert reason before retrying, check whether the nonce is blocked, and re-quote instead of blindly resubmitting. Blind retries pay gas twice for the same mistake.
The takeaway
Failed DEX transactions are almost always settings problems: slippage, gas, nonce, stale state, or token mechanics. Diagnose before retrying. The fee for a failed attempt is small; the fee for the same mistake three times is a pattern.