Fix a swap problem

Transaction deadline expired: can the old swap still execute?

Distinguish contract execution deadlines from pending transaction status and avoid resubmitting expired swap data.

A swap deadline is a condition checked by the contract when execution occurs. Once that deadline has passed, an otherwise valid transaction may still be included in a block but fail the deadline check and consume gas.

Uniswap describes expired deadlines as a cause of failed swaps. Its interface settings are product-specific; do not assume every aggregator chooses the same deadline duration.

What expiry does not do

It does not erase the signed transaction from every node, release a pending nonce by itself or reverse an earlier approval. A pending transaction with stale swap data can therefore remain an account-management problem even when the intended exchange can no longer satisfy its deadline.

Check whether the transaction already has a receipt. If it failed, a new attempt needs a new quote and newly reviewed transaction. If it is still pending, use the wallet’s supported management flow rather than submitting a second trade without understanding the queue.

Prepare the replacement decision carefully

Changing only the gas fee preserves the original call data. If that data contains an expired deadline, a faster inclusion does not make the deadline valid again. A cancellation and a new swap are different actions with different consequences.

For future attempts, avoid leaving signing prompts open while you do unrelated work. Refresh after a long delay and check the expected output again. Extending deadlines indefinitely also has a cost: it permits older instructions to remain eligible longer. Choose a window consistent with the transaction you intend to authorize.

Sources & verification (3)

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

  1. Why did my transaction fail?

    Slippage, deadline, native gas availability, token fee and router compatibility failure conditions.

    https://support.uniswap.org/hc/en-us/articles/8643975058829-Why-did-my-transaction-fail
  2. Universal Router Commands

    Optional command failure and payment/cleanup behavior in Universal Router.

    https://developers.uniswap.org/docs/protocols/universal-router/concepts/commands
  3. How to speed up or cancel a pending transaction

    Same-nonce replacement, pending-only cancellation and earliest unresolved nonce.

    https://support.metamask.io/manage-crypto/transactions/how-to-speed-up-or-cancel-a-pending-transaction

Continue reading

Speeding up a pending swap without creating a second trade Quote expired before signing: refresh or resubmit?