Why is my Transaction pending - and how to fix it

If you've asked the question above, you are not alone.  Over the last 2 weeks Ethereum and similar cryptocurrency networks have been moving at a snails pace.  Why is this?  Why does it take so long for your transaction to process?  Are you being scammed?  Where are our game items?  These are so common questions over the last couple of days, so I figured I would launch a semi-educational series on some blockchain topics to just help everyone learn a little bit more about what is going on.

Short intro - my name is James, and I'm the Founder and Lead Developer of Grasshopper Farm, an Enjin integrated Telegram game.  I've been developing in Python for around 1 year as a hobby, and began my work with blockchain and Telegram development in October of 2019.  I've been involved with a couple of Enjin community projects, and my primary focus outside of my own games are to promote community engagement offered via Telegram by independent game developers - creating fun chat games, minigames, and competitions.

Let's start off with the most pressing question - Is this a scam?  Are my funds lost?  Is the wallet I am using to send or withdraw the funds compromised?  In short, 99% of the time that answer is NO.  As long as you are using the same wallet you always use from a reputable source, transferring to a known address, and have NOT shared your 12 word seed phrase or Private Key with a single soul, there is good reason to believe your transaction is secured.  Your funds are not lost, and they are not compromised.

Second question - Why is this happening?  Why is my transaction taking a lot longer than normal?  In essence, blockchain at its core works as a continuous decentralized storage of information.  Conveniently, blockchain's name is derived from a simple explanation of what it is - all of the data communicated with the chain, is stored in "blocks" - these blocks have a certain capacity for data, and once that capacity is reached, a block is added to the "chain" - simply a collection of all of the previous blocks, in order.

Now, for most blockchains, a fee is required to post transactions to the chain.  Consider you are looking to make a purchase online, and you are asked to select the "Shipping Speed" of the product - usually you have a couple options, such as "Overnight", "1-Day", "2-Day", "Standard", etc.  In these scenarios, paying more money directly equates to how quickly you will receive your package.  Blockchain is a little bit different, in the sense that these shipping costs are dynamic and fluid, and not pegged at a certain amount, or pegged to the amount of currency you are trying to send.

Each block has a limited capacity for data to be posted to the blockchain.  Because of this, in times of high volume, and high network activity, transactions with the highest fees will always get posted first, while transactions with lower fees could be stuck waiting for hours, or even days, depending on how much demand there is to post transactions.

Now, if you find yourself in this scenario, there are a couple of options you can use to address this.  If you are trying to send Ethereum, or a token using the Ethereum network (ERC20, ERC721, ERC1155, etc) - you can reference the ETH Gas Station to double check what the current recommendations are for safe GWEI (aka the sending fee).  This will give you a general recommendation for what the lowest GWEI is you can set your transaction to that will process in a reasonable time.

After checking the safe GWEI, double check your current pending transaction - this can usually be viewed in the wallet you are using, or any popular blockchain explorer by searching your wallet address - for Ethereum transactions, I would recommend EnjinX or Etherscan.  On both of these explorers, you can search your public wallet address, and view Pending Transactions on your wallet.  Open up that transaction and navigate down to the Gas section to view your current GWEI.

By comparing the recommended safe GWEI, and your current GWEI, it should give you a pretty good idea if your transaction will be processing quickly.  It is important to realize, that the safe GWEI is a DYNAMIC setting, and will be constantly changing based on the demands and volume of the network.  Therefore, it is usually perfectly reasonable to expect your transaction to eventually process.  If you are comfortable with the wait, and the transaction is not critical, just hang out for a bit and monitor the Gas Station if you feel like things are taking too long.

Now, what should we do in the event that it is an important transaction, or things are just taking a really long time, and network congestion is not decreasing?  Here we'll review what to do in the event you want to "redo" that transaction.  I'll do another more in depth article on this later, but referencing our previous mention of all blocks being mined in order and added to the chain - each wallet will carry a NONCE, that essentially equates to what number transaction that is from your wallet.  Your first transaction will be Nonce 1, your second Nonce 2, and your 100th will be Nonce 100.  This nonce will always progress linearly, and a transaction at a Nonce that is too low will fail.  On the flipside, a transaction at a Nonce that is too high will never process until the nonce 1 lower gets executed - for example, if I send a transaction at nonce 1, then another at nonce 3, the transaction at nonce 3 will not get mined until I send another transaction at nonce 2.

Understanding Nonce is critical, because your stuck transaction is being broadcast at a specific Nonce for your wallet.  You must grab this Nonce from EnjinX or Etherscan from your pending transaction above.  Then, you must execute a transaction from your wallet at the EXACT SAME Nonce as the pending transaction, but with a higher GWEI than previously sent - this means your new transaction will overwrite the pending one, and the old transaction will get replaced by your new one.  This will NOT work if you try to execute a normal transaction at higher GWEI, as mentioned above - most wallets will automatically apply the Nonce +1 to account for the pending transaction, and will NOT attempt to overwrite the nonce.

For this, I recommend using the Enjin wallet.  You can import your wallet, and manually create a new transaction with the "Advanced Mode" options of sending ETH/ERC20 assets.  If you have questions, feel free to reach out to me at any of the locations below!  Be mindful that other pending txs will then be queued, and if the gas is high enough, they will execute also in order!