EIPs Explained

EIP-7973 · Draft · Core · 2025-06-14

EIP-7973: Warm Account Write Metering

Makes repeated writes to the same account within a transaction cheaper after the first one, since the state root is only recomputed once, putting native ETH transfers on a par with token transfers.

What problem does it solve?

Updating the state trie is one of the most expensive parts of processing a block. For storage, Ethereum already recognises that the second write to a slot in the same transaction is cheaper than the first (EIP-2200 net metering). For the account itself (its nonce, balance or code hash), every write costs the same.

That creates odd incentives. Sending WETH to the same account several times in one transaction gets cheaper per transfer, but sending native ETH does not. This penalises native ETH and any future opcodes that move value. In reality, all writes to one account in a transaction can be batched into a single trie update, so later writes cost the node far less than the first.

How it works

The old parameters GAS_CALL_VALUE and GAS_STORAGE_UPDATE are removed and replaced by three new ones (values still TBD):

Parameter Meaning
GAS_COLD_ACCOUNT_WRITE First update to an account in this transaction (account trie)
GAS_COLD_STORAGE_WRITE First update to a storage slot (storage trie)
GAS_WARM_WRITE Any later write that does not trigger a new root calculation

Value-moving calls and creation (CALL family, CREATE, CREATE2): instead of the flat GAS_CALL_VALUE, charge GAS_COLD_ACCOUNT_WRITE if the account still equals its value at the start of the transaction, otherwise GAS_WARM_WRITE.

SSTORE is split into two parts: the cost of touching the account tuple (cold or warm, as above) plus the slot-specific cost. A storage write makes the account dirty, so a second SSTORE to the same contract pays only the warm account part. Refund logic is adjusted to match, including refunding the cold account write if a slot is restored to its original value while the account was otherwise clean.

For compatibility with Block-Level Access Lists (EIP-7928) and parallel execution, the "original" account values can be taken from the BAL entry of an earlier transaction in the same block.

Sample code

The account-write part of the charge, simplified from the spec's pseudocode:

def account_write_cost(state, address) -> int:
    original = get_account_original(state, address)  # value at tx start
    current = get_account(state, address)
    if current != original:
        return GAS_WARM_WRITE          # already dirtied in this tx
    return GAS_COLD_ACCOUNT_WRITE      # first write: pays for the trie update

Effect on a contract paying out ETH in a loop (Solidity):

// Under this EIP, paying the same recipient several times in one tx
// costs the cold account write once, then the warm write for the rest.
for (uint256 i = 0; i < n; i++) {
    (bool ok, ) = recipient.call{value: amount}("");
    require(ok);
}

Things to know

  • Status: Draft. All three new gas values are TBD pending stateful benchmarks, so no actual savings can be quoted yet.
  • This is a backwards-incompatible repricing and needs a network upgrade.
  • Wallets and nodes must update eth_estimateGas; the spec warns that stale estimates could cause problems.
  • Net metering for accounts (a refund when an account ends the transaction unchanged) was considered and left out for simplicity.
  • The authors note that cheaper account writes might open new attack vectors and call for more analysis.

#gas #repricing #state #sstore #core

Details

Authors
Charles Cooper (@charles-cooper), Maria Silva (@misilva73), Ben Adams (@benaadams)
Status
Draft
Type
Standards Track / Core
Created
2025-06-14
Requires
Required by

Machine-readable: Markdown · JSON