This proposal introduces a BURN
opcode to the EVM. When called, the opcode is to burn native ether at the address of the current evm context.
The motivation for this proposal is to provide a standardized and efficient way to burn native ether directly within the EVM. Historically, contracts such as the BeaconDepositContract have "burned" ether by making it irrecoverable from the given address. This approach can lead to confusion and potential misuse. By introducing a dedicated BURN
opcode, we can ensure a clear and consistent method for burning native ether. This could become useful for Ethereum L2s when transferring ether back to the L1, as well as other EVM L1 chains that could leverage this for their cryptoeconomics.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
The BURN
opcode (0xFC)
is introduced with the following behavior:
uint256
amount of native ether to be burned.MUST
revert.MUST NOT
revert.When BURN
is used in the context of a DELEGATECALL or CALLCODE, the contract whose balance is to be manipulated is the contract that issued the DELEGATECALL or CALLCODE instruction.
When BURN
is used in the context of a STATICCALL the call MUST
revert.
The base gas cost for the BURN
opcode is 100 gas. The dynamic gas cost is determined as follows:
The total gas cost for the BURN
opcode is the sum of the base gas cost and the dynamic gas cost.
Example pseudocode for the BURN
opcode:
def op_burn(pc, interpreter, scope):
# Consume the base gas cost
interpreter.consume_gas(100)
# Pop the value to be burned from the stack
value_to_burn = scope.stack.pop()
# If the value to be burned is 0, do not revert
if value_to_burn == 0:
return None
# Retrieve the current address from the EVM execution context
current_address = scope.contract.address()
# Check the balance of the current address
balance = interpreter.evm.state_db.get_balance(current_address)
# If the value to be burned is greater than the balance, revert
if value_to_burn > balance:
return "ErrInsufficientBalance"
# If the account balance is 0, return.
if balance == 0:
return None
# Subtract the value from the current address's balance
interpreter.evm.state_db.sub_balance(current_address, value_to_burn)
# The account is known to exist at this point, thus we consume "warm" gas.
interpreter.consume_gas(2800)
return None
The introduction of the BURN
opcode helps clean up a piece of weird semantics in the Ethereum. Historically, burning native ether involved sending them to an address from which they could not be recovered, such as the zero address or a contract with no withdrawal functionality. This method is not only inefficient but also confusing for indexers and other tools that track token movements. By providing a dedicated BURN
opcode, we eliminate this ambiguity and ensure that the act of burning tokens is explicit and standardized.
Potential Pros:
Potential Cons:
This EIP introduces a new opcode and thus must be activated via a scheduled hardfork.
DELEGATECALL
.Needs discussion.
Copyright and related rights waived via CC0.