How to speed up or cancel a pending transaction

When you submit a transaction on Ethereum or a compatible network, part of the gas you pay is a bid to the network to process your transaction sooner — this element is known as the priority fee. Although MetaMask will assist you by calculating a total gas fee that is likely to have your transaction picked up, you can end up waiting a long time if you submit with a low gas price. For advice on what gas prices will result in a transaction being finalized in a reasonable amount of time, please refer to sources such as Etherscan's gas tracker, or a similar tracker for whichever network you're using.

Additionally, there are sometimes circumstances where something goes wrong, and a transaction is just stuck, or pending for a very long time.

No matter how you got to this point, there are a few different ways to address it.


Before you take any further action, your first step should be to exit and close your browser completely, reopen it, and unlock MetaMask (on mobile, just close the app and reopen it). If that doesn't solve the problem, continue with the following:


Speeding up a transaction


Try one of the options below:

  • Wait until the network is willing to process transactions at this price
  • If you haven't done so already, click that button that says Speed Up. This will let you re-submit the same transaction, but with a higher gas fee that should allow the transaction to be processed faster. Since this process re-uses the same nonce as the original, you do not need to pay for gas twice.

Bear in mind that speeding up the transaction will increase the amount you're spending for the transaction.


Cancelling a transaction - Method 1: In-app cancellation

If you haven't done this already, to cancel the transaction, simply select Cancel, as in the screenshot above. Please note, a cancellation can only be attempted if the transaction is still pending on the network. Transactions that have already been confirmed cannot be reversed.


Cancelling a transaction - Method 2: Custom nonce

This process involves sending a new transaction with the same nonce (an identifying number for every transaction, derived from the phrase 'number only used once'). The transaction does not actually have to have any value -- e.g. you could send 0 ETH. What matters is that you pay enough gas for the network to prioritize it. 

When using this method, you will need to work backwards from the oldest pending transaction in the queue that you want to cancel. For example, you cannot attempt to cancel a transaction with a nonce of 10 before cancelling nonce 9. 

The screenshots below were taken at different times, so the gas fees shown in them can vary, even from step to step. Don't let this put you off! When you do this yourself, MetaMask will automatically update in real time to show market rates.

Extension Mobile
  1. In advanced settings, turn on Customize transaction nonce and Advanced gas controls. The latter will allow you to manipulate the gas you pay and make sure your cancellation transaction is processed before the original you want to cancel.


    MetaMask Extension currently has an experimental feature available called Enhanced Gas Fee UI (not to be confused with advanced gas controls). These steps can be performed whether or not you have this turned on, but bear in mind they will look different. The steps below do not use Enhanced Gas UI. Bear in mind:

    • If you have Enhanced Gas UI switched on, you still need to have 'Customize transaction nonce' on also.
    • If you do not have Enhanced Gas UI switched on, you need to have both 'Advanced gas controls' and 'Customize transaction nonce' turned on.



  2. Send a new transaction. In the new transaction, send TO yourself, meaning your MetaMask public address. Fill in 'Custom Nonce' with the same nonce as the transaction that is still pending:


  3. Now hit 'Edit' next to 'Gas Fee' (if you have the experimental Enhanced Gas UI switched on, this will appear as 'Market'). You'll now see the below options:


    To make sure your cancellation request is picked up as a priority, and before the original, you will need to pay more for gas. Follow these instructions:

    • Set your gas limit comparable to or slightly higher than your original transaction.
    • Set your max priority fee to at least 10% higher (in Gwei) than the gas fee of the original (pending) transaction (e.g. if that transaction had a gas fee of 30 Gwei, set the max priority fee in the replacement/cancellation transaction to 33-35 Gwei).
    • Make sure your max fee is at least 30% higher than the max fee of the transaction you're replacing. For example, if your previous fee was 150 Gwei, choose something nearer 200 Gwei this time. 

    Check a gas tracker such as Etherscan's or ETH Gas Station for guidance on recommended max fees. 

Articles in this section

See more