HomeEnglishChanging an EIP-7702 delegate leaves a storage compatibility question

Changing an EIP-7702 delegate leaves a storage compatibility question

Cryptofocus bron in google
Bybit - sponsored
Ontvang nu een welkomstbonus bij Bybit, maar liefst 30 USDC!

Changing the contract that an Ethereum account delegates to through EIP-7702 requires a storage migration check. The new code can encounter state left by the previous implementation. Removing the delegation indicator is a different operation from clearing that state, which is why the specification treats a switch between delegate contracts as a security-critical change.

What you need to know
EIP-7702 lets an account delegate code execution to another address.
Its storage-management guidance warns about collisions when changing delegate contracts.
An authorisation to the zero address clears the account code.
The protocol does not provide a native operation to clear all account storage.

The EIP-7702 storage guidance recommends particular care when the replacement code was not designed and tested as an upgrade to the old code. Both implementations can use the account’s storage. A location that meant one thing to the earlier implementation may mean something different to its replacement. That creates a compatibility question even if the new delegate contract works correctly with a fresh account.

Code removal and storage cleanup have different scope

In its behaviour rules, EIP-7702 specifies that a valid authorisation to the zero address clears the account’s code. The storage section separately discusses clearing account storage and says the protocol does not natively offer that operation. Taken together, these passages do not support treating delegation removal as a factory reset of the account. A later migration still needs to account for earlier storage use.

The specification suggests namespaced storage, giving ERC-7201 as an example. Namespaces place groups of variables at locations derived from identifiers so implementations can avoid accidental overlap. ERC-7201’s security section adds an easily missed qualification: the annotation used to describe a namespace does not make the compiler enforce the pattern. The developer remains responsible for implementing the claimed layout. Seeing the annotation in source code is therefore insufficient evidence of a safe migration.

Lees ook:  Pruned Bitcoin nodes: check the missing blocks before restoring a wallet

For a wallet developer reviewing a replacement delegate, compare the locations used by each implementation and check the account’s prior delegations. The EIP says a special-purpose delegate could implement storage clearing where needed. It does not supply a universal cleanup transaction for users to sign. Such code itself receives powerful account access, so a generic instruction to delegate to an unfamiliar cleaner would introduce another security decision.

Our earlier explanation of failed transactions and EIP-7702 delegation covers why a failed execution can leave a delegation in place. This migration question comes later: after changing or removing that code reference, what state can another implementation encounter? The answer requires the actual storage layouts and account history. This is a comparison of published protocol specifications; no wallet migration or storage cleanup was performed.

Partnerdeal

Bybit - Welkomstbonus 30 USDC!

Ontvang nu een welkomstbonus bij Bybit, maar liefst 30 USDC!.

Lees hier de voorwaarden
Nu naar Bybit
Voorkeur cryptofocus google nieuws
Lotte Herkens
Lotte Herkens
Lotte Herkens schrijft over crypto alsof het om geld gaat dat je morgen echt nodig hebt. Ze volgt bitcoin en altcoins al jaren, maar wordt pas enthousiast als er data, adoptie of beleid achter zit. Haar stukken zijn kort, scherp en praktisch: wat is er gebeurd, waarom boeit het, en wat kan het betekenen voor je portfolio? Ze heeft een zwak voor on-chain trends, macro-cijfers en alles wat schuurt tussen regelgeving en innovatie. Als ze niet schrijft, zit ze vaak met een koffie in de trein, podcasts te luisteren, of maakt ze lange wandelingen om een verhaal “recht” te krijgen. Lotte is nuchter, nieuwsgierig en allergisch voor hype. Ze wil dat lezers snappen wat er speelt — zonder dat het voelt alsof je een whitepaper moet doorploegen.
Lees ook