Ether scan

Ether scan reveals the gas cost of a reverted transfer

Ether scan searches can identify the gas charge left by a reverted Ethereum transfer. For an included transaction with a failed receipt, multiply gas used by the effective gas price. That calculation gives the execution fee, separate from the amount the sender attempted to transfer. A top-level revert undoes the transfer, while the sender still pays for processing. Use the recorded transaction values rather than a wallet estimate or a current gas quote.

Last updated:

A reverted transfer leaves a gas charge you can reconcile from the receipt without counting the attempted payment as money spent.

A failed receipt versus an unconfirmed submission

A failed transaction receipt establishes an executed attempt with a gas charge; a pending record has no settled execution fee. This distinction determines whether there is a cost to reconcile yet. A wallet warning alone does not establish that Ethereum included the transaction. An error during preparation can occur before submission, whereas a recorded execution failure belongs to an included transaction.

On Etherscan, the transaction status and block information provide the starting evidence. Confirm that the hash belongs to the attempted transfer on Ethereum. Keep the investigation on that hash: a later retry has its own record and can incur its own fee.

The fields behind the failed attempt

The transaction hash connects the submitted instruction to its receipt, including the gas quantity needed for the calculation. Record the sender, destination, intended amount, and block alongside the fee fields. The destination can be a contract handling a transfer, so it does not always identify the intended recipient. Input data can describe the requested operation and its recipient separately.

The fields behind the failed attempt: The transaction hash connects the submitted instruction to its receipt, including the gas quantity needed for the calculation.; Record the sender, destination, intended amount, and block alongside the fee fields.; The destination can be a contract handling a transfer, so it does not always identify the intended recipient.; Input data can describe the requested operation and its recipient separately.

Open full-size image

Keep gas used and gas price with their units. Gas used measures a quantity of gas; the effective gas price gives the charge per unit. The transaction fee combines them. Copying only a monetary total loses the distinction between expensive execution and an expensive price per unit, which matters when comparing the failed attempt with another transaction.

Did the recipient receive the transfer amount?

A top-level revert undoes the attempted transfer, so the recipient does not retain the ETH sent through that failed execution. The transaction can still display a nonzero value because that field records the submitted instruction. It does not certify payment.

A reverted token transfer follows the same rollback principle for changes inside the reverted execution. Its token quantity and its ETH gas charge are separate amounts with different units. Neither the visible requested value nor an attempted movement in a trace should enter the calculation as an additional gas cost.

How do I calculate the fee in ETH?

The execution fee in ETH equals gas used multiplied by the effective gas price expressed in ETH per gas.

If the price is in gwei, use fee in ETH = gas used × effective gas price in gwei ÷ 10^9. The divisor converts gwei to ETH; it does not change the gas quantity.

When the price is in wei, use fee in ETH = gas used × effective gas price in wei ÷ 10^18. Preserve the original precision through multiplication, then format the final ETH amount. Rounding the price first can produce a small difference from the displayed transaction fee, even when the underlying records agree.

This formula measures execution gas. Specialized transactions can have additional fee components, and other networks can use different accounting. For the ordinary Ethereum transfer under inspection, the calculated amount should reconcile with its execution fee. Do not insert the transfer value into the multiplication.

Gas used and unused allowance

The gas limit caps the gas available to the transaction; gas used records the quantity charged after execution. Multiplying the limit by the price calculates a different figure from the settled fee whenever execution uses less gas. The unused allowance does not represent a second payment the recipient must return.

A normally executed REVERT instruction stops execution without consuming all remaining gas. Gas already spent remains chargeable. An out-of-gas failure can exhaust the gas available to the failing execution instead. The receipt supplies the quantity for accounting, so a failure label alone does not justify substituting the full transaction limit for gas used.

Effective price and the maximum fee

The effective gas price records what each unit actually cost, while the maximum fee per gas limits the sender’s permitted price. For an EIP-1559 transaction, the effective price combines the block’s base fee with the actual priority fee. The maximum fee can constrain that priority component.

