When you are transacting on the Ethereum network, you may sometimes encounter a frustrating issue—your transaction gets stuck in a pending state and takes a long time to confirm. This problem often arises from setting the Gas fee too low. Miners prioritize operations that are willing to pay higher transaction fees, so if your Gas price is not competitive, your transaction will be pushed to the back of the queue.
The good news is that you can speed up or replace this transaction by increasing the Gas fee. While it sounds complicated, it's actually not difficult to do. This method applies to ETH as well as all tokens based on the ERC20 standard.
Understand the Root Causes of Trading Lag
Ethereum uses a bidding mechanism to process transactions. You need to understand three key concepts:
Gas cost — The computational workload cost required to complete a transaction.
Gas Price — The price of gas per unit (which can be understood as the unit price of “working time”)
Gas Limit — The maximum fee you are willing to pay for this transaction
The product of the first two determines your total transaction fees. When the network is busy, if the Gas price you set is too low, other users willing to pay higher fees will be prioritized. Once a transaction enters the pending state, the system will lock that wallet address to prevent new transactions from being initiated until this transaction is either confirmed or automatically expires.
How to Speed Up Transactions with MetaMask
First Method: Use the Acceleration Feature
Open the MetaMask wallet where you sent the unconfirmed transaction. If using an external wallet, you need to import it using the mnemonic phrase or private key.
Find the transaction in the “Activity” tab and click the “Accelerate” button.
The system will notify the Miner of your transaction again. Select the “Fast” option to increase the Gas price and then save.
If the preset options do not meet the needs, enter “Advanced” mode to manually input the Gas price. You can check the real-time Gas prices on Etherscan or EthGasStation.
Second method: Replace old transaction with new transaction
Enter your MetaMask wallet, find the pending transaction, and note its Nonce value (transaction sequence number)
If there are multiple pending transactions, process them starting from the one with the smallest serial number.
Go to Settings → Advanced Options
Scroll down and enable the 'Custom Transaction Nonce' feature
Copy your wallet address
Click on “Send” to create a new transaction, paste your own wallet address in the receiving address field.
Key Steps: Set the send amount to 0 ETH, but use the Nonce value from the original transaction. Make sure to set a sufficiently high Gas price.
Click confirm and wait for the new transaction to be confirmed, the original transaction will be replaced.
After the transaction is completed, remember to disable the “Custom Nonce” feature to ensure security.
Cancel Transaction via Trust Wallet
Click on the unconfirmed transaction in the Trust Wallet app, find and record the Nonce value.
Create a new transaction, setting the recipient to your own wallet address (must be the same)
Set the ETH amount to 0 and click next.
Click the settings icon in the upper right corner.
Enter the previously recorded value in the Nonce field, while setting a sufficiently high fee in the Gas price field.
Submit the transaction and wait for confirmation, which will replace the original stuck transaction.
Important Considerations
Confirmed transactions cannot be canceled or modified.
Be extra cautious when setting a custom Nonce; an incorrect Nonce can cause new transactions to become sluggish.
Setting the Gas price too low may still result in delayed replacement transactions, be sure to check the recommended fee rates of the current network.
After the replacement transaction is completed, the Nonce customization feature should be turned off and restored to normal status.
Final Suggestions
While it's reassuring to have ways to handle stuck transactions, the best strategy is to set a reasonable Gas price from the beginning. Checking the real-time Gas market before initiating any transaction can help you make informed choices. When transactions do get stuck, these methods can effectively resolve the issue, allowing you to regain full control of your wallet. Remember, the key to successfully canceling or replacing a transaction is to pay enough Gas fees.
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
How to cancel or replace an unconfirmed transaction on Ethereum
When you are transacting on the Ethereum network, you may sometimes encounter a frustrating issue—your transaction gets stuck in a pending state and takes a long time to confirm. This problem often arises from setting the Gas fee too low. Miners prioritize operations that are willing to pay higher transaction fees, so if your Gas price is not competitive, your transaction will be pushed to the back of the queue.
The good news is that you can speed up or replace this transaction by increasing the Gas fee. While it sounds complicated, it's actually not difficult to do. This method applies to ETH as well as all tokens based on the ERC20 standard.
Understand the Root Causes of Trading Lag
Ethereum uses a bidding mechanism to process transactions. You need to understand three key concepts:
Gas cost — The computational workload cost required to complete a transaction. Gas Price — The price of gas per unit (which can be understood as the unit price of “working time”) Gas Limit — The maximum fee you are willing to pay for this transaction
The product of the first two determines your total transaction fees. When the network is busy, if the Gas price you set is too low, other users willing to pay higher fees will be prioritized. Once a transaction enters the pending state, the system will lock that wallet address to prevent new transactions from being initiated until this transaction is either confirmed or automatically expires.
How to Speed Up Transactions with MetaMask
First Method: Use the Acceleration Feature
Second method: Replace old transaction with new transaction
Cancel Transaction via Trust Wallet
Important Considerations
Final Suggestions
While it's reassuring to have ways to handle stuck transactions, the best strategy is to set a reasonable Gas price from the beginning. Checking the real-time Gas market before initiating any transaction can help you make informed choices. When transactions do get stuck, these methods can effectively resolve the issue, allowing you to regain full control of your wallet. Remember, the key to successfully canceling or replacing a transaction is to pay enough Gas fees.