This guest blog was written with help from Archain Crypto — one of QuickSwap’s star Dragon Riders.
As users continue to flock to Polygon and QuickSwap, congestion on the network is at an all time high. What this means is that many transactions get stuck in pending. This blog post will explain what a pending transaction is, how to push pending transactions through, and how to avoid pending transactions.
Understanding Pending Transactions on Polygon and QuickSwap
Sometimes, when a transaction is submitted, it may get stuck pending. To make matters worse, once you have one pending transaction, all of your future transactions will be stuck in a queue behind it. Being stuck in crypto limbo isn’t fun, and it’s also not random.
Every transaction has a gas fee. The gas fee is the gas limit (amount of gas) multiplied by GWEI (price of gas in billionths of MATIC). The Polygon foundation set the gas price at 30 GWEI, but other nodes may have higher or lower gas fees based on the node owner’s preference. Thus, gas fees are dynamic based on supply and demand in an auction-like style. Transactions with lower GWEI get lower priority to be processed.
When you go to make a transaction, your wallet app estimates your gas prices and usually leaves you around 30 GWEI, which works most of the time. If there are no available nodes at the GWEI set, your transaction will sit in a pending state until a node is found that will accept it. That’s why it sometimes takes 10 seconds for a transaction and other times it takes 10 minutes or more.
If GWEI is set low (like 10 or 20), the transaction may never go through. If GWEI is set higher, it is more likely to get picked up sooner. A lot of times I can send for 35 GWEI instantly. At the time of writing, GWEI prices are higher than usual at above 150 according to https://polygonscan.com/gastracker. I may need to set my GWEI between 150–200 to get a transaction through quickly.
Pushing through Pending Transactions
Now that you understand pending transactions on Polygon and QuickSwap, it will be easier to explain how to push through them. If you have a pending transaction and you just want out of limbo, all you need to do is update your transaction with a higher GWEI.
Let’s go over two ways of doing this. You can either
- Speed up the transaction
2. Resubmit the transaction with a custom nonce
Either way, you will want to use a higher GWEI. For the purposes of this tutorial, I will be using MetaMask. If you are using another wallet, the basic principles still apply. You need to update the transaction with the same nonce and higher GWEI.
The Easier Way (Speeding up the transaction)
Within your MetaMask wallet, you will see all of your pending transactions. On the first transaction, simply select “speed up”. Then, raise your GWEI, and click “Save”. If you set the GWEI high enough to get grabbed by a node, your transaction will process faster. Remember that GWEI is a multiplier for the gas fee, so make sure the gas fee is acceptable to you.
The Manual Way (Resubmitting your transaction with a Custom Nonce)
A nonce is a sequential number of transactions sent from an address. If the nonce of a transaction is 641, that is the 641st transaction. You can replace a pending transaction by submitting the same transaction with a higher GWEI and same nonce. This effectively overwrites the transaction.
MetaMask users turn on nonce customisation by going to MetaMask settings > Advanced > Customise transaction nonce.
Resubmit your transaction, change the nonce to match that of your pending transaction, and raise the GWEI to a higher amount.
Clearing a Pending Transaction
There is a third solution for those who no longer want the transaction to go through. It’s possible to clear a pending transaction by overwriting the transaction with a transaction that does nothing. This will allow you to move on to your future transactions, while canceling the first one. To do so, simply use your wallet to send yourself 0 Matic with the same nonce and higher GWEI.
How to Avoid Pending Transactions on Polygon and QuickSwap
To avoid pending transactions you can track the price of gas. I use https://polygonscan.com/gastracker to see current prices. The tab at the top also updates with current GWEI prices. Make sure to set your GWEI according to how you want it prioritised and processed.
Now that you know what a pending transaction is on Polygon, how to push pending transactions through, and how to avoid pending transactions in the first place, we hope you’ll have an improved user experience on QuickSwap and throughout the Polygon Network.
Let us know how we did explaining this process, and don’t forget to follow us on social media to stay up-to-date on all things QuickSwap — Polygon’s most-established DEX.
Exported from Medium on May 2, 2023.