Skip to content

Commit

Permalink
Creates EIP-5114: Soulbound Token (ethereum#5114)
Browse files Browse the repository at this point in the history
* Creates EIP-XXXX: Soulbound Token

* Updates EIP number

* Update eip-5114.md

* Update EIPS/eip-5114.md

Co-authored-by: Tim Daubenschütz <tim@daubenschuetz.de>

* Update eip-5114.md

* Update EIPS/eip-5114.md

Co-authored-by: KillariDev <kimi.ylilammi@statomaly.com>

* Update EIPS/eip-5114.md

Co-authored-by: KillariDev <kimi.ylilammi@statomaly.com>

* Update EIPS/eip-5114.md

Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>

* Update EIPS/eip-5114.md

Co-authored-by: William Schwab <31592931+wschwab@users.noreply.github.com>

* fixes double space after sentences

Per request by @lightclient

* Apply suggestions from code review

Co-authored-by: KillariDev <kimi.ylilammi@statomaly.com>

* Apply suggestions from code review

Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>

Co-authored-by: Tim Daubenschütz <tim@daubenschuetz.de>
Co-authored-by: KillariDev <kimi.ylilammi@statomaly.com>
Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com>
Co-authored-by: William Schwab <31592931+wschwab@users.noreply.github.com>
Co-authored-by: Sam Wilson <57262657+SamWilsn@users.noreply.github.com>
  • Loading branch information
6 people authored and nachomazzara committed Jan 13, 2023
1 parent ecdc484 commit c86d1b4
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions EIPS/eip-5114.md
@@ -0,0 +1,75 @@
---
eip: 5114
title: Soulbound Token
description: A token that is attached to a "soul" at mint time and cannot be transferred after that.
author: Micah Zoltu (@MicahZoltu)
discussions-to: https://ethereum-magicians.org/t/eip-5114-soulbound-token/9417
status: Draft
type: Standards Track
category: ERC
created: 2022-05-30
requires: 721
---

## Abstract
A soulbound token is a token that is bound to another Non-Fungible Token (NFT; e.g., a EIP-721 token) when it is minted, and cannot be transferred/moved after that.

## Specification
```solidity
interface IERC5114 {
// fired anytime a new instance of this token is minted
// this event **MUST NOT** be fired twice for the same `tokenId`
event Mint(uint256 indexed tokenId, address indexed nftAddress, uint256 indexed nftTokenId);
// returns the NFT token that owns this token.
// this function **MUST** throw if the token hasn't been minted yet
// this function **MUST** always return the same result every time it is called after it has been minted
// this function **MUST** return the same value as found in the original `Mint` event for the token
function ownerOf(uint256 index) external view returns (address nftAddress, uint256 nftTokenId);
// returns a censorship resistant URI with details about this token collection
// the metadata returned by this is merged with the metadata return by `tokenUri(uint256)`
// the collectionUri **MUST** be immutable and content addressable (e.g., ipfs://)
// the collectionUri **MUST NOT** point at mutable/censorable content (e.g., https://)
// data from `tokenUri` takes precedence over data returned by this method
// any external links referenced by the content at `collectionUri` also **MUST** follow all of the above rules
function collectionUri() external view returns (string collectionUri);
// returns a censorship resistant URI with details about this token instance
// the tokenUri **MUST** be immutable and content addressable (e.g., ipfs://)
// the tokenUri **MUST NOT** point at mutable/censorable content (e.g., https://)
// data from this takes precedence over data returned by `collectionUri`
// any external links referenced by the content at `tokenUri` also **MUST** follow all of the above rules
function tokenUri(uint256 tokenId) external view returns (string tokenUri);
}
```

## Rationale
### Immutability
By requiring that tokens can never move, we both guarantee non-separability and non-mergeability among collections of soulbound tokens that are bound to a single NFT while simultaneously allowing users to aggressively cache results.
### Content Addressable URIs Required
Soulbound tokens are meant to be permanent badges/indicators attached to a persona.
This means that not only can the user not transfer ownership, but the minter also cannot withdraw/transfer/change ownership as well.
This includes mutating or removing any remote content as a means of censoring or manipulating specific users.
### No Specification for tokenUri Data Format
The format of the data pointed to by `collectionUri()` and `tokenUri(uint256)` is intentionally left out of this standard in favor of separate standards that can be iterated on in the future.
The immutability constraints are the only thing defined by this to ensure that the spirit of this token is maintained, regardless of the specifics of the data format.

## Backwards Compatibility
This is a new token type and is not meant to be backward compatible with any existing tokens other than existing viable souls (like EIP-721 tokens).

## Security Considerations
Users of tokens that claim to implement this EIP must be diligent in verifying they actually do.
A token author can create a token that, upon initial probing of the API surface, may appear to follow the rules when in reality it doesn't.
For example, the contract could allow transfers via some mechanism and simply not utilize them initially.

It should also be made clear that soulbound tokens are not bound to a human, they are bound to a persona.
A persona is any actor (which could be a group of humans) that collects multiple soulbound tokens over time to build up a collection of badges.
This persona may transfer to another human, or to another group of humans, and anyone interacting with a persona should not assume that there is a single permanent immutable human behind that persona.

It is possible for a soulbound token to be bound to another soulbound token.
In theory, if all tokens in the chain are created at the same time they could form a loop.
Software that tries to walk such a chain should take care to have an exit strategy if a loop is detected.

## Copyright
Copyright and related rights waived via [CC0](../LICENSE.md).

0 comments on commit c86d1b4

Please sign in to comment.