ERC-7231: Identity-aggregated NFT
ERC-7231 lets a single NFT represent multiple identity claims across web2 + web3 platforms — Twitter, Discord, GitHub, ENS, BNS, DID systems. The NFT becomes a unified profile pointer; consuming contracts read the aggregated identity claims to render rich profile data without per-platform lookups.
Used by:
- Web3 social platforms — unified profile NFT linking across networks.
- Reputation aggregators — synthesised cross-platform reputation scores anchored to the NFT.
- Identity-bound DAOs — voting weight derived from the aggregated claims.
- Cross-platform credentials — university degrees + employer badges + certifications under one NFT.
Required Interface
solidity
interface IERC7231 {
event SetIdentitiesRoot(uint256 indexed tokenId, bytes32 newIdentitiesRoot);
function setIdentitiesRoot(uint256 tokenId, bytes32 newIdentitiesRoot) external;
function getIdentitiesRoot(uint256 tokenId) external view returns (bytes32);
function verifyIdentitiesBinding(uint256 tokenId, address owner,
string calldata userId, bytes calldata signature)
external view returns (bool);
}The NFT stores a Merkle root of the identity claims; off-chain holds the full claim set. To prove a specific identity is bound, provide a Merkle proof + a signature from that identity (e.g. the Twitter-issued claim signed by Twitter's API).
Neo Equivalent: NEP-11 + Identity Root + Verification
csharp
public static void SetIdentitiesRoot(ByteString tokenId, ByteString newRoot)
{
if (!Runtime.CheckWitness(OwnerOf(tokenId))) throw new Exception("NEP11:NotOwner");
Storage.Put(Storage.CurrentContext, IdRootKey(tokenId), newRoot);
OnSetIdentitiesRoot(tokenId, newRoot);
}
public static ByteString GetIdentitiesRoot(ByteString tokenId)
=> Storage.Get(Storage.CurrentContext, IdRootKey(tokenId));
public static bool VerifyIdentitiesBinding(ByteString tokenId, UInt160 owner,
string userId, ByteString proof)
{
if (!OwnerOf(tokenId).Equals(owner)) return false;
var root = GetIdentitiesRoot(tokenId);
if (root is null) return false;
// Verify Merkle proof: hash(userId) is in the tree rooted at `root`.
var leaf = CryptoLib.Sha256((ByteString)userId);
return VerifyMerkleProof(leaf, proof, root);
}| ERC-7231 (Ethereum) | Neo Equivalent | Notes |
|---|---|---|
setIdentitiesRoot(tokenId, root) | SetIdentitiesRoot(...) owner-witness-checked | |
getIdentitiesRoot(tokenId) | GetIdentitiesRoot(tokenId) view | |
verifyIdentitiesBinding(...) | VerifyIdentitiesBinding(...) Merkle-proof check | Off-chain claim verifier returns the proof |
Composition
- ERC-6239 — semantic SBT. Identity claims as RDF triples instead of opaque Merkle leaves.
- ERC-5375 — author + consent. Authors bind their cross-platform identity through identity-aggregated NFTs.
- ERC-4337 — account abstraction. Identity-aggregated NFT could control the smart account.
Migration Notes
For web3 social platforms:
- Off-chain service collects platform-issued identity claims, builds the Merkle tree, publishes the root to the NFT contract.
- Consumers verify specific identities via the Merkle proof + the platform's issuer signature.
- The NFT becomes a stable cross-platform reference — the address of the NFT contract + tokenId is the user's universal handle.
