ERC-5633 Composable soulbound NFT (Composable Soulbound NFT, EIP-1155 Extension)
Stagnant · NFTs & multi-token · created 2022-09-09
Allows transferability (soulbound or not) to be specified per token ID within a single ERC-1155 contract, so transferable and non-transferable tokens can be handled together.
Why it is needed
ERC-1155 can manage multiple token types within a single contract, but there is no standard way to mark or check that only certain token types are non-transferable (soulbound). For cases like game items, where only some of thousands of token types need to be bound to an account, without such a standard each project ends up implementing transfer restrictions differently. This means wallets or marketplaces cannot know in advance which token IDs are transferable, leading to failed transfer attempts or requiring each contract's implementation to be analyzed individually.
What to implement
event Soulbound(uint256 indexed id, bool bounded);: An event emitted along with the bounded value when token ID id is set as soulbound or has that status removed.function isSoulbound(uint256 id) external view returns (bool);: Returns true or false for whether token ID id is soulbound.
In depth
Determining soulbound status and blocking transfers
Whether token ID uint256 id is soulbound is determined by whether isSoulbound(id) returns true. For token types determined to be soulbound, all ERC-1155 functions that transfer tokens between accounts MUST throw. However, minting and burning are exceptions to this restriction, and are possible even for soulbound tokens.
Structure of the IERC5633 interface
This standard defines only two things: the Soulbound event and the isSoulbound function. The Soulbound event is emitted when the soulbound status of token ID id is set to or cleared from the bounded value. The isSoulbound function is a view function that queries whether the given token ID is currently soulbound.
EIP-165 support requirement
A smart contract implementing this standard must implement the supportsInterface function of EIP-165 and must return true when 0x911ec470 is passed as the interfaceID argument. This lets wallets or other contracts detect in advance whether this token contract supports the soulbound property.
Rationale for the default value design
Explains that if all tokens in a contract are soulbound by default, isSoulbound(uint256 id) should return true by default without any separate configuration in the implementation. This is a default behavior guideline for implementing a contract that keeps every token ID soulbound.
Backward compatibility with ERC-1155
This standard is fully compatible with ERC-1155. It is an extension that keeps existing ERC-1155 functions and events unchanged while only adding the Soulbound event and the isSoulbound function.
Proposal status: Stagnant
This proposal is currently in Stagnant status, with no further discussion ongoing. Its content may be changed or discussion may resume.