A reverted Ethereum transaction can still cost gas

Explainer7 min read

Why can a failed Ethereum transaction cost gas? Separate rejection, pending, REVERT and out-of-gas, then reconcile a fictional failed receipt and its fee.

Fictional Ethereum execution comic: Brokzi pulls an intended transfer back from a rejected contract action while a separate gas-work receipt remains. A revert rolls back execution changes, not the gas already accounted for; this is not a real transaction or refund service.
AI-assisted editorial illustration · Brokzi
On this page

The transfer failed, but the ETH balance is lower. That can be consistent with an included Ethereum transaction whose contract execution reverted: the requested action did not persist, while processing it still consumed paid gas.

For readers checking a failed Ethereum transaction gas fee, this explainer separates execution failure from requests that never reached a block. It covers ordinary EIP-1559 type-2 transactions from a non-delegated account on Ethereum mainnet. It does not calculate Layer 2 data charges, blob fees, sponsored smart-account operations or EIP-7702 authorization effects.

First establish whether anything was included

A wallet's word "failed" is not a complete diagnosis. The Ethereum transaction lifecycle separates preparing, signing, broadcasting and inclusion. A local error can occur before the network has any transaction to execute.

SituationWhat it establishesGas-fee conclusion for this attempt
User rejects the signature; nothing is submittedThe local request did not become an included transactionNo onchain execution fee from that unsubmitted request
Preflight estimation rejects the proposed callA check failed; submission is not establishedThe error alone is not evidence of an included gas charge
A node or wallet reports pendingInclusion has not been shown in that viewThere is no included-transaction receipt yet
A block contains the transaction with receipt status 0Top-level execution failedRead the actual gas used and effective price

Ethereum's JSON-RPC documentation says pending transactions do not have receipts. It also distinguishes a missing lookup from an included result. A null receipt or one explorer's "not found" message does not prove that a previously broadcast transaction can never be included.

For unresolved submissions, use our pending-transaction diagnosis. The task here starts with an included failure, not another press of Send.

A revert rolls back the action, not the entire transaction record

EIP-140 defines REVERT: execution stops, its state changes roll back, and the caller can receive error data. For a top-level revert, the attempted ETH value transfer and execution writes do not persist. Logs from that reverted execution are discarded too.

Gas accounting is outside that rollback. So is the ordinary sender's consumed transaction nonce. The Osaka execution specification increments the sender nonce before the call, then settles gas accounting and records the execution result afterward. An unsuccessful contract action is still an included transaction occupying that sequence position.

A displayed Value field describes the submitted transaction; it does not override the execution result. Reading an attempted value beside status 0 as a completed payment would combine two different facts. Our nonce explainer covers the account sequence without treating it as a count of successful payments.

REVERT and out-of-gas are different failure paths

A normal REVERT does not automatically consume all remaining gas. It can stop after earlier checks have used only part of the allowance. EIP-140 also specifies an exception: if there is insufficient gas to execute the revert itself, it behaves as an out-of-gas failure.

An out-of-gas exception exhausts the gas available to the failing execution frame. A frame is one contract call's execution context. At the outermost level, exhausting the remaining execution allowance can consume the transaction's full gas budget. A child call, however, need not receive that whole budget: EIP-150 defines limits on gas forwarded into calls.

A caller can handle a child call's failure and continue. In that case, the child changes can be rolled back while other outer-call changes persist. An error in a trace is therefore not automatically failure of the whole transaction. The receipt's top-level status, specified by EIP-658, is a separate observation.

Status 0 alone does not identify the precise failure reason. Nor does using the whole gas limit, by itself, prove which instruction failed. Read available execution details instead of treating every error as "increase gas."

A fictional failed receipt, reconciled

Assume a valid type-2 call attempts to send 0.4 ETH to a contract, then reverts at top level. All figures below are invented. Assume no other account activity and no additional service charges; this is not an observed transaction or fee recommendation.

FieldAssumed value
Transaction gas limit80,000 gas
Maximum fee per gas35 gwei
Maximum priority fee per gas2 gwei
Block base fee20 gwei per gas
Receipt status0, top-level failure
Receipt gas used45,000 gas, assumed after applicable accounting

Under EIP-1559, the effective tip is limited by the space left under the maximum fee. Here, min(2, 35 − 20) = 2 gwei, giving an effective gas price of 22 gwei per gas.

The execution fee is 45,000 × 22 = 990,000 gwei, or 0.00099 ETH. The attempted 0.4-ETH transfer does not persist in this top-level-revert example. With the stated exclusions, the sender's net ETH decrease is the 0.00099-ETH execution fee, not 0.40099 ETH.

The receipt accounts for 45,000 of the 80,000-gas allowance, leaving 35,000 gas unused in this example. It does not charge 80,000 simply because the result says failed. We assume the receipt values; we have not simulated a contract to produce them.

Unused gas is not a refund you need to claim

Ethereum's gas documentation explains the distinction between allowance and usage. Unused gas is handled in transaction settlement. It is not a refund you need to claim by connecting a wallet to a recovery site, signing another message or sending another payment.

Unused allowance and execution refunds are also different accounting concepts. The EIP-7623 calldata floor and the execution specification show why final accounted gas is not merely a count of visible contract steps. The worked example starts from an assumed final gasUsed, with applicable accounting already included.

For an included transaction in this scope, reconcile the individual receipt's gasUsed × effectiveGasPrice. Do not substitute the gas limit, maximum fee cap or block-wide cumulativeGasUsed. The gas-limit versus gas-price guide explains those fields in detail.

Why a protection check can fail and still cost gas

A contract can reject an unacceptable result after it has already done work. A correctly enforced swap-output bound, for example, can stop execution from accepting too few tokens. That does not make the unsuccessful execution free.

Our slippage and minimum-output explainer owns the quote and bound calculations. Here, the distinction is between preserving that execution condition and paying for the attempt. A failed call is not an instruction to weaken the bound, and a higher gas allowance cannot repair every contract condition.

What to keep before contacting support

Record the network, complete transaction hash, containing block, receipt status, individual gas used and effective unit price. Keep the attempted ETH value separate from the resulting transfers. Add the available failure reason without presenting a decoded message as proof of every underlying cause.

If inclusion is unresolved, return to the pending guide rather than assuming a free retry. If the record shows a top-level revert, distinguish the rolled-back action from the charged execution. Public transaction reading needs neither recovery words nor a refund signature.

Sources

Primary documentation checked October 22, 2026, Asia/Tbilisi. These are protocol explanations, not a diagnosis of a real account, contract audit, recovery offer or refund guarantee. No wallet connection, RPC call, signature, simulation or transaction was performed. Historical EIP creation dates are not new event dates; the named Osaka specification is an implementation reference, not a live chain-state measurement.

See something wrong? Brokzi logs material changes. Prepare a correction note.

About the byline

Brokzi Editorial

The accountable byline for Brokzi’s explainers, definitions, news notes, and corrections.

Editorial responsibility →