HomeEIPs
EIPsERC-5633
ERC-5633

Composable Soulbound NFT, EIP-1155 Extension

Add composable soulbound property to EIP-1155 tokens
StagnantStandards Track: ERC
Created: 2022-09-09
Requires: EIP-165, EIP-1155
HonorLabs (@honorworldio)
DiscussionsOriginal linkEdit
1 min read

The ERC-5633 proposal is an extension of EIP-1155 that proposes a smart contract interface for representing both soulbound and non-soulbound NFTs. Soulbound is a property of a token that prevents it from being transferred between accounts. This proposal provides a standard way to represent soulbound NFTs that can coexist with non-soulbound ones. Each token ID can have its own soulbound property. The proposal outlines an interface to EIP-1155 that allows wallet implementers and developers to check for the soulbound property of a token ID using EIP-165. The transfer function can only be called when the token is not soulbound. The motivation for this proposal is the increasing interest in soulbound NFTs similar to World of Warcraft's soulbound items. This proposal makes it easy to design composable NFTs for an entire collection in a single contract. The proposal includes sections on specification, rationale, backwards compatibility, test cases, reference implementation, security considerations, and copyright.

Video
Anyone may contribute to propose contents.
Go propose
Original

Abstract

This standard is an extension of EIP-1155. It proposes a smart contract interface that can represent any number of soulbound and non-soulbound NFT types. Soulbound is the property of a token that prevents it from being transferred between accounts. This standard allows for each token ID to have its own soulbound property.

Motivation

The soulbound NFTs similar to World of Warcraft’s soulbound items are attracting more and more attention in the Ethereum community. In a real world game like World of Warcraft, there are thousands of items, and each item has its own soulbound property. For example, the amulate Necklace of Calisea is of soulbound property, but another low level amulate is not. This proposal provides a standard way to represent soulbound NFTs that can coexist with non-soulbound ones. It is easy to design a composable NFTs for an entire collection in a single contract.

This standard outline a interface to EIP-1155 that allows wallet implementers and developers to check for soulbound property of token ID using EIP-165. the soulbound property can be checked in advance, and the transfer function can be called only when the token is not soulbound.

Specification

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.

A token type with a uint256 id is soulbound if function isSoulbound(uint256 id) returning true. In this case, all EIP-1155 functions of the contract that transfer the token from one account to another MUST throw, except for mint and burn.

// SPDX-License-Identifier: CC0-1.0 pragma solidity ^0.8.0; interface IERC5633 { /** * @dev Emitted when a token type `id` is set or cancel to soulbound, according to `bounded`. */ event Soulbound(uint256 indexed id, bool bounded); /** * @dev Returns true if a token type `id` is soulbound. */ function isSoulbound(uint256 id) external view returns (bool); }

Smart contracts implementing this standard MUST implement the EIP-165 supportsInterface function and MUST return the constant value true if 0x911ec470 is passed through the interfaceID argument.

Rationale

If all tokens in a contract are soulbound by default, isSoulbound(uint256 id) should return true by default during implementation.

Backwards Compatibility

This standard is fully EIP-1155 compatible.

Test Cases

Test cases are included in test.js.

Run in terminal:

cd ../assets/eip-5633 npm install npx hardhat test

Test contract are included in ERC5633Demo.sol.

Reference Implementation

See ERC5633.sol.

Security Considerations

There are no security considerations related directly to the implementation of this standard.

Copyright and related rights waived via CC0.

Further reading
Anyone may contribute to propose contents.
Go propose
Adopted by projects
Anyone may contribute to propose contents.
Go propose

Not miss a beat of EIPs' update?

Subscribe EIPs Fun to receive the latest updates of EIPs Good for Buidlers to follow up.

View all
Serve Ethereum Builders, Scale the Community.
Resources
GitHub
Supported by