How to speed up or cancel a pending transaction

When you submit a transaction on Ethereum or a compatible network, your gas price is a bid to the network to process your transaction sooner. If you submit with a low gas price, you can find your transaction taking a long time to process. 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. If that doesn't solve the problem, continue with the following:

 

Speeding up a transaction

Screen_Shot_2020-12-02_at_4.07.35_PM.png

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.

Bear in mind that speeding up the transaction will require you to pay gas fees again. This is because it involves re-submitting a transaction, and this can only be done once the original is cancelled.

Since it involves cancellation and then resubmission--and a transaction cannot be cancelled multiple times--you can also only speed up a transaction once.

 

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.

    Note:

    MetaMask Extension currently has an experimental feature available called Advanced Gas UI. 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 Advanced Gas UI. Bear in mind:

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

    Screen_Shot_2020-10-23_at_12.27.20_PM.png

    Screenshot_2022-02-08_at_08.26.53.png

  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:

    Screen_Shot_2020-10-23_at_12.26.45_PM.png

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

    edit__old_ui_.png

    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. 

Was this article helpful?
203 out of 1221 found this helpful

Articles in this section

See more
MetaMask Support on Twitter
Beware of scam Twitter accounts. Never give anyone your Secret Recovery Phrase!
MetaMask YouTube
Fow how-to and support videos please visit our channel