EIP-3074 The AUTH and AUTHCALL opcodes (AUTH and AUTHCALL opcodes)

No call decision · Account abstraction · EIP status Withdrawn · created 2020-10-15

This proposal adds two opcodes that let an EOA (a regular account controlled by a private key) delegate usage rights over its account to a trusted contract with a single signature, and have that contract execute calls on its behalf via AUTHCALL.

Why it is needed

Right now an EOA can do little beyond signing transactions. To use features like batched execution or gas sponsorship, a new transaction type had to be added to the protocol each time, which placed a heavy burden on client implementations and did not fit well with account abstraction. In particular, accounts that hold plenty of tokens but no ether could not pay gas, creating a circular dependency where they could not even sell tokens to obtain ether. This EIP lets an EOA delegate usage rights over its account to a trusted contract (an invoker) with a single signature, enabling sponsored transactions where a third party pays the gas, along with various wallet features, without adding a new transaction type at the protocol level.

What changes

Today

After EIP-3074

Who is affected

In depth

AUTH's signature verification and the authorized variable

AUTH (0xf6) takes authority, offset, and length from the stack, and reads yParity, r, s, and commit from the memory region offset through offset+97. The signed message is keccak256(MAGIC || chainId || nonce || invokerAddress || commit), where MAGIC is 0x04. The nonce must match the signer's current EOA nonce, and invokerAddress is the address of the contract executing AUTH. If authority's EXTCODESIZE is nonzero, the operation fails immediately. If the signature is valid and the recovered address matches authority, the context variable authorized is set to that address; otherwise it is unset. authorized is valid only within a single execution frame and is not passed across CALL or DELEGATECALL.

AUTHCALL's behavior and its differences from CALL

AUTHCALL (0xf7) takes the same seven stack inputs as CALL, but if authorized is unset, execution is invalidated immediately. If authorized is set, the subcall's caller address is replaced with authorized. Even with a nonzero value, the subcall receives no gas stipend, and value is deducted from the authorized account's balance; if the balance is insufficient, it is treated as invalid. AUTHCALL increases the call depth by exactly 1, and the authorized value is retained unchanged after execution.

The role of commit

commit is a 32-byte value passed to AUTH, an arbitrary hash indicating that the signer agrees to the invoker's additional verification logic. The invoker must compute the commit hash directly from the actual call values it receives from the user (addr, value, gas, calldata, etc.) and check that it matches the value embedded in the signature. This structure lets invokers freely implement nonce-based replay protection, multicalls that bundle several calls under one signature, and designs that delegate access rights to a different key.

Gas cost structure

AUTH's gas cost is a fixed 3100 plus the memory expansion cost (auth_memory_expansion_fee), plus 100 if authority is warm or 2600 if cold (per EIP-2929). AUTHCALL's cost is the sum of the warm_storage_read fixed cost, memory expansion cost, dynamic_gas, and subcall_gas passed to the subcall. dynamic_gas adds 2500 if addr is cold, and 6700 if value is greater than 0 (plus an additional 25000 if the account is empty). If the gas argument is 0, all remaining gas is forwarded per the 63/64 rule of EIP-150.

Why tx.origin is allowed as authority, and the risk

Allowing authorized to equal tx.origin lets the account that sent the outer transaction sign directly, batching a two-step operation like an ERC-20 approve-transfer into a single transaction. However, before this EIP, msg.sender == tx.origin always held only in the top-level execution frame of a transaction, and this EIP breaks that invariant. As a result, contracts that used require(msg.sender == tx.origin) to block reentrancy may be affected, while the source states that checks used to detect EOAs or to prevent sandwich attacks are less affected.

Excluding contract accounts via the EXTCODESIZE check

AUTH treats the operation as failed and leaves authorized unset if authority's EXTCODESIZE is nonzero. This follows the same logic as EIP-3607's decision to reject transactions originating from accounts that have code, and is meant to prevent an account that holds both code and a private key from using this mechanism to perform arbitrary calls.

Security conditions invoker contracts must satisfy

Invokers must be non-upgradeable. If a different code could be redeployed at the same address, the commit verification logic could change and past signatures could be hijacked. Invokers must also include and verify nonce, value, gas, addr, and calldata all within the commit to prevent replay. The source warns that if even one of these is omitted, a malicious party could reuse a signature or construct an arbitrary call, gaining near-total control over the EOA.

Current status: withdrawn

This EIP's status is Withdrawn, and the source metadata states as the withdrawal-reason that EIP-7702 superseded it. In other words, instead of the new opcode approach of AUTH/AUTHCALL, the direction settled on EIP-7702 solving the EOA delegation problem this EIP was meant to address in a different way.

Original EIP · ← EIPs