ERC-5516 · Final · ERC · 2022-08-19
ERC-5516: Soulbound Multi-owner Tokens
Non-transferable credentials issued to many addresses in one call, with deterministic issuer-bound token IDs and holder-only renunciation, for certificates, attendance badges and audit records.
What problem does it solve?
Soulbound (account-bound) tokens are meant to represent things you can't sell, such as a degree, an audit or event attendance. Two practical problems come up:
- Cost and structure. Issuing the same credential to a whole class means minting one token per person, often from a separate contract per credential.
- Key loss. If the one account holding a non-transferable token is lost or rotated, the credential is lost with it.
ERC-5516 takes the multi-token idea from ERC-1155 and applies it to soulbound tokens. One tokenId represents one credential, and many addresses can hold it. It is issued to a list of recipients in a single transaction. A person can hold the credential on several addresses, or on a multisig, to guard against key loss.
How it works
| Function | Purpose |
|---|---|
issue(recipients[], metadataURI) |
Create a credential, or re-issue it to a new cohort |
renounce(tokenId) |
Holder permanently gives up their copy |
has(who, tokenId) / hasRenounced(who, tokenId) |
Ownership and renunciation checks |
issuerOf(tokenId) |
Original issuer |
uri(tokenId) |
Metadata URI (ERC-1155-style {id} substitution) |
deriveTokenId(issuer, metadataURI) |
Deterministic ID |
Key rules:
- Deterministic, issuer-bound IDs.
tokenIdis derived from(msg.sender, metadataURI). The recommended form isuint256(keccak256(abi.encodePacked(issuer, metadataURI))). The same issuer with the same URI always gets the same ID, so a second call toissueadds a new cohort to the same credential. Someone front-running the call would get a different ID, because their address is different. - Only the original issuer may re-issue.
uri(tokenId)is fixed at first issuance and can never change. - Atomic issuance. If any recipient already holds the credential or has renounced it, the whole call reverts.
- Renouncing is final for that
(address, tokenId). The issuer can never attach that credential to that address again. - No issuer revocation in the base interface. Only the holder can remove their own binding.
- One
Issuedevent per call, listing only that call's recipients, and oneRenouncedevent per renounce. ERC-165 interface ID:0x85a5f87c.
Sample code
Issuing to a cohort and verifying a credential (ethers v6):
import { Contract, solidityPackedKeccak256 } from "ethers";
const sbt = new Contract(sbtAddress, [
"function issue(address[],string) returns (uint256)",
"function deriveTokenId(address,string) view returns (uint256)",
"function issuerOf(uint256) view returns (address)",
"function has(address,uint256) view returns (bool)",
], issuerSigner);
const metadataURI = "ipfs://<cid>/knows-python.json";
await (await sbt.issue([alice, bob, carol], metadataURI)).wait();
// Verifier: know the contract AND the issuer out of band, then check
const id = await sbt.deriveTokenId(expectedIssuer, metadataURI);
// (equals BigInt(solidityPackedKeccak256(["address","string"], [expectedIssuer, metadataURI])) if the recommended derivation is used)
const ok = (await sbt.issuerOf(id)) === expectedIssuer && (await sbt.has(alice, id));
Things to know
- Status: Final.
- Verify the issuer, not the metadata. Anyone can issue a token with copied metadata under their own address. Check
issuerOfagainst an issuer address you got from a trusted source, and get the contract address from a trusted source too. A malicious contract can return any values it likes. - If an implementation builds
uri()from a base URI plusmetadataURI, verifiers must derive the ID from the originalmetadataURI, not from whaturi()returns. - To correct metadata, issue a new credential with a new URI. The old one cannot be edited.
- Related soulbound designs: ERC-5192 (minimal lock flag on ERC-721), ERC-5484 (consensual burn rules), ERC-4973 (account-bound tokens).