EIPs Explained

ERC-7484 · Draft · ERC · 2023-08-14

ERC-7484: Registry Extension for ERC-7579

A standard Module Registry interface that lets ERC-7579 modular smart accounts check on-chain security attestations before installing or running third-party modules.

What problem does it solve?

Modular smart accounts (ERC-7579, built on ERC-4337) let anyone write plug-in modules: validators, executors, hooks and so on. That openness is also a risk: a malicious or buggy module installed into your account can drain it, and most properties that matter (for example, "this module only writes to its own storage") cannot be verified on-chain.

ERC-7484 proposes a Module Registry where auditors and other parties publish attestations about modules, plus a standard Adapter behaviour so accounts query that registry before trusting a module. Accounts can then rely on whatever set of attesters they choose, using one interface regardless of account architecture.

How it works

Roles:

  • Attester: an entity (auditor, team, DAO) that makes an on-chain statement about a module.
  • Registry: stores attestations (or references to them). It must verify the attester created each attestation and let attesters revoke them. It should support expiry.
  • Adapter: logic in the account (native or as a module) that queries the registry.

The core registry calls are check functions that simply revert when a module is not trusted:

  • check(module) / checkForAccount(account, module) use the attesters and threshold the account stored earlier via trustAttesters(threshold, attesters).
  • check(module, attesters, threshold) passes the attesters explicitly.
  • Variants with moduleType also verify the module was attested as that type (for example, a validator).

A check must revert if fewer than threshold of the given attesters attested, if any of them revoked, or if the attester list is not unique and sorted.

The adapter must query the registry about a module at least once before or during the first transaction that calls it, and must treat a registry revert as a security risk. It should query on installation and on execution, and revert the flow on failure.

The spec also includes a reference ownerless singleton registry, arguing that one shared registry concentrates attestations, but accounts are not required to use it.

Sample code

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

interface IERC7484 {
    function check(address module) external view;
    function check(address module, uint256 moduleType) external view;
    function check(address module, address[] calldata attesters, uint256 threshold) external view;
    function trustAttesters(uint8 threshold, address[] calldata attesters) external;
}

abstract contract RegistryAdapter {
    IERC7484 public immutable registry;

    constructor(IERC7484 _registry, address[] memory sortedAttesters, uint8 threshold) {
        registry = _registry;
        // stored per msg.sender, i.e. this account
        _registry.trustAttesters(threshold, sortedAttesters);
    }

    function _installModule(address module, uint256 moduleType) internal {
        registry.check(module, moduleType); // reverts if not attested
        // ... install logic
    }
}

Things to know

  • Status is Draft. Function signatures have changed during drafting and may change again.
  • Attester addresses must be passed unique and sorted ascending, or the registry reverts.
  • An attestation is only as good as the attester. Choosing who to trust, and with what threshold, is the real security decision.
  • A singleton registry is a single point of failure: if someone could attest on behalf of a trusted attester, many accounts would be affected at once. The spec discusses this trade-off.
  • ERC-6900 is a separate, more opinionated modular account standard; ERC-7484 targets ERC-7579 accounts.

#account-abstraction #smart-accounts #modules #security #attestations

Details

Authors
Konrad Kopp (@kopy-kat), zeroknots (@zeroknots)
Status
Draft
Type
Standards Track / ERC
Created
2023-08-14
Requires

Machine-readable: Markdown · JSON