Fix a swap problem

My swap reverted without an error message: what can I check?

Collect useful evidence when an explorer reports execution reverted without decoding a clear reason.

A blank or generic revert reason does not mean the swap failed randomly. The explorer may lack error data or the information needed to decode it. Avoid choosing a fix solely from the words “execution reverted.”

Preserve the transaction context

Record the chain, hash, sender, called contract, input and output token contracts, amount and application error. Check whether the failure occurred in a mined transaction or during a preflight simulation. Only the former establishes an executed transaction with a receipt.

EIP-140 allows a revert to return error data, but it does not require every failure to deliver a user-friendly explanation. Modern contracts may use structured custom errors. ERC-6093, for example, defines distinct token errors carrying balance or allowance information.

Use evidence to narrow the possibilities

Compare the transaction with the quote you accepted. A visibly expired deadline is relevant. A different allowance spender is relevant. Merely seeing a high gas limit is not evidence that gas exhaustion caused the revert.

If a fresh quote also fails simulation before signing, retain that error and stop paying for repeated attempts. When the same operation succeeds for a different token, that observation may help support isolate token behavior, but it does not prove your original token is malicious.

Ask official application support to identify the failing call or decoded custom error. They may need a historical execution trace. You should not have to share a recovery phrase, give remote control of your wallet or sign a “validation” message to make the existing transaction readable.

Sources & verification (2)

Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.

  1. EIP-140: REVERT instruction

    Execution rollback, unused gas and revert reason behavior.

    https://eips.ethereum.org/EIPS/eip-140
  2. ERC-6093: Custom errors for commonly-used tokens

    Distinct structured errors for insufficient balance and allowance.

    https://eips.ethereum.org/EIPS/eip-6093

Continue reading

Gas estimation failed before a swap: should I continue? What to send support when a swap fails