The explorer says “Failed,” but your balance went down. Separating what the contract tried to do from what the network charged helps explain where the difference went.

What work the network actually did

When a transaction is included in a block, the network executes its instructions. Gas measures that work: reading data, checking conditions, and executing contract operations. The gas limit sets how much work the transaction can consume. The effective fee is calculated using the units consumed and the effective price of each unit.

What gets undone when a contract fails

A contract can stop execution when a condition is not met. If that failure reverts the entire transaction, its state changes are undone. The work the network has already done still counts. An explicit revert normally leaves unused gas; if the transaction uses up its entire gas limit, none of that gas is left to be returned.

Hypothetical example: Ana tries to claim a digital ticket after the deadline has passed. The contract reads the date, checks the rule, and rejects the request. Ana does not receive the ticket, and the ticket counter does not change. Even so, the network performed the checks, and those operations consumed gas.

What to check in the explorer

The status indicates whether execution completed successfully. Gas used measures how much work was accounted for. The fee shows how much it cost. These fields answer different questions. If the transaction is still listed as pending and has not been included in a block, it does not yet have an on-chain execution result.

It is also worth distinguishing the gas limit from the maximum possible cost shown by the wallet. One is expressed in units of work, and the other in money. Comparing them as if they were the same figure can make a normal fee look like a duplicate charge.

On the mainnet, the fee is paid in $ETH even if execution ends in an error.

Sources: Binance Academy and official protocol documentation (“Gas and fees,” EIP-140).

Information compiled with the help of AI.

The author may receive rewards from Binance.

#Ethereum #blockchain