Transaction Underpriced Error In MetaMask - My Lesson

Image: Metamask support

Decided to post this as I almost thought of giving my test wallet as transactions kept failing in MetaMask and I thought it was blacklisted for doing some stupid errors (creating an endless loop) when deploying my test smart contract. 

Short story of transaction underpriced error: If you encounter a "Transaction Underpriced" error in MetaMask when trying to send a transaction on the network, it means that the gas fee (or gas price) you set for the transaction is too low. 

To resolve the "Transaction Underpriced" error, you can take the following steps:

  1. Increase Gas Price: In MetaMask, you have the option to set the gas price for your transaction. To increase the gas price, you can do the following:

    a. Open your MetaMask wallet and click on the "Send" or "Swap" function to create a transaction.

    b. Look for the "Gas Fee" or "Gas Price" setting. Increase the gas price drastically to a level else you might end up doing it again and again wasting more gas. You can check websites like Etherscan or GasNow for real-time gas price information.

    c. Make sure you're comfortable with the higher gas fee, as it will affect the cost of your transaction.

  2. Resubmit the Transaction: Once you've adjusted the gas price, resubmit the transaction. This time, it should go through successfully if the gas price is now competitive with network conditions.

  3. Patience: Sometimes, network congestion can be temporary. If you're not in a hurry, you can wait and try the transaction again later when network activity decreases.

Keep in mind that gas prices can fluctuate significantly on the network, especially during periods of high demand or network congestion. It's essential to monitor gas prices and adjust your transaction accordingly to ensure it gets processed in a reasonable time frame.

Image: Metamask Support. I did a similar amount as it was test network to fix my problem

Storytime: While testing on the Polygon Mumbai network (this can happen in the Ethereum network too since they worked the same), I was prepared to deploy their smart contract as usual but it kept failing due to timeout. It somehow worked when I tried another test account. I even tried deploying in the Ethereum Sepolia network and it failed too.

I also wasted so much time testing with the different gas limits and maxGasPrice in the Truffle JSON (was using Visual Code) to deploy the smart contract as it just timeout without any error.  

I almost suspected the wallet was blacklisted until I realized an error in MetaMask stating the transaction error "Transaction <your transaction # here> failed! Error: [ethjs-query] while formatting outputs from RPC '{"value": {"code":-32000, "message": "transaction underpriced"}}'"

Given my past experience of replacement transaction underpriced errors, I tried to find the pending transactions in the wallet, and to my surprise, there seemed to be none in MetaMask. I was out of my wit's end and decided to just up the gas to a crazy amount and it worked somehow.  

The relief and sense of accomplishment were palpable. I went from thinking nodes will blacklist wallets to understanding that it was merely a matter of setting the correct gas price for their transactions. I couldn't help but smile at the lack of proper error messages and the still nascent stage of developer tools in Cryptoland.

Unlock the secrets of Ethereum's inner workings and delve deep into its internal transactions. Ever wondered how smart contracts interact or the hidden mechanics behind your favorite decentralized apps? Explore real-life examples that demystify Ethereum's core functions in this insightful article. Click here to journey into the heart of Ethereum: Discover Ethereum's Internal Transactions.

Author
Sky Hoon. Read Full Bio
Website Owner, Twitter-er
He has been trading since 2008. He started this blog to share the journey about option trading. He dabbled in stocks, bitcoin, ethereum (in Celsius Network), ETF (lazy Dollar Cost Averaging) and also built websites for fun. He used this as a platform to share my experiences and mistakes in trading, especially options which I just picked up.

Related Posts

Bala Curve with Example
  The Bala's Curve is one of the most important and official formula in evaluating the value of a home given its year...
Read More
101 Inspirational Crypto Quotes
Here are 101 inspirational crypto quotes to motivate and inspire you about crypto: "If you don't believe it or don't...
Read More
Is Renting Out A Condo Worth It (Compared)
In 2023, I rented out my 3-bedroom executive condo for $5,000 to a family tenant for 1 year. It is worthwhile to r...
Read More
How Cloudflare Makes Money
As a user of Cloudflare domain and workers services, it was very logical to invest in it, though I sold it before the...
Read More
Ways To Improve Trading Luck
Improving trading luck is a concept that often raises eyebrows among seasoned investors, as luck is generally conside...
Read More
Subsale vs Resale Condo - Which Is Right for You?
As a subsale condo buyer, it might be good to explain the difference between "subsale" and "resale." The key differen...
Read More
Mastering the Art of Annual Report Analysis - A Warren Buffett Approach
  I remember the first time I decided to dive into an annual report with the same level of scrutiny as the Oracle of...
Read More
Buying Subsale Condos in Singapore - Pitfalls to Avoid
Buying a sub-sale condo isn't the same as a new launch. When I bought a sub-sale condo after decoupling our first con...
Read More