Jump to content
The Coin Wire

Crypto moves, protocols and policy

A Failed Crypto Swap Can Still Cost You Gas

A failed crypto swap usually leaves the trade undone but can still cost gas; learn how to tell a revert from a pending transaction and what to check next.

By The Coin Wire Editorial5 min read

A Failed Crypto Swap Can Still Cost You Gas

A failed crypto swap usually leaves the tokens where they were, but an on-chain transaction that reverts can still cost a network fee. The distinction matters: a quote can expire before anything is sent, a transaction can sit pending, or a contract can reject it after it reaches the blockchain. Each case calls for a different response, and repeatedly submitting the same trade can add fees without fixing the cause.

Most decentralized swaps route a transaction through a smart contract that exchanges one asset for another. Before signing, the interface estimates the output and sets a minimum amount the contract will accept. If the market moves past that limit before execution, the contract reverts instead of completing the trade at a worse price. For more on how settings affect volatile pairs, paraswap offers a fuller treatment of the slippage question.

What does it mean when a crypto swap fails?

A failed swap can mean the transaction was never broadcast, is waiting to be included, or was included and reverted. Those outcomes look similar in a wallet, but they have different consequences for funds and fees.

If you reject the wallet prompt or the wallet blocks the request before broadcast, the swap has not reached the network and no on-chain swap fee is due. A pending transaction has been broadcast but has not yet been confirmed. Until it is included, the token exchange has not happened; the transaction may still execute if its conditions remain valid, or it may eventually be dropped. Network congestion, a low fee bid, and a stuck earlier transaction from the same account can all delay it.

A reverted transaction has been processed by the network, but the contract’s rules prevented the swap from completing. The token transfers made within that transaction are rolled back, so the intended trade does not settle. The network still charges for the computation used before the revert. That fee is paid in the chain’s native asset, and it is separate from the tokens the user intended to swap.

Check the transaction status in the wallet or a block explorer before trying again. “Pending” is not the same as “failed”; a second submission could create another trade if both transactions later execute. A confirmed revert is clearer evidence that the first attempt did not complete.

Why does a swap revert after I approve it?

A swap can revert after approval because the trade’s execution conditions no longer match the contract’s requirements. Approval and swap are often separate transactions: approval lets a contract spend a token up to a specified amount, while the swap transaction attempts the exchange. If approval succeeds and the swap later reverts, the approval can remain in place even though the trade did not happen.

The most common mechanism is the minimum-output check. A quote estimates how many tokens the user should receive; slippage tolerance sets how far the final amount may fall before the contract refuses the trade. A volatile price, a thin pool, or another transaction changing the pool first can push the expected output below that minimum. Increasing tolerance can let the swap proceed through a larger price move, but it also accepts a worse execution price. It does not guarantee success, and setting it very high removes some protection against adverse execution.

Other causes include insufficient balance, an expired deadline, a token restriction, or a route that is no longer executable. Aggregators may split one swap across several pools or venues to improve the quoted output, but a route with more steps has more conditions that can fail. A direct pool route may be simpler, while offering a worse quote or less available liquidity. The quoted best route is not necessarily the route most likely to execute.

What should I check before trying again?

Before resubmitting, identify whether the first transaction was rejected, remains pending, or reverted, then check the reason and the wallet’s remaining token and fee balances. A few targeted checks usually reveal whether the issue is timing, pricing, or a transaction setting.

  • Confirm the status. Look for a confirmed success, confirmed failure, or pending state using the transaction details, not only the swap interface’s message.
  • Read the revert reason. If available, it may indicate a minimum-output failure, an expired deadline, or another contract condition.
  • Compare the quote with the minimum received. A narrow tolerance can cause a revert during a sharp price move; a wider one trades a lower execution floor for a greater chance of completion.
  • Check approvals and fees. An approval may have succeeded independently, and a reverted swap may have consumed native tokens for gas. Confirm the allowance and balance before signing again.

If a transaction remains pending, use the wallet’s supported speed-up or cancellation option only after checking how it handles the account’s transaction sequence; these actions generally submit a replacement transaction and do not erase a confirmed trade. If the swap reverted, refresh the quote and review its route and settings before deciding whether to retry. For most users, a fresh quote with a reasonable minimum-output limit is a better starting point than simply raising tolerance: it reflects current conditions while preserving a limit on how much worse the execution may be.

The next signals to watch are the transaction’s final status, the reason for any revert, the quoted minimum output, and whether a separate approval remains active. Those details show whether the cost came from a network delay, an execution condition, or a trade that never reached the chain.