EIPs Explained

ERC-4824 · Review · ERC · 2022-02-17

ERC-4824: Common Interfaces for DAOs

Gives every DAO a `daoURI()` pointing to standard JSON-LD describing its members, proposals, activity, governance and contracts, so tools can discover and read any DAO the same way.

What problem does it solve?

"DAO" has never had a precise definition. Every framework stores members, proposals and rules differently, some on-chain, many off-chain in forums or voting tools. A dashboard, explorer or aggregator has to write custom code for each framework just to answer basic questions like "who are the members?" or "what proposals are open?".

ERC-4824 borrows the idea of tokenURI from ERC-721: one on-chain pointer to a standard off-chain JSON document. It standardises the description of a DAO, not how the DAO governs itself.

How it works

A contract implements one function:

interface IERC4824 {
    event DAOURIUpdate(address daoAddress, string daoURI);
    function daoURI() external view returns (string memory _daoURI);
}

The URI resolves to a JSON-LD object with name, description and five sub-URIs:

Field Points to
membersURI List of members, each identified by a CAIP-10 address, DID or other URI
proposalsURI Proposals with id, name, content and discussion links, free-text status, and optional EVM calls for simulation
activityLogURI Interactions between members and proposals (submitting, voting…)
governanceURI A flat file, normally Markdown, explaining how the DAO works
contractsURI Every contract belonging to the DAO, to help indexers filter spoofing

Any sub-document can be embedded directly by dropping the URI suffix (members instead of membersURI).

DAOs that cannot change their contracts can use an external registration contract that stores the DAO's main address and its daoURI. Factories are encouraged to log registrations to a common indexer contract. If both exist, the registration contract's URI takes precedence, and the most recent registration wins.

On-chain proposal IDs take the form <CAIP-10 address>?proposalId=<counter>, so they are globally unique across chains.

Sample code

A minimal daoURI document:

{
  "@context": "https://www.daostar.org/schemas",
  "type": "DAO",
  "name": "Example DAO",
  "description": "A sample DAO for illustration.",
  "membersURI": "ipfs://<cid>/members.json",
  "proposalsURI": "https://api.example.org/dao/proposals",
  "activityLogURI": "https://api.example.org/dao/activity",
  "governanceURI": "ipfs://<cid>/governance.md",
  "contractsURI": "ipfs://<cid>/contracts.json"
}

Implementing it on a governance contract:

contract MyDAO is IERC4824 {
    string private _uri;
    address public immutable governor;

    constructor(address gov, string memory uri) { governor = gov; _uri = uri; }

    function daoURI() external view returns (string memory) { return _uri; }

    function setURI(string calldata uri) external {
        require(msg.sender == governor, "only governance");
        _uri = uri;
        emit DAOURIUpdate(address(this), uri);
    }
}

Things to know

  • Status: Review. The interface may still change before it becomes Final.
  • The standard says nothing about who may update the URI. Tie updates to the DAO's own governance, as above.
  • Data behind the URI is off-chain and self-reported. Indexers should treat it as claims and be careful if a URI returns executable content.
  • Organisations that are not DAOs may still publish a daoURI, using a different type such as "Organization" or "Entity".

#dao #governance #metadata #json-ld

Details

Authors
Joshua Tan (@thelastjosh), Isaac Patka (@ipatka), Ido Gershtein <[email protected]>, Eyal Eithcowich <[email protected]>, Michael Zargham (@mzargham), Sam Furter (@nivida)
Status
Review
Type
Standards Track / ERC
Created
2022-02-17

Machine-readable: Markdown · JSON