ERC-7947 Account Abstraction Recovery Interface (AARI) (Account Abstraction Recovery Interface)
Draft · Accounts & wallets · created 2025-05-07
A common interface that lets users register various recovery providers so they can regain access to a smart account even after losing their private key.
Why it is needed
As account abstraction lets smart contracts take on the role of accounts instead of EOAs, more wallets are offering easy onboarding without requiring a private key. However, if each account has its own recovery method, users become locked into the recovery service offered by a specific wallet, and decentralization suffers if that service is centralized. Furthermore, as new recovery methods such as ZK proofs or ZK2FA emerge, each account must integrate them separately without a common interface. Without a standard way to register multiple recovery mechanisms simultaneously and freely swap them when needed, users must accept the risk of depending on a single recovery mechanism.
What to implement
event AccessRecovered(bytes subject);: An event emitted when account access actually changes via recoverAccess or similar.event RecoveryProviderAdded(address indexed provider);: An event emitted when a new recovery provider is added to an account.event RecoveryProviderRemoved(address indexed provider);: An event emitted when a recovery provider is removed from an account.function addRecoveryProvider(address provider, bytes memory recoveryData) external payable;: Registers a new recovery provider and passes recoveryData to that provider's subscribe function.function removeRecoveryProvider(address provider) external payable;: Removes a registered recovery provider and calls that provider's unsubscribe function.function recoveryProviderAdded(address provider) external view returns (bool);: Checks whether a specific provider is already registered.function recoverAccess( bytes memory subject, address provider, bytes memory proof ) external returns (bool);: Submits a proof to the registered provider, and if verification succeeds, updates account access to subject.event AccountSubscribed(address indexed account);: An event emitted when an account newly subscribes to a recovery provider.event AccountUnsubscribed(address indexed account);: An event emitted when an account unsubscribes from a recovery provider.function subscribe(bytes memory recoveryData) external payable;: Subscribes the calling account (msg.sender) to the recovery provider and stores the recovery commitment.function unsubscribe() external payable;: Unsubscribes the calling account and deletes all stored recovery data.function getRecoveryData(address account) external view returns (bytes memory);: Looks up the recovery commitment data stored for a specific account.function recover(bytes memory object, bytes memory proof) external;: Verifies the submitted proof against the stored recovery data to determine whether the calling account (msg.sender) can be recovered as the object.
In depth
A Structure Split Across Two Interfaces
This standard splits roles between IAccountRecovery, implemented by the smart account, and IRecoveryProvider, implemented by the recovery provider. The account side acts as the interface for adding, removing, and querying recovery providers and attempting recovery via recoverAccess, while the provider side receives and stores commitments via subscribe and performs the actual proof verification via recover. This separation of roles lets a single account register multiple recovery providers of different types, such as ZKP and ZK2FA, at the same time.
subscribe and the Commitment Approach
addRecoveryProvider must pass recoveryData to the provider's subscribe function. recoveryData is a commitment, such as a hash or a ZKP public output, that does not reveal the secret value (the substitute for the private key) itself but allows that knowledge to be proven later via a proof. If a user wants to rotate the secret value for security reasons, they can multicall unsubscribe and subscribe together to recommit.
Required Processing Order for recoverAccess
recoverAccess MUST verify that the called provider is actually registered to the account, MUST call the provider's recover, and if proof verification succeeds, MUST update account access according to subject. It MUST return true on successful recovery, and MUST return false or revert on failure.
Why subject and object are arbitrary bytes
Many smart accounts' access control structures are not simply represented by a single owner address. For this reason, recoverAccess's subject and recover's object are defined as arbitrary bytes rather than a fixed address type, so that not only owner addresses but also structures like role-based access control can be encoded and designated as recovery targets.
Preventing proof reuse
The provider's recover function must ensure that submitted proofs cannot be reused, and the spec cites nonce updates as an example. This is a requirement to prevent a once-used recovery proof from being resubmitted to repeatedly hijack an account.
Access control and scope of responsibility
addRecoveryProvider and removeRecoveryProvider only have access control recommended at the SHOULD level; who can actually call these functions is left to the smart account developer's implementation. The standard itself does not enforce this part.
A proposal that has not yet been finalized
This ERC is currently in Draft status and has not yet been finalized. Detailed interface requirements or parameter definitions may change during further discussion, or the proposal itself may stall.
Things to watch out for
- Risk of insufficient access control when adding or removing recovery providers: Access control for addRecoveryProvider and removeRecoveryProvider depends on the smart account developer's implementation. If this is not implemented properly, an unauthorized party could arbitrarily add or remove recovery providers.
- Malicious recovery provider registered via phishing: If a user is phished into adding a malicious recovery provider to their account, that provider can accept a fake recovery proof and take full control of the account.