Why and What can i do if my transaction stay "pending" ?

4 93
Avatar for BenKenobi
4 years ago (Last updated: 1 year ago)

Since the advent of the DeFi several weeks ago, the price of gas on the ethereum network has reached record highs. What should you do if your transaction remains in a "pending" state because the gas price you paid was too low?


What is gas on the ethereum network ?

Gas allows the user who carries out a transaction and the validator or minor who confirms this transaction to be put in contact. The user of the ethereum network pays charges in Eth and the validator recovers these charges once the block has been added to the blockchain.

The gas charge includes several parameters:
Gas limit: this is the maximum amount of gas the user is willing to use.
Gas price: this is the price in ethers at which the user buys the gas.


The price of gas is expressed in gigaweis (Gwei).
The wei on the Ethereum network is equivalent to the satoshi for Bitcoin because it is the smallest sub-unit of the ether.


1 Gwei corresponds to one billionth of an ether.
1 ETH = 1,000,000,000,000 Gweis
= 1 000 000 000 000 000 000 weis


Gas fees will determine how quickly your transaction is processed on the ethereum network. The higher the fee, the more tempted the validator will be to validate your transaction first and enter it in the next block.


How to properly calculate gas charges?

Before each ethereum transaction, users are strongly advised to consult the average price of gas at the time they want to issue their transaction, as these fees can vary greatly in a very short period of time.

Nothing could be simpler than to consult https://etherscan.io/gastracker to determine the optimum parameters for your transaction.

Recently, the average transaction fees have reached record highs with more than $12 in fees to transfer ERC-20 tokens from one wallet to another.


What to do if you have not paid enough gas?

If the ethereum network becomes congested, as has happened since the arrival of decentralised finance (DeFi) with its very high transaction volumes per second, your transaction may remain on "pending" status.

This can last several hours, days and even weeks if your gas price is well below average.

You can check the status of your transaction at https://etherscan.io/(your_eth_address)
A transaction that is not valid then blocks all subsequent transactions on your wallet. This can quickly become very annoying.


Cancel or modify your transaction :

Here is the official method to replace a transaction on the ethereum network and thus cancel a blocked transaction.
An important point, you must use Metamask or any other wallet like Coinomi that allows you to manually modify the gas charges and also the "nounce" of the transaction. The "nounce" is the number corresponding to your transaction on your wallet, it is incremented by 1 for each new transaction.

If your wallet does not have these parameters, you can still import it into Metamask via your passphrase and access the Metamask gas features.

Once on Metamask, you will issue a new transaction on the ethereum network with a value of 0 Eth on your own address. But this time with quite high gas costs (see https://etherscan.io/gastracker).
The most important thing is to indicate the same "nonce" as the blocked transaction, which can always be consulted at https://etherscan.io/(your_eth_address).

Once all the parameters have been checked, you can send your request to the ethereum network, a validator will then consume your gas and replace the blocked transaction by this new one. Once correctly validated, it will replace the old one which was causing the problem.

You can now issue a new transaction through the ethereum network and I hope this article can help those who have encountered the same gas problem has me.

Remember this, never neglect your gas costs before a transaction and take time to check the average price.

18
$ 4.32
$ 4.32 from @TheRandomRewarder
Avatar for BenKenobi
4 years ago (Last updated: 1 year ago)

Comments

It sad so many projects are depending on the system where transaction cost is unpredictable and can potentially be any. Ethereum is such a wonderful project but price of ETH and gas, which may be seen as success of Ethereum, turn to such a nightmare for projects sitting on it. And no one promise anything for 2.0. It is just expected that cost will be lower as there will be more transactions per second, but will it be really? We shall see soon and great it there will be failure with 2.0

Many banking operations are at no cost to private, secure and instant. Any transaction cost with Ethereum maybe negative factor, if someone likes to pay in ETH

Thanks for your tips, I had once transact ion pending with 2 gwei gas, it dropped in a week.

$ 0.00
4 years ago

For my part, I had a transaction that was blocked for more than 2 weeks and that was very annoying. I used the method successfully. What you say is true, it is becoming very complicated for many ethereum based projects... I am starting to doubt the future of the network.

$ 0.00
4 years ago

Yep, I knew this way when my transaction was pending bug it was not important and fortunately they dropped it without any charge. But for many people your post is very useful. I wish Ethereum success and wait for 2.0 without hope it will be much better in terms there might be other troubles . Thanks

$ 0.00
4 years ago

Thanks for your comment

$ 0.00
4 years ago