Error: "Max Fee Per Gas Less Than Block Base Fee"
The transaction's maxFeePerGas is below the current block base fee, so nodes reject it; resend it with a max fee at or above the base fee.
When broadcasting a transaction to an EVM chain, you may encounter an error similar to the following:
{
Could not process transaction id ########,
error: Error: Returned error: failed with 30414772 gas: max fee per gas less than block base fee:
address 0x8ed869B2c78ea42FF52788f7f9541e55#####,
maxFeePerGas: 7950632202,
baseFee: 15543027274
}This error occurs because the transaction's maxFeePerGas is set lower than the current block base fee, making it invalid for inclusion in the blockchain.
What Does It Mean?
This error means the transaction is underpriced and has been rejected by the network.
- Max Fee Per Gas: The maximum amount you're willing to pay per unit of gas for the transaction.
- Block Base Fee: A dynamically adjusted minimum fee per gas that all transactions must meet or exceed to be processed. This value changes dynamically with network congestion.
Common Causes
- When Using RPC (
eth_sendRawTransaction):
ThemaxFeePerGasvalue in the transaction payload is lower than the network's base fee at the time of submission. - When Using Tatum REST API Endpoints:
Tatum usesgasPricefor bothmaxFeePerGasandmaxPriorityFeePerGas. A lowgasPricecan lead to this error.
Steps to resolve this error
Step_1: Check the Current Gas Fees
Use a gas tracker tool or an API to check the current base fee on the network.
- Example: Tatum Fee Estimate
Step_2: Retry the Transaction with Updated Fees
Increase the Fees in your transaction so the network nodes will accept it.
Also reported as fee cap less than block base fee
fee cap less than block base feeThe same node check can also appear with the older error message fee cap less than block base fee. When you broadcast through a Tatum v3 REST API endpoint, the error looks like this:
{
"statusCode": 403,
"errorCode": "sc.operation.failed",
"message": "Unable to transfer assets. Please check, that your address contains all the tokens you want to transfer.",
"cause": "Returned error: fee cap less than block base fee: address ###, gasFeeCap: 14597473823 baseFee: 15146212371"
}Here, gasFeeCap is the max fee per gas of the transaction, and baseFee is the network's base fee. Tatum REST API endpoints use gasPrice as gasFeeCap. If gasFeeCap is less than baseFee, the network rejects the transaction.
Retry the transaction
Network fees fluctuate rapidly. Wait a short time and retry the transaction: it can succeed once the baseFee drops below the auto-calculated gasFeeCap.
Set the fees manually
If retrying does not resolve the issue, set the fees manually so they account for network fluctuations:
- Estimate
gasPriceandgasLimitas described in EVM - How Fee Estimate Works. - Pass them in the
feeobject of your request.gasPriceis in Gwei.
Example request for Transfer an asset from a gas pump address:
curl --location 'https://api.tatum.io/v3/blockchain/sc/custodial/transfer' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {YOUR_API_KEY}' \
--data '{
"chain": "ETH",
"custodialAddress": "0x73b10492E49B7Ce4cc8dD7F80F38147Ad8DA5Bdf",
"recipient": "0x5593549ead3b3bd6e4b049ed607ec0f422208298",
"contractType": 0,
"amount": "10",
"tokenAddress": "0x03cee0939F57855EB95437f4a0EFA7B1AfBFA4c6",
"fromPrivateKey": "{MASTER_ADDRESS_PRIVATE_KEY}",
"fee": {
"gasLimit": "68474",
"gasPrice": "50"
}
}'In this request:
custodialAddressis your gas pump address.contractType0is an ERC-20 token transfer, andtokenAddressis the contract address of the ERC-20 token.{MASTER_ADDRESS_PRIVATE_KEY}is the private key of the master address that owns the gas pump address. On mainnet, sign with Tatum KMS and send asignatureIdinstead of a private key.fee.gasPriceis in Gwei.
Related Sources
Updated 8 days ago