ERC-7866 Decentralized user profile (Decentralised User Profiles)

Review · Names & metadata · created 2025-01-22

A standard that creates a user profile with a token bound to a wallet address and non-transferable, sets different avatars per app, and allows the same identity to be used consistently across multiple blockchains.

Why it is needed

Currently there is no unified user profile usable across blockchains. Existing identity solutions lack cross-chain compatibility, lack the ability to customize profiles per app, and are not standardized. Ethereum Name Service (ENS) profiles are effectively tied to Ethereum, and services like Gravatar are centralized, so users cannot directly control their data. Also, building a profile with a general NFT (ERC-721) allows the token to be bought and sold, creating the risk that identity could be traded or stolen. This standard aims to bind profiles to non-transferable soulbound tokens and store metadata in decentralized storage such as IPFS or Arweave, providing a user-controlled, cross-chain compatible profile and app-specific custom avatars.

What to implement

In depth

Profile identifier and DID format

Each profile has a human-readable identifier in the format <username>@<network_slug>.soul. username is a custom string unique within the chain, network_slug is a chain abbreviation such as eth, polygon, or xion, and the .soul suffix indicates it is a soulbound token (e.g., john@eth.soul). At the same time, each profile is bound to a decentralized identifier (DID) in the format did:<chain>:<address> (e.g., did:ethereum:0x123...). The reference implementation's generateDID function creates a string prefixed with did:ethereum: from the user's address and records it in the ProfileCreated event. Per the security considerations, a DID cannot be changed once created, preventing identity forgery or unauthorized modification.

Metadata schema and off-chain storage

Profile metadata is defined by a JSON schema, and all 7 fields are required: username, avatar (IPFS URI), bio, website, socials (twitter and github required), default_avatar_visibility, and dapp_avatars. dapp_avatars uses 40-character hexadecimal addresses starting with 0x as keys, and each entry must include avatar (IPFS URI) and visibility (public or private). The metadata body is stored off-chain in storage such as IPFS or Arweave to reduce gas costs, with only the URI and pointer stored on-chain. Pure on-chain storage was rejected due to gas costs and the limitations of handling large data such as high-resolution avatars.

Visibility logic

Both the default avatar and each dApp-specific avatar can be set to public or private. If public, any external caller can retrieve the avatar; if private, only the user themselves can retrieve it, and other callers receive an encoded response with an error message. Since the default avatar applies as a fallback when there is no dApp-specific setting, existing apps that have not implemented this standard's new features still work without issue.

Contract interface ISoulProfile

The interface defines a Metadata struct (username, avatar, bio, website, a socials mapping, defaultAvatarVisibility, and a dappAvatars mapping) and a DappAvatar struct (avatarURI, visibility). There are 3 state-changing functions: createProfile, setDefaultAvatar, and setDappAvatar, and 2 read functions: getDefaultAvatar and getDappAvatar. In the reference implementation SoulProfile, createProfile rejects empty usernames and duplicate profile creation and sets the default visibility to public, while setDappAvatar rejects the zero address. This standard requires ERC-165 interface detection (requires: 165).

Rationale for SBT and registry/resolver design

The reason profiles are implemented as soulbound tokens (SBTs) is that non-transferability enforces identity ownership. Since profiles cannot be sold or stolen, they are suited to reputation-based systems. A transferable ERC-721-based design was rejected as unsuitable for identity management. The structure that separates identifier management (registry) from metadata resolution (resolver) follows the approach proven in ENS, making extension and upgrades easy. Direct integration with ENS was also considered, but because ENS is effectively tied to Ethereum and has limits on cross-chain functionality, the design took a multi-chain approach inspired by ENS rather than integrating with it directly. The main contracts are designed to be upgradeable via a proxy structure such as TransparentUpgradeableProxy.

Proposal status: Review

This proposal's current status is Review. It is not yet a finalized standard and is still under review, so the specification and interface may change going forward.

Things to watch out for

Original ERC · ← ERCs