Execution cannot keep working after exhausting its permitted resources.
LET’S PICTURE IT
A machine with a metered work budget stops when the budget cannot cover its next operation.
SEE IT FOR YOURSELF
Calculate and split a manual execution feeStep 1 / 4
This example supplies twenty-one thousand gas used. It is a simple teaching input, not a live estimate of a contract call.
This example supplies twenty-one thousand gas used. It is a simple teaching input, not a live estimate of a contract call.With base ten Gwei, priority cap two and total cap twenty, the effective rate is twelve Gwei per gas.Twenty-one thousand times twelve Gwei gives two hundred fifty-two thousand Gwei, or 0.000252 ETH.The base-fee component is 0.00021 ETH and is burned. The priority component is 0.000042 ETH for the block fee recipient.
Animated local teaching model. No wallet, RPC or live blockchain data. Some labels and hashes are abbreviated for readability.
Resource accounting bounds execution
Gas prevents a transaction from demanding unlimited computation. An out-of-gas condition is an exceptional execution failure for the affected call context. The relevant state changes do not successfully persist through that failure.
Call boundaries still matter
A top-level failure and a failed nested call are different contexts. An outer contract can sometimes handle a failed inner call according to its logic. Do not infer the entire transaction’s outcome from one frame without a trace.
Increasing the limit fixes only some causes
A computation that needs more resources may succeed with an appropriate allowance, but missing permissions or a deliberately failing condition are not repaired merely by raising gas. The action and state must be understood.
Gas spent is still work
Failed execution can still consume gas and produce a fee. A wallet should distinguish an execution failure from a transaction rejected before inclusion. The revert decoder handles supplied error bytes, not every out-of-gas trace.