EIP-8358 · Draft · Core · 2026-07-26
EIP-8358: Net Gas Metering for Account Changes
Prices ETH transfers inside a transaction like net-metered storage: each account pays the balance-write charge once, later changes are cheaper, and an account that ends where it started earns a refund.
What problem does it solve?
A CALL that sends ETH currently costs a flat amount every time (CALL_VALUE, effectively 9,000 gas under EIP-8038 once the unused 2,300 stipend is returned). That charge mostly pays for writing the changed account to the state trie. But each account is written only once per block, however many times its balance changes.
Storage slots already get net gas metering (EIP-2200): the first change pays the write cost, later changes are cheap, and restoring the original value earns a refund. Native ETH has no such rule, so an ERC-20 balance in storage is metered more accurately than ether itself. Routers that forward msg.value, contracts that refund excess ETH, and batch payouts (including EIP-7702 wallets) all pay for state writes that never happen.
How it works
- Original state. Each account's original balance and nonce are taken at the start of execution (after gas debit, sender nonce bump and the transaction's own value transfer). An account is clean if its balance and nonce still match, dirty otherwise.
- New price for a value-bearing
CALL/CALLCODE:CALL_VALUE_BASE_GAS = 4000always (it covers the stipend and the EIP-7708 transfer log);+ 2500for each of sender and recipient that is still clean;+ 0for accounts already dirty. Two clean accounts → 9,000 gas, the same as today.
- Refund. If a transfer brings an account back to its original balance and its nonce is unchanged, 2,500 gas is added to the refund counter (subject to the usual EIP-3529 cap).
- Stipend becomes a floor. The callee gets
max(gasLimit, 2300)instead ofgasLimit + 2300.transfer/sendstill give the callee 2,300 gas, but extra stipend gas is no longer returned to the caller. - Nonce changes (from
CREATE,CREATE2or a 7702 authorization) make an account dirty, so it cannot collect a reset refund.
Sample code
Gas for the value-transfer component, from the spec's test table:
Scenario Charged Refund Net Before
A→B x 9000 0 9000 9000
A→B x; A→B x 13000 0 13000 18000
A→B x; B→C x 15500 2500 13000 18000
A→B x; B→A x 13000 5000 8000 18000 (round trip)
A→A x (self-transfer) 4000 0 4000 9000
A pattern that becomes cheaper: a router that forwards ETH it just received.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
contract Forwarder {
function forward(address payable to) external payable {
// Router's balance goes +v then -v within the tx:
// the second hop pays 4000 base + 2500 for `to` (if clean),
// nothing for the router, and the router earns a 2500 refund.
(bool ok, ) = to.call{value: msg.value}("");
require(ok);
}
}
Things to know
- Status: Draft. It requires a hard fork and builds on other drafts, including EIP-8038 and EIP-2780, so the numbers may change.
- A value transfer never costs more than today's effective 9,000 gas, but a callee given an explicit gas limit now receives up to 2,300 less gas, and code measuring
gasleft()around value calls may see different values. - Gas estimation becomes order-dependent, like warm/cold access: a transfer's cost depends on earlier balance changes in the same transaction.
- The base (4,000) is kept above the stipend (2,300) on purpose, so stipend gas can never fund another value call and transfer logs never become cheaper than plain
LOGopcodes.