EIP-5065 AIRDROP, an instruction dedicated to sending ether (Instruction for transferring ether)

No call decision · EVM & execution · EIP status Stagnant · created 2022-04-30

Adds a new EVM instruction, AIRDROP, that sends ether without transferring execution flow, allowing contracts to send ether without reentrancy risk.

Why it is needed

Sending ether today requires the CALL instruction, which transfers execution flow (control) to the counterparty contract along with the ether. If the counterparty is an untrusted contract, it can use that opening to execute malicious code, causing problems such as reentrancy attacks. Developers have guarded against this with reentrancy guards and similar measures, but these are not a complete solution. The only way to send ether without transferring execution flow is to deploy a new dummy contract and call SELFDESTRUCT within it, which is excessively expensive due to the cost of contract deployment. Even in cases like an ERC-20 token transfer, where no further processing is needed after the send, developers are forced to use this costly workaround or the risky CALL approach.

What changes

Today

After EIP-5065

Who is affected

In depth

Instruction definition

The new instruction AIRDROP (opcode 0xFG) takes two values from the stack as input. address is the account that receives the ether, and value is the amount of wei to send. Similar to how SELFDESTRUCT (0xFF) transfers ether to a destination without a call, AIRDROP also delivers only ether to the recipient contract without handing over execution flow.

Gas cost structure

Total gas is the static cost (6700) plus address_access_cost plus value_to_empty_account_cost. Per EIP-2929, address_access_cost charges COLD_ACCOUNT_ACCESS_COST (currently 2600) if the target address is not in accessed_addresses, or WARM_STORAGE_READ_COST (currently 100) if it is. value_to_empty_account_cost charges the account creation cost (currently 25000) when value is nonzero and the target is an empty account (zero balance, zero nonce, no code).

Basis for the static cost of 6700

This value is CALL's (0xF1) positive_value_cost (currently 9000) minus the gas stipend (2300). Since AIRDROP never hands execution flow to the recipient, there is no need to provide a gas stipend, so the cost excludes that amount.

Comparison with existing workarounds

Currently the only way to send ether without execution flow is to deploy a new dummy contract and call SELFDESTRUCT inside it. Because deploying a contract itself is costly, this method is excessively expensive and adds unnecessary complexity for most cases, such as ERC-20 transfers, that don't need a post-transfer hook.

Dependency on EIP-2929

This proposal assumes EIP-2929 (requires: 2929). When computing address_access_cost, it directly reuses EIP-2929's gas cost structure, including the cold/warm access distinction and the accessed_addresses set.

Backwards compatibility and security

Because AIRDROP is an entirely new instruction, it does not change the behavior of existing instructions and does not break assumptions that previously held. The source states there are no known security risks.

Current status of the proposal

This EIP's status is Stagnant, meaning it is not currently being actively discussed or advanced. The Test Cases section is also empty, marked TODO, so the specification is not fully finalized. No core developer call records address whether it is included in a fork.

Original EIP · ← EIPs