EIPs Explained

ERC-7947 · Draft · ERC · 2025-05-07

ERC-7947: Account Abstraction Recovery Interface

A common interface that lets any smart account plug in pluggable recovery providers (ZK proofs, 2FA, guardians) and restore access through one recoverAccess call.

What problem does it solve?

Smart accounts promise "no seed phrase", but each wallet implements recovery its own way: guardians in one, email proofs in another, a custodial backup in a third. A recovery service has to integrate with every account type separately, and users are locked into whatever their wallet vendor chose.

ERC-7947, the Account Abstraction Recovery Interface (AARI), standardizes the boundary between an account and a recovery provider. Any account that implements it can use any provider that implements the other side, so providers (ZK proofs, ZK-based 2FA, social recovery, etc.) can compete and coexist.

How it works

Two interfaces:

IAccountRecovery (implemented by the smart account)

  • addRecoveryProvider(provider, recoveryData): should be access-controlled; must reject address(0) and call provider.subscribe(recoveryData).
  • removeRecoveryProvider(provider): must call provider.unsubscribe().
  • recoveryProviderAdded(provider): view.
  • recoverAccess(subject, provider, proof): must check the provider was added, call provider.recover(...), and on success update the account's access according to subject and return true.
  • Events: AccessRecovered, RecoveryProviderAdded, RecoveryProviderRemoved.

IRecoveryProvider (implemented by the recovery service)

  • subscribe(recoveryData): stores a commitment (a hash, ZK public output…) for msg.sender.
  • unsubscribe(): deletes it.
  • getRecoveryData(account): view.
  • recover(object, proof): checks the proof against the caller's commitment and must prevent proof reuse (for example with a nonce). It reverts if the proof is invalid.

subject and object are arbitrary bytes, so recovery can restore an owner address, a role, a passkey or anything else the account uses for access.

Sample code

Minimal account-side recoverAccess for an account with a single owner:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

interface IRecoveryProvider {
    function recover(bytes memory object, bytes memory proof) external;
}

contract RecoverableAccount {
    event AccessRecovered(bytes subject);

    address public owner;
    mapping(address => bool) public recoveryProviderAdded;

    function recoverAccess(bytes memory subject, address provider, bytes memory proof)
        external
        returns (bool)
    {
        require(recoveryProviderAdded[provider], "unknown provider");
        IRecoveryProvider(provider).recover(subject, proof); // reverts on bad proof
        owner = abi.decode(subject, (address));
        emit AccessRecovered(subject);
        return true;
    }

    // addRecoveryProvider / removeRecoveryProvider omitted for brevity
}

Things to know

  • Status is Draft; function names and semantics may still change.
  • The interface is agnostic to the account standard: it can sit on an ERC-4337 account or an EOA delegated via EIP-7702.
  • Adding a provider is effectively granting it the power to take over the account. A phished or malicious provider can accept fake proofs, so addRecoveryProvider must be tightly access-controlled and shown clearly in wallet UIs.
  • To rotate a recovery secret, call unsubscribe then subscribe again (e.g. in one multicall).

#account-abstraction #recovery #smart-account #zk #interface

Details

Authors
Artem Chystiakov (@arvolear) <[email protected]>
Status
Draft
Type
Standards Track / ERC
Created
2025-05-07

Machine-readable: Markdown · JSON