Ethereum is one of the world’s most versatile blockchains, with functionality that supports innumerable decentralized applications and blockchain assets. Although conceived in 2013 by Vitalik Buterin, Ethereum did not launch until 2015, it has since been at the forefront of blockchain utility, especially with the recent popularity of non-fungible tokens (NFTs).
An NFT is an asset on a blockchain that is completely verifiably unique and therefore irreplaceable. Today, many people use NFTs to digitize real-world assets and expose these assets to a global audience. NFTs are very popular in art and photography, as they allow creators to access a wide pool of potential fans and buyers. Currently, most NFTs are on the Ethereum blockchain.
Ethereum is also the most popular network for decentralized applications (DApps). These apps are powered by smart contracts that drive several functions on the blockchain using specified agreements and conditions. Since the NFT and DApp markets exploded, the Ethereum network has become very busy, and sometimes leaves some transactions stuck for long periods.
Check out our video on how to fix stuck transactions on Ethereum:
Why Do Some Transactions Get Stuck?
A delay in processing simply means that no miner has picked up the transaction yet. All Ethereum transactions require a gas fee (gwei), a processing fee set to incentivize miners to pick up and process the transaction. This fee is never static, as it depends on the network congestion at transaction time. Sometimes, gas fees may be very high if there are a lot of people transacting simultaneously.
Ethereum wallets usually recommend a gas fee based on current network specifics but would let the user increase or reduce it as preferred. If a transaction is delayed for too long, it’s likely that the gas fees for other transactions on the network are considerably higher, and miners are ignoring the lower prices.
What is a Nonce?
Used in cryptography as an acronym for “Number Only Used Once,” a nonce is a number that functions as an identifier for a transaction. This number is sequential and follows an order such that transactions with lower nonces get processed before others. Since one Ethereum wallet can initiate any number of transactions, nonces represent a (sometimes chronological) sequence that transaction processing follows.
How to Fix a Stuck Transaction
There are three main ways to fix a stuck transaction: cancelling the transaction, increasing the gas fee, or introducing a new transaction with a custom nonce. Before fixing a stuck transaction, it is important to verify the transaction in a block explorer like Etherscan to confirm that it is pending. An ETH wallet may provide users with a cancel or reset button that helps to delete the transaction. After cancelling, it might be necessary to close the wallet application or browser and then reopen it.
If it is a hardware wallet, turning off and disconnecting the device is also required. Although this is a simple and quick way to solve stuck transactions, users should note that this method may not always work. It is also possible to fix a transaction by increasing the set gas fee. If a user initiates a transaction with a low gas fee but later increases it to match the market’s current price, miners will pick up and process the transaction.
Another way is to use a new transaction to clear the old one by setting a custom nonce. For instance, a wallet might have three pending transactions, each with nonces 3, 4, and 5, respectively. The network would process nonce 3 first before the others. However, if the gas fee for that transaction is low and miners aren’t picking it, all three transactions could remain stuck.
The solution here is to initiate a new 0 ETH transaction with a high gas price and send the transaction to the user’s own address. To clear out the transaction, the user must ensure that the nonce specified in the new transaction is the same as the old one. Although this will cost some gas, it immediately clears out the clog and resolves all the other transactions.
How to Prevent a Stuck Transaction
The simplest way to prevent a stuck transaction is to ensure the gas fee you are setting agrees with current market prices. If the gas fee is high enough, miners pick it up almost immediately and process the transaction without delay. Users can confirm current gas prices from the wallet or from other online sources. If you are looking to save on gas fees, there are gas tracking websites and applications that will help you optimize this process.
Fixing a stuck Ethereum transaction is easy and usually takes a few minutes. When the transaction is still “pending” on the block explorer, these methods can help solve any problems concerning transaction delay. However, users should note that it is mostly impossible to fix any transactions where the status has moved from “pending” to “completed.”