In this track: Gas and execution fees
intermediate · 3 MIN READ

Gas refunds and refund limits

A refund counter follows specific rules and is capped.

LET’S PICTURE IT

A recycling credit can reduce part of a bill under a policy. It is not a promise that any discarded item pays back the entire purchase.

SEE IT FOR YOURSELF
Calculate and split a manual execution feeStep 1 / 4
Calculate and split a manual execution feeGas used21,000A resource quantityGas used and gas limit are different quantitiesBase10 GweiEffective tip2 GweiTotal rate12 Gwei / gasAssumed total cap: 20 Gwei; no live prices are fetchedWork × rate21,000 × 12252,000 GweiExecution fee0.000252 ETHExact unit conversionThis calculation excludes blob and layer 2 data feesBase component0.00021 ETHBurned by protocolPriority component0.000042 ETHTo fee recipientComponents sum to the supplied 0.000252 ETH example

This example supplies twenty-one thousand gas used. It is a simple teaching input, not a live estimate of a contract call.

Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.

Refunds are protocol accounting

Particular state operations can affect a gas refund counter under the active rules. This differs from unused gas allowance and from an application sending a user an ETH refund.

Clearing storage is not unlimited reimbursement

The refund depends on the original and changed state and the governing EIPs. A transaction cannot assume every cleared slot creates a freely spendable gas token or unlimited negative cost.

The cap matters

EIP-3529 reduced refund allowances and limited the maximum refund relative to consumed gas. It also removed the old SELFDESTRUCT refund. Later protocol context should be checked before relying on historical examples.

Use the right source for exact metering

The manual fee calculator expects accounted gas used; it does not reconstruct refund counters from Solidity source. Detailed gas analysis needs the applicable execution rules and actual state transitions.

TURN UNDERSTANDING INTO PRACTICEOpen the Gas calculator →
QUICK CHECK · NO PRESSURE

Is a protocol gas refund the same as a shop sending ETH back to a customer?

Your progress stays in this browser.
Keep exploring the original referenceEthereum Improvement Proposals ↗

Original explanations by EtherTools. Examples are educational and source-linked; this site is independent of the Ethereum Foundation. Our approach.