EIP-7702: What It Means When Your Address Has Code

Since Ethereum's Pectra upgrade, an ordinary wallet address can carry code — not because the key changed hands, but because the account was given a pointer to a contract. The mechanism is small and precise: one tuple, one signature, one indicator in the account's code slot. Almost every risk that follows is a consequence of what a delegate contract can do once that pointer exists.

CoinSoso EditorialPublished Article #00130Updated

Cover artwork: CoinSoso · AI-generated, not a photograph of a real venue, product or market capture.

Key takeaways

  • An EIP-7702 authorization is a signed tuple of chain id, delegate address, nonce and signature; applying it writes 0xef0100 followed by the address into the account's code.
  • Delegating to the zero address clears the code, which is the documented way to revoke a delegation.
  • The delegation is not rolled back if the transaction reverts, so a failed transaction can still have changed what your address executes.
  • A chain id of 0 makes the authorization valid on every chain, which is the difference between one signature and a signature that travels.
  • The published security notes say a poorly implemented delegate can allow a malicious actor to take near-complete control of the signer's account.

The change is one pointer

Before Pectra, an Ethereum address had code or it did not. A contract account had code; an externally owned account had none, and every transaction from it was a plain transfer or a call out. Wallets built their security model on that split: an EOA cannot be made to run logic without a transaction signed by its key.

EIP-7702 removes the split. It introduces a new transaction type that carries an authorization list, and each authorization is a tuple:

[chain_id, address, nonce, y_parity, r, s]

Applying a valid tuple sets the account’s code to 0xef0100 || address — a fixed prefix followed by the delegate’s address. From that moment the account is still an EOA in every way that matters for signing, but a call to it executes the delegate’s code.

That is the entire mechanism, and it is worth holding onto because the vocabulary around it is misleading. Nothing was migrated, wrapped or custodised. A pointer was written into a code slot, and the account now forwards execution to whatever that pointer names.

What the spec actually requires

The details decide what can go wrong.

The tuple is processed before execution, after the sender’s nonce increments. An authorization is checked and applied at the top of the transaction, not as part of its execution trace.

The nonce must match the authority’s nonce, and applying an authorization increments the authority’s nonce by one. A tuple signed for a stale nonce is invalid; a tuple for the current nonce is a one-shot instrument.

The delegate address may be the zero address, which clears the code. This is the revocation path, and it is the single most important line in the EIP for anyone who has ever delegated. Resetting the code hash to the empty code hash returns the account to a plain EOA.

A chain id of 0 is valid on every chain. The verification step accepts either 0 or the current chain’s id. Multi-chain accounts get one signature for all of them; a signature obtained on a testnet with chain id 0 is also valid on mainnet.

Delegations survive a revert. The EIP is explicit: if transaction execution results in failure, the processed delegation indicators are not rolled back. A transaction that appears to have failed in a block explorer can still have installed a delegate.

Delegation chains are not followed. If the delegate itself points at another delegation, clients retrieve only the first code and stop. There is no cascade to audit, which is one fewer complication than the design could have had.

What the risks actually are

The EIP’s own security section is unusually direct, and it lists the failures in the order a wallet developer would hit them.

Replay protection. A delegate that acts on a signature must include a nonce in what it signs, or a malicious actor can reuse the signature and repeat its effect. This is the failure mode that turns a convenience feature into an unlimited standing instruction.

Signing over the whole call. The notes say the delegate should require a signature over value, gas, target and calldata. Without the target and calldata, a malicious actor may call arbitrary functions in arbitrary contracts; without the gas, a sponsor can grief the signer by making the call run out of gas. The summary sentence is the one to remember: a poorly implemented delegate can allow a malicious actor to take near-complete control over a signer’s account.

Front-running initialisation. Contracts are normally deployed by running initcode, which sets storage at the same moment as code. A delegation writes code without running initcode, so the account’s storage starts empty and the first caller can try to initialise it. The EIP requires wallet developers to verify that the setup calldata is signed by the account’s key via ecrecover, so the account can only be initialised with values its owner approved.

Storage management. Switching from one delegate to another is described as security-critical and not something to do lightly, particularly when the new code was not designed as an upgrade of the old. Delegates are expected to namespace storage so that two implementations cannot silently share slots.

None of these are attacks on the private key. All of them are attacks on the signature — what was signed, for which chain, under which nonce, and what the delegate does with it afterwards.

A delegation writes a pointer, not a transfer: signing key stays, execution moves your key unchanged still signs 0xef0100 ‖ addr in the code slot revocable via 0x0 delegate code runs on calls to your address Authorization tuple: chain id, delegate, nonce, signature. chain id 0 = valid on every chain. Nonce must equal the account's nonce. A revert does not undo the delegation already written. The key is safe. The question is what the pointer can do.
Two independent things: who may sign for the account, and what the account does when called. EIP-7702 changes only the second, and the second is enough to move funds.

Reading a 7702 signature request

