r/ethdev • • 14d ago

Question How does EIP-7702 handle clean key revocation if we migrate EOAs to post-quantum signatures?

Been digging into the Lean Ethereum roadmap and the post-quantum transition plans, and there is a specific account migration edge case I keep coming back to.

Right now, the cleanest way for existing EOA holders to get quantum resistance without abandoning their current address and DeFi positions is delegating via EIP-7702 (or moving to native AA once EIP-8141 lands) to a smart wallet contract that verifies a lattice or hash-based signature.

The catch is that with EIP-7702, the underlying secp256k1 private key still retains root control over the account. Even if your daily transactions are verified through a post-quantum delegate contract, an attacker with a strong enough quantum computer could theoretically derive the original ECDSA private key from your public key on-chain and sign a fresh authorization transaction pointing your EOA to their own malicious delegate contract.

At the protocol level, how are core devs planning to let existing EOAs permanently burn or brick their underlying ECDSA key once they migrate to a post-quantum scheme? Would that require a dedicated opcode or transaction type in one of the upcoming forks before L*, or is the assumption that everyone eventually sweeps funds to fresh native AA addresses?

3 Upvotes

56 comments sorted by

1

u/Bloqarl 14d ago

There’s a draft for exactly this, EIP-7851, a precompile that lets a delegated EOA deactivate its key. Even with that, any token whose permit() uses plain ecrecover still accepts the old key’s signature, so the attacker could sign permits and pull your tokens without ever touching the account.

1

u/shegeshe 13d ago

That is a huge catch. Because ecrecover is stateless by default, deactivating the EOA at the protocol level under EIP-7851 still leaves legacy ERC-2612 permit() functions and Permit2 wide open to a recovered private key.

I saw EIP-8151 was proposed recently to patch that exact gap by making ecrecover check deactivation status and return the zero address, though even that would not save immutable contracts doing ECDSA math directly in Solidity instead of calling the precompile. Trying to retrofit post-quantum safety onto legacy account and signature standards turns into a game of whack-a-mole with every existing token contract.

For anyone holding high-value tokens long term, migrating assets into a fresh smart contract wallet with zero prior ECDSA exposure on-chain—and avoiding ERC-20s with un-disableable ecrecover permits—seems like the only clean defense on existing EVM chains.

1

u/Bloqarl 12d ago

yeah, sweeping works for what can move. vesting contracts and merkle claims that name the old address keep paying whoever holds that key, and a validator whose 0x01 withdrawal credentials point at the EOA can't change them at all, so that stake has to exit and be swept before the key is at risk.

1

u/shegeshe 12d ago

agreed, immutable beneficiary mappings are the hardest part of migrating an existing chain. ​for 0x01 validator withdrawal credentials, the address is permanently bound at the consensus layer, so doing a full validator exit and re-staking under a fresh PQ-controlled 0x01 or 0x02 smart contract address before CRQCs arrive is really the only safe play. ​for unvested streams and merkle distributors, unless the issuing protocol explicitly built an admin or beneficiary-reassignment hook into the contract, anyone holding a long-term vesting cliff on an exposed EOA is stuck racing the unlock schedule to sweep each tranche the block it becomes claimable. That is another reason greenfield chains designed with native PQ accounts from day one avoid a decade of legacy address-binding debt.

1

u/Bloqarl 12d ago

and since pectra it cuts both ways: with EIP-7002 the withdrawal address can trigger the exit itself, so whoever breaks that key can force the exit too and race you for the balance when it lands. the exit has to happen before the key is at risk, not after.

1

u/veyrnox 14d ago

Small correction to the existing answer: EIP-7851 is currently drafted around an ECDSA-disabled delegation prefix plus a self-only SETSELFDELEGATE opcode, not a precompile. Its goal is the one-way transition you're describing: after delegated code switches the account into that mode, ECDSA-authenticated transactions and later 7702 authorizations are rejected, while wallet code can still update the delegate.