The relationship is effective price = base fee + min(maximum priority fee, maximum fee − base fee). All terms must use the same price unit. This applies to an eligible, included EIP-1559 transaction; it is not a calculation for a transaction whose maximum fee cannot cover the block’s base fee.

Use the recorded effective price for reconciliation. Adding the base fee or priority fee again would count part of the cost twice.

Will a higher gas limit fix the revert?

A higher gas limit helps only when insufficient available gas causes the failure and execution can otherwise complete. A contract can reject a transfer because its conditions fail even when gas remains. Increasing the allowance does not change those conditions, and increasing the price per gas does not purchase permission to bypass them.

The failure reason and execution trace can distinguish an exhausted allowance from a contract rejection. Gas usage near the limit is a clue, not a complete diagnosis. An internal call can also exhaust its own allocation without exhausting every unit available to the outer transaction. Identify the failing operation before treating the limit as the cause.

A balance change larger than the recorded fee

A wallet balance difference can include activity outside the failed transaction, so it is not automatically the gas bill. For an ordinary sender with no other balance-changing activity in the comparison interval, a reverted transfer leaves the fee as its ETH debit. A wider interval can include other transfers and transaction charges.

Reconcile like units and matching records first. Compare ETH with ETH, keeping any token amount separate. A fiat display introduces a valuation as well as an on-chain quantity. If the multiplication disagrees with the explorer’s fee, inspect the copied units and precision before blaming another transaction. If the fee agrees but the wallet balance does not, examine the surrounding account activity.

A retry decision after the fee reconciles

Before retrying a transfer that exhausted its gas allowance, preserve the failed hash, its fee, and the intended recipient. A higher limit permits more execution and increases the maximum gas exposure at an unchanged price. Preparation remains reversible while the revised transaction stays unsigned and unbroadcast. Once a signed transaction reaches the network, stopping inclusion is no longer assured.

A successful retry does not erase the earlier fee. A further failure requires a separate receipt and charge; it does not extend the old transaction. If the new record shows execution success without evidence of the intended payment, the payment remains unverified.

Receipt fields for a reproducible fee record

The raw receipt preserves the inputs behind a displayed total. Its gasUsed field holds the transaction’s gas quantity, and effectiveGasPrice holds the price in wei. JSON-RPC represents these quantities in hexadecimal, so convert their numeric values before calculating with decimal units.

Store the hash and block identity with those fields to keep the fee tied to the correct execution. Retain the exact integer product in wei when a rounded ETH display creates ambiguity. The unit conversion remains fixed: 1 ETH equals 10^18 wei.

Ether scan: frequently asked questions

Which gas field should I use when the receipt includes cumulativeGasUsed?

Use gasUsed to calculate the individual transaction’s execution fee. The cumulativeGasUsed field includes gas consumed by preceding transactions in the same block as well as this transaction. If earlier transactions consumed gas in the block, multiplying that cumulative quantity by your effective gas price would attribute their gas consumption to your transfer.

Why does a failed receipt sometimes have no readable revert reason?

A failed receipt does not require a readable explanation from the contract. A revert can return empty data, and other execution failures may provide no descriptive message. The explorer may need execution tracing and suitable decoding information to explain the failure beyond its recorded status.

Can a transaction succeed when an internal transfer reverts?

An outer transaction can succeed if the calling contract handles an internal failure and continues execution. In that case, the failed internal transfer does not establish that the whole transaction reverted. The receipt’s gas charge covers the outer transaction, including work spent on its unsuccessful internal call.

Does a failed gas estimate charge the same fee as an included revert?

A gas estimate does not submit a transaction to the blockchain and does not itself incur an on-chain transaction fee. An included transaction that later reverts is different: execution has occurred and gas is payable. A preparation error therefore needs no fee calculation unless a separate submission actually reached a block.

Is an earlier token approval reversed when the later transfer fails?

A later reverted transfer does not undo an approval completed in a separate successful transaction. The approval has its own state change and gas charge. Keep that earlier charge separate when accounting for the failed transfer, and inspect the current allowance if the remaining spending permission matters.