Ethereum gas estimation can fail when the network node simulates a transaction and determines that the transaction may revert, run out of gas, use invalid parameters, or otherwise fail under the current blockchain state.
The error often appears as “gas estimation failed,” “cannot estimate gas,” “execution reverted,” or “unable to estimate gas.”
Importantly, a gas estimation failure does not always mean that gas is too expensive. Gas estimation is primarily an attempt to simulate how much gas a transaction needs to execute successfully. Ethereum’s eth_estimateGas RPC method performs an estimate without actually adding the transaction to the blockchain.
Common causes include:
- The smart contract would revert
- Insufficient token balance
- Insufficient ETH for gas
- Incorrect transaction parameters
- Missing token approval
- Slippage or price conditions causing a swap to revert
- Contract restrictions
- Incorrect network or contract address
- A stale or problematic RPC response
- An incorrectly configured gas limit
- Smart contract code that behaves differently during simulation
Ethereum gas estimation is the process of predicting how much gas a transaction will require before it is submitted to the blockchain.
Wallets and decentralized applications commonly use Ethereum’s eth_estimateGas RPC method to estimate the gas required for a transaction. The transaction is simulated rather than actually added to the blockchain.
A simplified process looks like this:
User clicks transaction → Wallet requests gas estimate → Node simulates transaction → Estimate returned → User signs transaction
Ethereum’s developer documentation describes eth_estimateGas as a method that generates an estimate of the gas necessary for a transaction to complete.
If the simulation encounters a failure, the wallet or dApp may display a gas estimation error instead of allowing the transaction to proceed.
The most important thing to understand is that gas estimation failure often indicates a problem with the transaction itself, not simply a high gas fee.
When a node simulates the transaction, the smart contract executes according to the current blockchain state.
If the simulation reaches a condition that causes the transaction to revert, the node may be unable to provide a useful gas estimate.
For example, imagine a smart contract has a function that says:
require(balance >= amount)
If you try to transfer more tokens than you own, the simulation can fail.
Increasing the gas limit would not fix the underlying problem because the transaction itself is invalid under the current state.
This is one of the most common reasons gas estimation fails.
Smart contracts contain conditions that can cause a transaction to revert.
For example:
require(amount > 0)
If the transaction attempts to send zero tokens, the contract can reject it.
Other examples include:
- Insufficient token balance
- Insufficient allowance
- Unauthorized caller
- Token transfer restrictions
- Expired transaction deadline
- Invalid contract state
- Paused contract
- Failed signature verification
- Failed price or slippage condition
Because gas estimation simulates the transaction, the simulated revert can prevent the wallet from calculating a normal gas estimate.
Ethereum gas fees are paid in ETH. Ethereum’s documentation states that gas fees are paid using Ethereum’s native currency, ETH.
Suppose you have:
100 USDC
but your wallet has:
0 ETH
You may still be unable to send the USDC from a normal externally owned account because you need ETH to pay the network fee.
Ethereum’s documentation notes that writing to a smart contract normally requires an account with enough ETH for gas, although account-abstraction systems can use a paymaster to cover gas on the user’s behalf.
Important distinction
Having enough tokens to send does not necessarily mean you have enough ETH to pay the transaction fee.
Suppose you have:
500 USDC
but your DEX transaction attempts to swap:
600 USDC
The contract simulation can detect that the transaction cannot execute successfully.
The result may be an error such as:
“execution reverted”
or:
“cannot estimate gas.”
Check your token balance before submitting the transaction.
Token swaps and other smart-contract operations often require an ERC-20 token allowance.
For example, if you want to swap USDC through a decentralized exchange, the relevant contract may need permission to spend your USDC.
If the required allowance is missing or too low, the transaction can fail during simulation.
The typical sequence can be:
Approve token → Swap token
If the approval has not been completed, gas estimation for the swap may fail.
Gas estimation can fail when a decentralized exchange transaction is expected to revert because the minimum acceptable output cannot be achieved.
For example, suppose you’re trying to swap:
1 ETH → Token X
and your transaction requires at least:
2,000 Token X
But current market conditions mean the swap would produce only:
1,950 Token X
The smart contract may revert because the minimum output requirement was not satisfied.
In that situation, increasing the gas limit does not solve the underlying problem.
You may need to review:
- Slippage tolerance
- Trade size
- Current liquidity
- Token price
- Price impact
- Transaction deadline
Incorrect transaction data can cause gas estimation to fail.
Examples include:
- Wrong contract address
- Wrong recipient
- Incorrect token amount
- Incorrect function parameters
- Invalid deadline
- Wrong chain ID
- Incorrect calldata
- Invalid nonce
- Incorrect transaction value
Smart contracts are deterministic. If the supplied parameters cause the contract to reject the transaction, gas estimation may fail during simulation.
Another common cause is interacting with a contract on the wrong blockchain network.
For example, you may have a token on:
Ethereum Mainnet
while your wallet is connected to:
Base
or another EVM-compatible network.
Although many EVM networks use similar wallet addresses and smart-contract interfaces, the blockchain state is different.
The contract or token may not exist at the expected address on the connected network.
Always verify:
- The network selected in your wallet
- The network supported by the dApp
- The contract address
- The token contract address
- The chain ID
Some smart contracts deliberately restrict who can interact with them or under what conditions.
For example, a contract could require:
require(msg.sender == owner)
If you’re not the owner, the transaction will revert.
Other restrictions might include:
- Only whitelisted addresses can interact
- Trading is paused
- Transfers are disabled
- Maximum transaction size
- Maximum wallet balance
- Trading has not been enabled
- Contract requires a specific role
- Transaction must come from an authorized address
A gas estimator cannot make a transaction succeed if the contract itself rejects it.
Some token and DeFi contracts include emergency pause mechanisms.
When a contract is paused, functions such as transfers, withdrawals, deposits, or swaps may revert.
If the contract is currently paused, changing your gas settings usually won’t help.
The relevant issue is the contract’s current state.
Many DeFi transactions include a deadline.
For example, a swap might contain a deadline that says:
Transaction must execute before 12:30 UTC.
If you try to submit it after that deadline, the contract may revert.
This can happen when:
- A transaction window expires
- A dApp remains open for a long time
- A transaction is prepared but signed later
- A stale transaction is retried
Refreshing the dApp and creating a new transaction can sometimes resolve the problem.
Gas estimation is performed through an Ethereum node using RPC infrastructure.
If the RPC provider is experiencing problems, the estimate may fail even when the transaction itself is otherwise valid.
Ethereum’s JSON-RPC documentation explains that eth_estimateGas depends on node-side execution to estimate the gas required for the transaction.
Potential RPC-related problems include:
- RPC outage
- Temporary network errors
- Stale blockchain state
- Rate limiting
- Provider-specific simulation behavior
- Node synchronization issues
If everything appears correct, switching RPC providers or retrying later can help determine whether the issue is infrastructure-related.
The gas limit is the maximum amount of gas the transaction is allowed to consume.
Ethereum documentation explains that more complicated smart-contract interactions generally require more gas than simple ETH transfers.
For example, a basic ETH transfer uses a standard amount of gas, while a complex DeFi transaction can require substantially more computation.
If the gas limit is too low, the transaction may run out of gas during execution.
However, there is an important distinction:
Gas estimation failure is not always caused by a gas limit that is too low.
If the transaction simulation itself reverts because of insufficient balance, missing approval, or another contract condition, simply increasing the gas limit will not necessarily fix it.
Some transactions involve substantial computation.
Examples include:
- Complex DeFi operations
- Large batch transactions
- Contract deployments
- NFT operations
- Complex swaps
- Multi-step contract interactions
Ethereum’s documentation explains that gas measures computational work and that more complicated smart-contract operations can consume more gas.
A complex transaction may therefore require a significantly higher gas limit than a simple ETH transfer.
Gas estimation is based on a simulation using blockchain state.
That state can change between the time the estimate is made and the time the transaction is actually submitted.
For example, a DeFi pool’s reserves can change because another transaction executes before yours.
This can change:
- Expected output
- Available liquidity
- Contract state
- Token balances
- Allowances
- Prices
- Other execution conditions
Ethereum’s JSON-RPC documentation also notes that gas estimates are estimates and can differ from the amount of gas ultimately used.
Some tokens do not behave exactly like a simple ERC-20 token.
Examples can include tokens with:
- Transfer taxes
- Blacklists
- Whitelists
- Anti-bot mechanisms
- Trading restrictions
- Maximum transaction limits
- Maximum wallet limits
- Custom transfer logic
These mechanisms can cause simulations to revert depending on the sender, recipient, amount, or current contract state.
If a token transaction suddenly starts producing gas estimation errors, checking the token’s contract behavior can be important.
No.
This is one of the most important distinctions.
A gas estimation failure usually means the node could not successfully simulate the transaction and produce a reliable estimate.
A high gas fee is a different issue.
Ethereum’s gas fee depends on the amount of gas used and the applicable gas price. Ethereum currently uses a base fee plus a priority fee for typical transactions.
You can therefore have:
Low gas fee + failed estimation
or:
High gas fee + successful estimation
They are not the same problem.
These errors are related but different.
Gas Estimation Failed
The transaction simulation fails or the node cannot provide a usable estimate.
Possible causes:
- Contract revert
- Invalid parameters
- Insufficient balance
- Missing approval
- Wrong network
- RPC problem
Out of Gas
The transaction actually begins execution but consumes the available gas before completing.
Ethereum explains that if a transaction runs out of gas during execution, the EVM reverts the state changes while the gas provided is consumed.
Therefore:
Estimation failure = problem detected before normal submission
Out of gas = transaction execution consumed its available gas
Try these steps in order.
Step 1: Check Your ETH Balance
Make sure your wallet has enough ETH to cover the network fee.
If you’re transferring an ERC-20 token, you generally still need ETH for gas when using a normal Ethereum account.
Step 2: Check Your Token Balance
Make sure you have enough of the token you’re attempting to transfer or swap.
Also check that you haven’t accidentally entered an amount larger than your available balance.
Step 3: Check Token Approval
If you’re interacting with a DEX or another smart contract, verify that the contract has sufficient allowance to spend your tokens.
You may need to approve the token first.
Step 4: Check Slippage
If you’re making a swap, review your slippage tolerance and expected output.
An excessively restrictive minimum-output condition can cause the transaction simulation to revert.
Step 5: Refresh the dApp
Close and reopen the application or refresh the page.
This can help if the dApp is using:
- Stale prices
- Expired deadlines
- Old transaction data
- Outdated blockchain state
Step 6: Verify the Network
Check that your wallet and the dApp are connected to the same network.
For example:
Ethereum Mainnet → Ethereum Mainnet
rather than accidentally using another EVM network.
Step 7: Check the Contract
If you’re interacting directly with a smart contract, verify:
- Contract address
- Function
- Parameters
- Transaction value
- Token address
- Network
- Sender address
A single incorrect parameter can cause the simulation to revert.
Step 8: Try Again Later
If the problem is caused by temporary RPC or dApp infrastructure issues, waiting and retrying can help.
You can also try another RPC provider or another supported wallet interface.
Step 9: Don’t Blindly Increase the Gas Limit
Increasing the gas limit is not a universal fix.
If the simulation fails because the contract says:
Insufficient balance
giving the transaction more gas does not create more tokens.
Likewise, if the contract rejects your address, increasing gas will not bypass the restriction.
First identify why the transaction is reverting.
Sometimes wallets allow advanced users to manually adjust the gas limit.
However, you should understand the difference between:
Gas limit
and
Gas price / fee settings.
The gas limit controls how much computation the transaction is allowed to consume.
The gas price parameters determine how much you are willing to pay per unit of gas.
Ethereum’s current fee structure includes the base fee and priority fee, while maxFeePerGas represents the maximum fee per gas you’re willing to pay.
Changing the fee does not automatically fix a transaction that would revert.
A wallet such as MetaMask may display a message such as:
“Unable to estimate gas”
when its underlying transaction simulation cannot produce a reliable estimate.
The exact reason can vary.
Common possibilities include:
- Contract execution would revert
- Insufficient ETH
- Insufficient token balance
- Missing approval
- Incorrect transaction parameters
- Slippage failure
- Contract restrictions
- RPC problems
The message is therefore a symptom rather than a complete diagnosis.
Look for the underlying error message or revert reason if the wallet or dApp provides one.
If a swap interface reports a gas estimation failure, the transaction simulation may be failing before the swap can be submitted.
Possible causes include:
- Insufficient token balance
- Insufficient allowance
- Slippage too low
- Insufficient liquidity
- Token transfer restrictions
- Expired quote
- Unsupported token behavior
- Network/RPC issue
If the problem occurs only with one particular token, investigate that token’s contract behavior.
If it happens with many unrelated transactions, the wallet, RPC provider, network connection, or account configuration may be more relevant.
A basic ETH transfer is relatively simple, so gas estimation failures for a normal ETH transfer can point toward issues such as:
- Incorrect recipient address
- Insufficient ETH balance
- Insufficient balance to cover both the amount and fee
- Incorrect transaction parameters
- RPC or wallet problems
- Network mismatch
Remember that you need enough ETH for both the amount you’re sending and the transaction fee.
For example, if you have exactly:
1.000 ETH
and try to send:
1.000 ETH
you still need additional ETH to pay the gas fee.
Having enough ETH does not guarantee that the transaction will succeed.
The ETH balance solves only one potential problem.
A smart-contract transaction could still fail because of:
- Token allowance
- Contract restrictions
- Slippage
- Incorrect calldata
- Invalid parameters
- Contract state
- Expired deadline
- RPC simulation problems
So if you have enough ETH and gas estimation still fails, investigate the transaction’s smart-contract conditions.
Potentially, yes, depending on why the estimation failed and what happens when the transaction is submitted.
However, you should not assume that a transaction will succeed simply because you can bypass the estimation warning.
If the underlying transaction would revert, submitting it can cause the transaction to fail and still consume gas.
Ethereum explicitly notes that gas is consumed for work performed even when a transaction ultimately fails during execution.
For this reason, blindly forcing a transaction through a gas-estimation error can be risky.
Yes.
eth_estimateGas provides an estimate rather than a guarantee of the exact gas that will ultimately be consumed. Ethereum’s JSON-RPC documentation explicitly notes that the estimate may be significantly different from actual gas usage because of factors including EVM mechanics and node performance.
Blockchain state can also change between simulation and execution.
Therefore, gas estimation should be treated as a prediction based on the transaction and state available to the node at the time of estimation.
Ethereum’s gas schedule can change as the protocol evolves.
For example, Ethereum’s 2026 Glamsterdam upgrade work includes gas repricing changes that can affect how some contracts and gas-estimation tools behave. The Ethereum Foundation has warned that wallets, RPC infrastructure, and node tooling need to account for updated gas rules to avoid underestimating gas.
This is particularly relevant for developers maintaining:
- Wallets
- RPC infrastructure
- Smart contracts
- Gas estimation systems
- DeFi applications
- Transaction tooling
For ordinary users, properly updated wallets and dApps should generally handle these protocol changes automatically.
If you see “Ethereum gas estimation failed,” check these items:
| Check | What to Look For |
|---|---|
| ETH balance | Enough ETH for the transaction and gas |
| Token balance | Enough tokens for the transfer or swap |
| Token approval | Sufficient allowance |
| Network | Correct Ethereum-compatible network |
| Contract | Correct address and function |
| Slippage | Reasonable minimum-output condition |
| Deadline | Transaction quote has not expired |
| Contract status | Not paused or restricted |
| RPC | Node/provider is working |
| Gas limit | Appropriate for the transaction |
| Transaction data | Correct parameters and calldata |
What does “gas estimation failed” mean on Ethereum?
It usually means the Ethereum node could not successfully simulate the transaction and provide a reliable gas estimate. The transaction may be expected to revert or there may be an issue with the request or RPC provider.
Does gas estimation failed mean I don’t have enough ETH?
Not necessarily. Insufficient ETH is one possible cause, but the error can also result from contract reverts, missing approvals, incorrect parameters, slippage, network problems, or RPC issues.
Will increasing the gas limit fix gas estimation?
Not necessarily. Increasing the gas limit can help when a valid transaction genuinely requires more gas, but it will not fix problems such as insufficient token balance, missing approval, invalid parameters, or a contract restriction.
MetaMask relies on blockchain infrastructure to simulate transactions. If the simulation indicates that the transaction may revert, or if the wallet/RPC infrastructure cannot produce a reliable estimate, MetaMask may display a gas estimation error.
Why does my Ethereum transaction revert during gas estimation?
The simulated transaction may be triggering a smart-contract condition that causes a revert. Common examples include insufficient balance, insufficient allowance, slippage limits, expired deadlines, or access restrictions.
Can I send a transaction after gas estimation fails?
Some wallets or applications may allow you to override the estimate, but doing so should be approached carefully. If the transaction would revert, you can still lose gas when the transaction executes.
Why does gas estimation fail for a token swap?
A swap can fail estimation because of insufficient token balance, insufficient allowance, slippage settings, insufficient liquidity, token restrictions, expired quotes, or other contract conditions.
Does a high gas fee cause gas estimation to fail?
Usually, no. Gas estimation and gas pricing are separate concepts. Estimation determines how much gas the transaction may require, while fee settings determine how much you are willing to pay per unit of gas.
Can RPC problems cause gas estimation failure?
Yes. Since eth_estimateGas is performed through an Ethereum node, RPC problems can prevent a wallet or dApp from receiving a usable estimate.
Does a failed gas estimate cost gas?
The estimation itself is a simulation and does not add the transaction to the blockchain. However, if you later submit a transaction that executes and fails, gas can still be consumed.
Ethereum gas estimation fails when the network cannot produce a reliable estimate for the transaction, often because the simulated transaction would revert.
The most common causes are:
- Smart contract would revert
- Insufficient ETH for gas
- Insufficient token balance
- Missing token approval
- Slippage or price conditions
- Incorrect transaction parameters
- Wrong network or contract
- Contract restrictions
- Expired transaction data
- RPC or node problems
- Incorrect gas limit
- Unusual smart-contract behavior
The most important troubleshooting rule is:
Don’t assume “gas estimation failed” means you simply need more gas.
First determine whether the transaction itself is valid. Check your balance, token approval, network, contract parameters, slippage, deadline, and any available revert reason. If those look correct, an RPC or dApp infrastructure problem may be responsible.
In simple terms:
Gas estimation is Ethereum’s attempt to simulate your transaction before you send it. If that simulation cannot complete successfully or reveals a likely failure, your wallet may show “gas estimation failed.”










