EIP-7708: ETH transfers emit a log

One of the nice things about SELFDESTRUCT was that it cleaned up state. Changing it from clearing balance to leaving balance untouched in a probably-dead address removes that nice benefit.

If the only reason to change this behavior is just to avoid creating a burn event then I feel like we would be better off not adding this complexity and instead just not including a burn event. ETH is still functionally being burned here in almost all cases (except the even more exotic CREATE2->SELFDESTRUCT->CREATE2 you mentioned), just as it is when someone sends to 0 address. We would just be adding complexity in order to be “technically correct” without meaningfully changing anything.

There is also concern that someone has a contract out there that uses CREATE2 and SELFDESTRUCT and depends on the ETH being cleared during this operation, and by not clearing the ETH we break the contract. For example, they may re-use addresses for usability reasons and burn ETH as a way to punish some behavior, but if we leave the ETH in the account then the ETH may become recoverable by an actor that should be punished.

Personally, I go the other direction and prefer to account for any burns we reasonably can, even if they are “technically incorrect”. For example, I would include transfer to 0 or any of the precomile addresses in burns if it were me. Also to 0xdead... and other similar constructed addresses like 0xcafebabe... and the like.

2 Likes

The report “SELFDESTRUCT Burn Events on Ethereum Mainnet” moved to EIP Proposal: Remove SELFDESTRUCT Burn - #2 by chfast.

2 Likes

The current version of the EIP does not have a note regarding any gas changes. Now the ETH transfers affected also emit a log like the LOG3 opcode which currently (Osaka) costs 1500 gas and 8 gas per log byte, so a 1 eth transfer would emit 8 bytes of data. In Osaka this costs 1564 gas for this LOG3 opcode. Since we ship this EIP together with EIP-8038 we do not know the proposed gas costs of CALL with value, but seeing that a CALL with value currently costs 6700 gas, this would mean that the extra log emitted already eats in ~23% of that 6700 gas.

I would like to see in the Rationale the reasoning why or why not gas changes for these logs were done.