TROUBLESHOOTING · ETHEREUM
Failed Ethereum transaction: why did I pay gas?
After this lesson: Understand what failed and why some work may still be charged.
01 / BEGINNER
First, what is it?
On Ethereum, a transaction can be included in a block but fail during execution. The call’s intended changes are then rolled back while gas has been consumed. This differs from a request rejected before being sent to the network.
Words to know
- Execution failure
- Program rules or resource limits prevent completion.
- Revert
- An interruption rolling back execution state changes.
- Consumed fee
- The cost of charged work, even if the objective was not achieved.
The idea to understand
Check the receipt on the correct network. Distinguish local rejection, pending status and included failure before investigating the cause. An interface screenshot is not always enough.
SEE IT IN PRACTICE
Now, a concrete example
A fictional swap requires at least 10 units received. At execution it would yield 9.8: the contract may revert to enforce the limit. The amount protection works, but executed work can still cost gas.
YOUR TURN
Does a charged failure prove the recipient received the sent amount?
Form an answer before opening the explanation. You can also discuss it aloud.
Compare with the explanation
No. Fees and the intended effect are separate. Check the receipt and actual changes; a fee debit alone does not establish receipt.
02 / INTERMEDIATE
How it works, and why
Check the receipt on the correct network. Distinguish local rejection, pending status and included failure before investigating the cause. An interface screenshot is not always enough.
An unmet contract condition, changed price or insufficient gas limit can cause failure. Raising fee amounts does not fix a contract condition that remains false.
The swap did not happen, yet your ETH balance went down. Start with the transaction’s status in the correct network explorer. An application’s “error” message alone does not tell you what was charged.
Read a failed transaction receipt
Our fictional receipt shows 53,000 gas units used at an effective price of 12 gwei. The calculation is 53,000 × 12 × 10⁻⁹ = 0.000636 ETH. At a teaching assumption of €3,000 per ETH, that is €1.91. These are not current market figures.
On Ethereum L1, the receipt distinguishes gas used from the permitted gas limit. The limit is not automatically the amount spent. An out-of-gas error can, however, consume the entire execution limit. On a layer 2, displayed fees can include other components.
Why did the action fail?
The cause depends on the contract: an expired deadline, an unmet condition, an output minimum not met or an insufficient execution limit. Look for the exact error in the receipt and the application’s official documentation. Raising the gas price does not fix a rejected contract condition.
A multi-step purchase can have a successful approval receipt and a failed swap receipt. The failed swap does not necessarily remove the previously confirmed approval. Check the operations separately.
Before trying again
Keep the hash and error message. Check the network, available balance for fees and the action’s conditions. Retrying without understanding can repeat the same cost. A still-pending operation requires a different approach, explained in our dedicated guide.
- Do not confuse gas price, gas quantity and the amount sent.
- Do not blindly increase slippage tolerance to make an error disappear.
- An ordinary on-chain failure does not create an automatic network-fee refund.
03 / ADVANCED
The rules behind the interface
An Ethereum receipt exposes status and gasUsed. On a failed transaction, execution effects are rolled back, but the sender’s nonce is consumed and fees remain due. A local operation without inclusion does not produce that receipt.
A revert may provide a useful reason; running out of gas follows different rules. A failed internal call can also be handled by a parent contract: inspect the overall receipt and application logic.
YOUR TURN
A contract rejects the sender for lacking a required role. Is doubling the priority fee enough?
Form an answer before opening the explanation. You can also discuss it aloud.
Compare with the explanation
No. Priority concerns inclusion; it does not grant missing authorisation. Understand the rejected condition before retrying.
Use the official sources at the end of this page to inspect these mechanisms further.
What does the explorer show?
Choose a status to understand what it means, then read the fictional example. This exercise does not look up a transaction or connect to your wallet.
The transaction was included, but execution failed. Read its receipt: consumed gas can still be charged. Identify the error before trying again.
- Status
- Reverted
- Gas used
- 53 000
- Effective gas price
- 12 gwei
- Network cost
- 0.000636 ETH
53,000 × 12 gwei = 636,000 gwei = 0.000636 ETH. One gwei equals 0.000000001 ETH. The gas actually consumed is charged even if the intended action is reverted; rejecting a request before broadcast is a different case.
A useful companion: How to read an Etherscan transaction: a simple guide
THE SHORT ANSWER
An Ethereum transaction included in a block can fail after consuming computation. Its action is reverted, but consumed gas is still charged. Rejecting a request in your wallet before broadcast is different: that attempt never ran on-chain.
The questions that remain
Are transferred tokens lost in a revert?
In an ordinary EVM transaction that reverts, execution changes are undone, but fees remain payable. An earlier approval or another transaction is separate. Check the receipt and balances rather than relying only on the interface message.
Does clicking “Reject” cost gas?
Rejecting a request before broadcast does not execute that request on the network. Check whether another step had already been signed and sent, though.
Sources and further reading
- Ethereum.org — Gas and fees · in English
- Ethereum.org — Transactions · in English
- MetaMask — Failed smart contract transactions · in English
Page updated on
Documentation checked on · WhyTheBlockchain · Editorial approach