In this track: Execution traces and low-level calls
advanced · 4 MIN READ

Gas forwarding and the 63/64 rule

A requested gas amount is subject to forwarding rules.

LET’S PICTURE IT

A manager retains a reserve instead of handing every remaining resource to a subtask.

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.

Subtract the applicable call costs

Forwarding is calculated after relevant costs such as call overhead and memory expansion. The starting transaction gas limit is not the direct forwarding base.

Apply the cap carefully

Under the EIP-150 rule, the cap is the available amount minus its integer quotient by sixty-four. A request above that cap is limited rather than forwarded in full.

Keep value-transfer details separate

Value-bearing calls have additional rules, including a stipend context. A simplified fraction example is not a complete gas calculator for every CALL.

Do not infer post-call safety

Retaining some gas does not prove that later cleanup, decoding or return-data copying can complete. Analyze the work the caller still needs to perform.

Follow the execution

Simplified eligible gas after costs: 64,000
cap = 64,000 - floor(64,000 / 64)
cap = 63,000

Value-transfer details omitted.

A local conceptual trace with explicit assumptions; this is not a trace of a live transaction.

QUICK CHECK · NO PRESSURE

Is the cap computed directly from the original transaction gas limit?

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.