Fix a swap problem

Replacement transaction underpriced: what does the wallet mean?

Why a node can reject a higher-fee replacement and what to check before changing transaction fees again.

“Replacement transaction underpriced” means the node did not accept your new transaction as a sufficiently priced replacement for an existing transaction using that account nonce. It does not necessarily mean the original swap failed.

Ethers’ error reference distinguishes this from ordinary nonce errors. Replacement acceptance depends on the relevant node and fee model; a small increase is not universally sufficient.

Find the transaction being replaced

Match the sender, chain and nonce. Check whether another speed-up is already pending or a transaction using that nonce has confirmed. Comparing only with the first submitted fee can overlook a newer replacement.

Review whether you intend to accelerate the same swap or cancel it. These have different transaction contents even though both compete for the same nonce.

Use the wallet’s supported replacement flow

MetaMask’s speed-up guidance uses the existing nonce with a higher fee. On fee models with multiple fee parameters, changing only one value may not satisfy replacement requirements. Follow current wallet guidance for the selected network instead of applying an arbitrary universal percentage.

Also check the swap deadline. A more expensive replacement with unchanged expired data can simply reach the chain sooner and revert.

Do not create a fresh ordinary swap to bypass this error without resolving the original. A transaction with a later nonce may wait behind it, then execute as a second trade. Save the original and replacement hashes so you can identify the one that ultimately consumes the nonce.

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. Error Codes | ethers

    Nonce-too-low, replacement-underpriced and gas-estimation failure meanings.

    https://docs.ethers.org/v5/troubleshooting/errors/
  2. 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 Transaction deadline expired: can the old swap still execute?