A user cannot audit Solidity in a popup. What a user can do is recognise the shape of the request and ask three questions.

  1. What is the delegate address? It should be a contract with a public audit trail, a published upgrade policy, and — ideally — a documented way to exit. A delegate that cannot be revoked is not a delegation, it is a migration, and the EIP always allows revocation while the key is held.
  2. Which chain id is in the tuple? Zero means every chain. If the wallet is being asked to sign for a single network, a zero here is a mismatch worth stopping on.
  3. What does the delegate do with signatures it receives? The EIP’s requirements — nonce, value, gas, target, calldata — describe what a correct implementation signs over. A delegate that asks for a bare approval is the exact shape the security notes warn about.

The same discipline that clear signing versus blind signing argues for applies here with a twist. In a blind signature, the risk is that you approved a call you did not read. In a 7702 authorization, the call may be one you never make: the delegate decides later, on your behalf, within whatever bounds the contract enforces.

Where this fits with account abstraction

EIP-7702 is often described as account abstraction arriving at ordinary wallets, and that is roughly right, with one important difference. A smart contract wallet is a new address with code from birth; a 7702 account is an old address that has been given code. The consequences for a user are practical:

  • The address does not change, so balances, allowlists and history stay where they are. That is the main reason wallets adopt it.
  • Batching becomes possible. Once delegated, an account can invoke multiple calls per transaction, which is what makes approve-and-swap in one signature feasible.
  • The key can stay the same. Passkeys and session keys are a separate layer, covered in passkeys and account abstraction, that a delegate contract can implement on top.

The cost is that the account’s behaviour is now a function of code it did not ship with. A wallet that delegates to a contract with an upgrade key has, in practice, an upgrade key on every one of its users’ addresses. That sentence is not in the EIP; it is the consequence of the EIP meeting a proxy pattern.

A short checklist

  • If an address shows a 0xef0100 code prefix, it has a delegate. Treat its execution as third-party code.
  • To revoke, authorise the zero address. It costs a transaction and restores an empty code hash.
  • Do not assume a failed transaction changed nothing; the authorization list is processed first.
  • Prefer delegates that sign over the full call and publish how they are upgraded.
  • Remember that the address itself no longer tells you what it does. That is the genuine loss in this design, and it is why what an address reveals now has one more exception.

Risk note. The mechanism, revocation rule, nonce handling, revert behaviour and security considerations in this article were read from the EIP-7702 specification on 2026-10-30. Wallet implementations differ in what they expose; the specification is the floor, not the product. Nothing here is investment advice.

Sources

How this was researched. Wallet guides describe how key management works in general. Where an article describes a specific product's behaviour, its sources are listed below.

Primary sources for the factual claims on this page. A date appears only where a human has actually read the source; where it is missing, the check is still outstanding.

  1. Ethereum EIPs — EIP-7702: Set Code for EOAs(read 2026-10-30)
  2. Ethereum EIPs — EIP-7702 security considerations (delegate contract pitfalls)(read 2026-10-30)

Frequently asked questions

Does EIP-7702 move my private key to the wallet provider?

No. The delegation changes what the address executes, not who can sign for it. The key stays yours, and the account still authenticates every transaction with the same signature scheme it used before. What changes is that the address now runs the delegate's code when it receives a call.

How do I remove a delegation?

By authorising the zero address. The EIP specifies that when the delegate address is 0x0000000000000000000000000000000000000000, no delegation indicator is written and the account's code hash is reset to the empty code hash. It is still a transaction, so it costs gas, and it still requires the key that controls the account.

Can a delegation be undone if the transaction fails?

No. The EIP states that if transaction execution results in failure, the processed delegation indicators are not rolled back. The authorization list is processed before the execution portion of the transaction begins, so a revert later in the transaction leaves the delegation in place.

What happens if the delegate contract is upgraded or exploited?

Your address now executes that contract's code. The EIP's own security considerations warn that changing a delegation is security-critical, and that a poorly implemented delegate can allow a malicious actor to take near-complete control of the signer's account. Whether the delegate is upgradeable, and by whom, is therefore a first-order question rather than a detail.

Is a delegation signed for one chain valid on another?

Only if the chain id in the tuple is 0. The EIP verifies that the chain id is either 0 or the id of the current chain, so a signature with chain id 0 is acceptable on every chain. That is a deliberate feature for multi-chain accounts and a hazard for anyone reading a signing request quickly.

Where to go next

Independent research. Each card shows the platform’s invite code, and its Create Account button is a referral link that may earn us a commission at no extra cost to you. Whether an account can be opened is decided by the platform at sign-up.

Binance

One of the largest global exchanges by traded volume, with a very broad product range.

20% Trading Fee Rebate

Use invite code con888 when signing up to enjoy trading fee benefits.

Download Android App

Download from the exchange's official download service. Verify the source and follow the on-screen installation instructions.

Do not install an APK from an unknown source, or one that has been modified or cannot be checked.

Read review →

OKX

A large global exchange offering spot, derivatives and a self-custody wallet.

20% Trading Fee Rebate

Enter invite code con888 when signing up to check available trading fee benefits.

Download Android App

Download from the exchange's official download service. Verify the source and follow the on-screen installation instructions.

Do not install an APK from an unknown source, or one that has been modified or cannot be checked.

Read review →