All posts
Out of gas is the limit you set, not your ETHreverted heregas usedgas limitETH balance: 2.41plenty, this is not the problemGas limit: set too lowraise it in advanced settings and retry

What does 'out of gas' mean in crypto? Why transactions fail and how to fix it

Out of gas is one of the most misunderstood transaction errors in crypto. It does not mean your wallet ran out of ETH. Here is what causes it, how to fix it, and how to tell when it is hiding a different problem.

by @Non_Fungible_Howard5 July 20266 min read

Out of gas is one of the most misunderstood transaction errors in crypto. It does not mean your wallet ran out of ETH. It means the transaction used more computational resources than the gas limit allowed before the smart contract could finish execution.

Here is what causes it, how to fix it, and how to tell when 'out of gas' is hiding a different problem.

The short answer

An 'out of gas' error usually means the gas limit was too low for the transaction to complete. The fix is usually to retry with a higher gas limit, not to add more ETH. However, some failed transactions are incorrectly diagnosed as 'out of gas' when the real issue is a contract revert. The only way to know what happened is to inspect the transaction execution itself. This is exactly the type of problem TxID is built to diagnose: understanding what happened on-chain, explaining why, and showing the fix.

Gas limit: the compute you authorised for this transactionran out here, revertedgas usedgas limitSet too low?raise the limit and retryNot your ETH balanceyou can have plenty and still run out
Out of gas is about the gas limit you set, the compute ceiling for the transaction, not the amount of ETH in your wallet.

Gas limit vs gas price vs ETH balance

Three different things get mixed together whenever people talk about gas. Keeping them separate is the key to understanding this error.

Gas limit

The gas limit is the maximum amount of computation you allow your transaction to use. If the transaction needs more gas than the limit provides, execution stops and the transaction fails with an out-of-gas error.

This is the setting that matters when you see 'out of gas'.

Gas price (or gas fee)

The gas price is how much you pay per unit of gas. It affects:

  • How much the transaction costs
  • How quickly it may be included by validators

It does not determine whether your transaction has enough computation available. Increasing the gas price will not fix an out-of-gas failure.

ETH balance

Your ETH balance is what you use to pay the transaction fee. You need enough ETH to cover the cost of the transaction, but having plenty of ETH does not prevent an out-of-gas error.

A wallet with 10 ETH can still fail with 'out of gas' if the transaction's gas limit is too low.

A simple analogy

Think of the gas limit as the size of a fuel tank you provide for a journey. The gas price is the cost of the fuel. Running out of gas means the tank you allowed was too small, not that you could not afford the fuel.

Increasing the tank size does not mean you automatically spend more. You only pay for the fuel actually used.

Why does it happen?

Wallets estimate gas automatically before you sign a transaction. Most of the time, the estimate is accurate. It can fail in a few predictable situations.

The transaction is more complex than expected

Some transactions require more computation than a wallet can accurately estimate. Examples:

  • A swap routing through multiple liquidity pools
  • A claim involving many positions
  • A contract interaction with multiple internal calls

The blockchain state changed

Gas estimation happens before your transaction is executed. Between signing and confirmation, the state of the contract may change. For example:

  • A liquidity pool changes
  • Another user interacts with the same contract
  • A position changes state

The actual execution may require more gas than the original estimate.

The gas limit was manually lowered

Some wallets allow advanced users to edit gas settings. If the limit is reduced below what the transaction requires, execution will stop before completion.

The transaction failed late during execution

Sometimes a contract begins execution normally but fails near the end. The transaction may consume most of the available gas before reverting, creating an error that looks like an out-of-gas failure.

In these cases, increasing the gas limit will not solve the real problem. The transaction is failing for another reason.

How to fix an out-of-gas error

1. Retry the transaction

Start by resubmitting the transaction and allowing your wallet to estimate gas again. A fresh estimate may succeed if the previous attempt was based on outdated blockchain state.

2. Increase the gas limit

If the transaction fails again, open your wallet's advanced gas settings and increase the gas limit. A common approach is increasing it by around 20 to 50% above the previous estimate.

Remember: a higher gas limit does not mean you automatically pay more. You only pay for the gas actually consumed if the transaction succeeds.

3. Do not increase the gas price

This is one of the most common mistakes. Increasing the gas price may make a transaction process faster, but it does not give the transaction more computational capacity. It will not fix an out-of-gas failure.

4. Check whether it is actually a different error

If increasing the gas limit still fails, the transaction may not have been out of gas at all. The real issue could be:

  • A failed contract condition
  • A custom contract error
  • Insufficient balance
  • Slippage protection
  • Expired transaction parameters

At that point, you need the actual revert reason.

How to confirm it was really out of gas

The easiest way is to inspect the transaction on a block explorer, and compare the gas used against the gas limit.

If the transaction consumed almost all of the available gas, it likely genuinely ran out of gas.

If it used only part of the limit and still failed, it probably did not run out of gas. Instead, the contract rejected the transaction for another reason. Common examples include:

  • Failed require() checks
  • Custom contract errors
  • Slippage limits being exceeded
  • Invalid transaction parameters

Get the answer instantly

Instead of guessing from a wallet error message, TxID analyses what actually happened. Paste your transaction details at txid.support/check and TxID identifies whether the transaction truly ran out of gas, the actual revert reason, whether funds moved, and the recommended fix in plain English. No wallet connection required.

Once you separate gas limit from ETH balance, 'out of gas' stops being mysterious. In many cases, the fix is simple: increase the gas limit and retry.

But when that does not work, the transaction is telling you something else went wrong, and the next step is not adding more gas. It is understanding the real reason the blockchain rejected it.


Ready to move support in-app?

TxID gives your protocol an AI support agent that already knows what your users' wallets did, embedded in your app, not Discord.

Evaluate it: 150 conversations a month