It is not the only proposal or a finalized path. EIP-8164 takes a different route by replacing ECDSA with a native ML-DSA-44 key; EIP-8425 sketches a future network-wide ECDSA freeze and recovery process; and EIP-8141 moves transaction validation away from 7702's ECDSA authorization-list model.

So under 7702 alone, your concern remains: the old secp256k1 key is still root authority and can overwrite or clear the delegation. Nonces only order authorizations made under that same key. A clean migration requires an adopted protocol rule that makes ECDSA permanently invalid for the account, or moving assets to an account whose root authentication is already post-quantum.

1

u/shegeshe 13d ago

Good catch on the EIP-7851 mechanism. Using a self-only SETSELFDELEGATE opcode to flip the prefix from 0xef0100 to 0xef0101 keeps delegation control inside the wallet code without needing a new precompile.

Looking across all four proposals together really highlights how complex the migration path is for existing EVM accounts:

  1. EIP-7851 disables protocol-level ECDSA transaction and delegation authority for that address, though it still needs a companion change to the ecrecover precompile so legacy token permit() calls do not honor the old key.
  2. EIP-8164 and EIP-8141 give accounts a cleaner break by replacing ECDSA with native ML-DSA-44 keys or frame-based validation, and EIP-8164 even lets you originate fresh accounts where no secp256k1 private key ever existed in the first place.
  3. EIP-8425 acts as the emergency backstop, freezing ECDSA transactions and removing the ecRecover precompile globally at a set cutoff while letting users register recovery commitments beforehand.

Since none of these are live on mainnet yet and 7702 alone leaves the secp256k1 key as root authority, sweeping funds to a fresh smart contract wallet (or eventually a keyless EIP-8164 / EIP-8141 native account once shipped) remains the safest playbook for long-term storage today.

1

u/veyrnox 13d ago

That matches my reading. The permit edge is the part I would not collapse into “ECDSA disabled”: invalidating transactions and delegation is not enough while existing contracts can still treat ecrecover(old key) as authority. A migration that keeps the address therefore needs both account-level invalidation and a way for contracts and standards to stop accepting the legacy signer. Until then, moving to an address created without a secp256k1 key is the only boundary that does not depend on every downstream verifier upgrading correctly.

1

u/shegeshe 13d ago

Agreed 100 percent. Relying on every downstream contract, token standard, and cross-chain deployment to respect a retroactive key deactivation leaves too many edge cases open. Originating a fresh address with zero secp256k1 history and moving assets over cleanly is the only guarantee that a recovered legacy key has zero authority anywhere in the stack.

1

u/rayQuGR 13d ago

I think the difficult part here is not simply adding post-quantum signature verification. It's establishing a point where the old authentication mechanism can no longer regain control.

With EIP-7702, the original EOA key retains the authority to authorize a new delegation. That means a post-quantum verifier can protect normal wallet operations without necessarily protecting the account from someone who compromises the original secp256k1 key.

A robust migration needs to address that root authority explicitly. Possible approaches include a protocol-level mechanism for permanently disabling legacy authorization, or migrating assets and positions to an account whose authorization rules are natively post-quantum. The latter has its own challenges, especially when existing DeFi positions and address-bound permissions are involved.

There is an interesting connection to confidential smart-contract infrastructure such as Oasis Sapphire. It can support custom authorization logic and confidential execution, but it cannot independently revoke the EOA's protocol-level signing authority. That needs to be solved at the account or protocol layer.

I'd be interested to know whether the roadmap considers irreversible legacy-key revocation a protocol requirement, or whether the long-term assumption is that users will eventually migrate to new account types. Those are very different security models.

1

u/shegeshe 13d ago

Right now, the roadmap is actively pursuing both tracks because neither one solves the entire problem on its own.

