Error: [ethjs-query] while formatting outputs from RPC (transaction underpriced error)
Does this article need to be translated?
**The information in this article is applicable to Ethereum mainnet and other networks, such as BSC and Polygon.
If the gas price has been set too low when attempting to carry out a transaction, this sort of error can occur:
"Transaction <your transaction # here> failed! Error: [ethjs-query] while formatting outputs from RPC '{"value": {"code":-32000,"message":"transaction underpriced"}}'"
This can happen when attempting to make a swap via a DEX (decentralized exchange) or simply when sending tokens to an address.
In order to successfully complete the transaction, you should issue a new transaction whilst raising the amount of gas you pay. However, before you do so, check on the relevant block explorer (e.g. Etherscan, BscScan, Polygonscan etc.) to make sure you are not generating an increasingly longer queue of pending transactions.
To do this:
- Extension
- Mobile
-
Start a new transaction, using the same recipient details and token amount as the original (assuming you want them to remain the same) and hit 'Next'.
-
Click on the 'Market' icon located above your gas details, and then hit 'Advanced':
- You'll now be presented with a set of fields you can adjust, resembling the below:
Here you should:
- Input a comparable or slightly higher gas limit than you did for the transaction that failed
- Raise the max priority fee at least 10% higher (in gwei) than the gas fee of the failed transaction
- Set your max fee at least 30% higher than that of the failed transaction.
If you are trying to cancel that pending transaction altogether, you need to send 0 ETH (or equivalent currency) to your own address with the same nonce as the pending transaction. See our article on cancelling transactions for more guidance.
-
Click the wallet actions button in the center of the tab bar. This will bring up a pop-up menu, where you can select the'send' button.
-
Input the details of your transaction, such as the recipient address and the quantity of tokens you want to send. These details should be the same as the original (failed) transaction, assuming you still want to send the same amount to the same address. Tap 'Next'. You should now see the screen below. Tap on the highlighted gas fee number:
-
This will bring up an additional menu where you'll be presented with the options to set your gas fee low, medium, or high. Ignore these and tap 'Advanced options' instead.
-
You can now customize your gas settings with more precision to ensure your new transaction goes through.
Here you should:
- Input a comparable or slightly higher gas limit than you did for the transaction that failed
- Raise the max priority fee at least 10% higher (in gwei) than the gas fee of the failed transaction
- Set your max fee at least 30% higher than that of the failed transaction.
If you are trying to cancel that pending transaction altogether, you need to send 0 ETH (or equivalent currency) to your own address with the same nonce as the pending transaction. See our article on cancelling transactions for more guidance.
For more information on gas, see our user guide.