Title: Potential_EIP__Universal_Wallet_Recovery_Standard_
Category: ERCs

Author: Arvolear
Date: 2025-05-07T12:37:29.328Z

This is a super draft version of a smart account recovery idea that I will be framing and updating in the next days.
Would love to hear what you think about this!

Abstract
Introduce a universal wallet recovery mechanism recoverOwnership(newOwner, provider, proof) for smart accounts to update their “owner” address.
Motivation
Account Abstraction (AA) and the “contractization” of EOAs are important Ethereum milestones for improving off-chain UX. Many diverse implementations of smart accounts emerge daily, and with EIP-7702 now being available to the public, there needs to be some standardization done in the wallet ownership recovery territory.
Specification
The keywords “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
pragma solidity ^0.8.20;

abstract contract Recovery {
    /**
     * MUST be emitted in the `recoverOwnership` function upon successful recovery.
     */
    event OwnershipRecovered(address indexed newOwner);
    
    /**
     * MUST be emitted in the `addRecoveryProvider` function.
     */
    event RecoveryProviderAdded(address indexed provider);

    /**
     * MUST be emitted in the `removeRecoveryProvider` function.
     */
    event RecoveryProviderRemoved(address indexed provider);

    // bytes4(keccak256("recoverOwnership(address,address,bytes)"))
    bytes4 internal constant MAGIC = 0x3cfb167d;

    /**
     * An `onlyOwner` function to add a new recovery provider.
     * IMPORTANT this function MUST be access controlled.
     * 
     * @param provider the address of a recovery provider (ZKP verifier).
     */
    function addRecoveryProvider(address provider) public virtual;

    /**
     * An `onlyOwner` function to remove an existing recovery provider.
     * IMPORTANT this function MUST be access controlled.
     * 
     * @param provider the address of a previously added recovery provider.
     */
    function removeRecoveryProvider(address provider) public virtual;

    /**
     * A view function to check if a provider has been previously added.
     * @param provider the provider to check
     * @return true if the provider exists in the wallet, false otherwise.
     */
    function recoveryProviderExists(address provider) public view virtual returns (bool);

    /**
     * A non-view function to recover an ownership of a smart wallet.
     * IMPORTANT this function MUST check that `provider` exists in the wallet.
     * 
     * @param newOwner the address of a new owner.
     * @param provider the address of a recovery provider.
     * @param proof an encoded proof of recovery (ZKP/ZKAI, signature, etc).
     * @return magic the MAGIC if recovery is successful, otherwise any other value.
     */
    function recoverOwnership(
        address newOwner,
        address provider,
        bytes memory proof
    ) public virtual returns (bytes4 magic);
}

Rationale
TODO
Backwards Compatibility
This EIP is fully backwards compatible.
Reference Implementation
TODO
Security Considerations
Since the recoverOwnership function is non-view, there are a handful of security concerns that need to be carefully addressed.

Author: ivanmmurcia
Date: 2025-05-07T16:46:02.987Z

Hey,
IMO EIP-7702 must trigger the option to start getting rid of centralized MPCs that have the option to perform address-identity matching. This is where passkeys and proposals like this one that delegate recovery in a decentralized way come in. Looking forward to seeing how this proposal grows!