On the protocol-level revocation side, proposals like EIP-7851 (irreversible ECDSA-disabled delegation) and EIP-8425 (a future network-wide ECDSA freeze with a recovery commitment window) treat legacy-key revocation as a hard requirement for protecting existing address-bound DeFi positions, ENS names, and long-lived liquidity where sweeping to a new address is costly or impossible. As you pointed out with Oasis Sapphire, custom contract-level validation cannot override root EOA signing authority unless the underlying execution layer itself stops honoring that key.

At the same time, native account abstraction proposals like EIP-8141 and native PQ account designs like EIP-8164 assume that long-term security eventually moves toward fresh accounts whose root validation was never tied to a secp256k1 key in the first place.

In practice, the consensus among Ethereum researchers is leaning toward a staged model: give existing EOAs a protocol-level off-switch for legacy ECDSA keys so active DeFi users are not stranded, while making native post-quantum accounts the default for newly created wallets going forward.

1

u/secrypta 5d ago

One blast radius that does not show up in the deactivate-the-EOA framing: if that same address is an owner on any Safe or other multisig, killing the key at the account level does nothing for those. The Safe still treats a signature from the old secp256k1 key as a valid owner approval, since that check lives in the Safe contract, not in your EOA. So the pre-compromise checklist is not just sweep balances and revoke approvals, it is also rotate that address out as an owner everywhere it signs, including multisigs, module configs, and any contract that hardcoded it as an admin. Those are the ones people forget because nothing in the wallet UI reminds you they exist.

2

u/shegeshe 4d ago

that is a huge catch that almost never gets mentioned in EIP-7702 migration checklists. Because EIP-7702 only sets the code pointer on the EOA itself, any external contract that verifies raw ECDSA signatures via ecrecover (like Safe owner approvals, Permit2 off-chain signatures, or hardcoded Ownable admin roles) bypasses the EOA's delegated code completely and still accepts the old secp256k1 key. ​Even worse, like you said, standard wallet UIs only index token balances and ERC-20 allowances, they do not surface every Safe, Zodiac module, or protocol admin slot where that address was ever registered as a signer. ​In practice, that means an EIP-7702 post-quantum upgrade really has to be treated as two separate steps: ​1. Delegating the EOA to a post-quantum smart account so native transactions and ERC-1271 contract-signature checks enforce ML-DSA or hash-based verification. ​2. Auditing past signing history (via indexers or archive logs) to rotate that EOA out of every Safe owner threshold, guard/module config, and hardcoded access-control role before ECDSA is compromised or deprecated. ​Definitely adding multisig owner and ecrecover role rotation to the top of the pre-migration checklist.

1

u/[deleted] 14d ago

[removed] — view removed comment

2

u/shegeshe 13d ago

Right now on live Ethereum, no. Without both EIP-7851 and EIP-8151 shipped together, an old EOA cannot keep its DeFi positions while truly killing the underlying secp256k1 key. Even if EIP-7851 blocks new transactions and new 7702 authorizations from that key, EIP-8151 is required to make the ecrecover precompile return zero bytes for deactivated 0xef0101 accounts so legacy permit() and Permit2 calls stop honoring the old key.

And even if both EIPs go live, there are still two catches that keep "deactivate and stay" from being a 100 percent clean break:

  1. Any immutable contract that implements ECDSA recovery directly in Solidity instead of calling the ecrecover precompile will still accept a signature from the old key.
  2. Off-chain signature checks, relayers, and cross-chain deployments on L2s or sidechains where the same EOA address has not been deactivated yet remain exposed to that same private key.

So in practice today, if you want the old key to be completely dead, sweeping positions into a fresh smart contract wallet (or native AA account with zero prior ECDSA exposure) and abandoning the old address is the only guaranteed path.

2

u/[deleted] 13d ago

[removed] — view removed comment

2

u/shegeshe 13d ago

The honest answer is that deactivation is strictly chain-by-chain. Because every EVM network maintains its own independent state trie and execution rules, there is no global broadcast that revokes an EOA's private key across L1, rollups, and alt-L1s simultaneously.

Even if a rollup adopts the exact same rules via an RIP (Rollup Improvement Proposal) or an OP Stack / Arbitrum Orbit upgrade, a user still has to execute the delegation and deactivation transaction separately on every single chain where that address has funds, approvals, or future airdrop exposure. Cross-chain messaging protocols can trigger wallet logic on a destination L2, and EIP-7702 technically allows a single signed authorization tuple with chainId set to 0 to be replayed across multiple chains, but any chain that has not upgraded its client software—or where the user forgot to submit that deactivation tx—still leaves the raw secp256k1 key live.

On top of that, note that EIP-7851 was actually declined for inclusion on the Ethereum core dev calls (ACDE #245) in September 2026, which makes the practical takeaway even clearer. Sweeping funds and positions into fresh smart contract wallets (or native post-quantum accounts with zero prior ECDSA exposure) and retiring the old EOA address completely is the only way to kill that key's blast radius everywhere at once.

1

u/[deleted] 13d ago

[removed] — view removed comment

2

u/shegeshe 13d ago edited 13d ago

yeah, if the key is already compromised, per-chain racing is pretty much unavoidable right now. Every EVM chain has its own mempool and block builders, so even if you fire off a chainId=0 7702 auth alongside pre-signed multicall sweeps across L1 and every L2 through private RPCs at the exact same time, the attacker only has to beat your tx on one chain.

the only real way to avoid the race is sweeping everything and revoking token approvals before the key is ever compromised. Once every chain tied to that address is drained and approvals are zeroed out, recovering the old secp256k1 key later doesn't get an attacker anything.

that "kill the key first, claim positions later" idea is actually what EIP-8425 is trying to spec out. It freezes legacy ECDSA execution and permit paths at a cutoff block without needing a live sweep tx, then lets owners claim balances afterward using a ZK proof of the original seed or a pre-registered recovery hash—though that only helps on chains that actually ship the freeze upgrade.

2

u/[deleted] 13d ago

[removed] — view removed comment

2

u/shegeshe 13d ago

your reading is completely fair. EIP-8425 isn't designed to save a stolen seed, it's designed for a quantum break where an attacker derives your secp256k1 private key from an exposed on-chain pubkey without ever knowing the underlying BIP-39 seed. Because ECDSA keys are derived via one-way hashing from the seed, a quantum attacker who cracks the private key still can't produce a ZK proof of the seed phrase.

if the seed itself was leaked before the cutoff, a seed proof can't distinguish the real owner from the attacker, and under the current 8425 discussion conflicting claims just leave the account frozen in a contested state.

that's why the real security boundary has to happen before compromise—either sweeping to an address whose root key was never exposed on-chain, or starting on a native post-quantum account from day one instead of relying on an emergency fork to rescue legacy keys.

2

u/[deleted] 13d ago

[removed] — view removed comment

2

u/shegeshe 12d ago

you can actually hold funds under a post-quantum key on mainnet today without waiting for a hard fork by deploying an ERC-4337 smart contract account whose validateUserOp verifies a lattice or hash-based sig directly in Solidity.

because a 4337 smart account is deployed via CREATE2 and has no underlying EOA private key at all, there is zero secp256k1 root authority attached to that address. Even though a bundler wraps the UserOp in a normal outer tx to submit it to the EntryPoint, the bundler can't forge or modify your inner UserOp payload without breaking your PQ signature check.

the only real catch right now is gas. Until Ethereum ships native PQ verification precompiles (currently penciled in for the J* fork on the EF roadmap), verifying Falcon-512 or Dilithium in pure EVM bytecode costs around 1.5M to 4M gas per tx. For a high-value cold vault that rarely moves funds, paying $30 to $80 in L1 gas for a withdrawal is already workable today, whereas for active spending most people either keep a small ECDSA hot wallet or use an L2 where custom account validation is cheap.

→ More replies