Soulbound Tokens, the evolved form of NFTs

What are they? And what can we do with them?

Colin Kraczkowsky
8 min readFeb 10, 2023

What are soulbound tokens?

In summary, soulbound tokens (SBTs) are non-fungible tokens (NFTs) that, once minted to the individual, cannot be transferred or sold. So how did we get this definition?

The origination of soulbound tokens is popularly attributed to a blog post by Ethereum’s Vitalik Buterin which was then expanded on in a follow-up paper between Buterin and other contributors. In his blog, Buterin first describes the concept of “soulbound” as something that remains in the individual’s possession unable to be transferred or sold. Tracing the idea back to World of Warcraft game mechanics, Buterin notes that soulbound items in the game enter the player’s possession upon the completion of a hard or risky task. In the game this keeps things interesting , however the concept’s importance expands to blockchain as well where tools to minimize rent seeking behavior are always in vogue. Rent seeking behavior involves individuals providing minimal value as a whole but slowly accumulating capital to gain power and it is problematic for blockchain networks and game mechanics alike. As in game mechanics, this behavior is detrimental to blockchains as individuals provides little value over but slwoly accumulates capital and eventually just purchases the item. While for World of Warcraft this capital are items and this power are particulary potent items, for blockchain network capital is captured in tokens and power is conferred in monetary, governance, and other forms. So Buterin’s blog naturally transitions to talking about tokens, specifically non-fungible tokens (NFTs). He introduces cases in which the transferability of NFTs is illogical. For example, the proof of attendance protocol (POAP) where individuals are minted NFTs to prove they were present at a particular event. Some projects tried to utilize these POAP NFTs to provide exclusive opportunities which gave them monetary value which of course meant that a market quickly formed to sell them to the highest bidder. Now one of these NFTs is sitting in someone’s wallet for an event they never attended which ultimately defeats the purpose of the POAP.

So now we have the ingredients for the definition of soulbound tokens. They have the quality of uniqueness implicit in all non-fungible tokens with the tweak of being bound to the individual for cases where it doesn’t make sense for a unique token to change ownership. Additionally, it makes sense that SBTs are extensions of NFTs and not fungible ERC-20s as the definition of fungibility means these tokens are indistinct from one another and are meant to change hands, frequently.

How are soulbound tokens being used today?

Since soulbound tokens are unique and cannot be transferred between individuals, they have been initially used for identity and participation. One such use case is decentralized governance which has historically been plagued by an issue where holders of large shares of available tokens, colloquially referred to as “whales”, can accumulate an outsized influence over the direction of the protocol. Using SBTs to establish a one-token-one-vote strategy, means that these protocols can allow individuals with smaller holdings to have an equal say. One protocol taking an innovative approach in decentralized governance that incorporates SBTs is Optimism.

Optimism is a fast, stable, and scaleable L2 blockchain. It aims to be decentralized meaning that it will need a decentralized way to make decisions. To this end, the team has actively been experimenting with governance schemes. Optimism is governed by a collaboration between the Optimism Foundation (“the Foundation”) and the members of the Optimism Collective (“the Collective”). The core governing structure of the Collective is established as two co-equal chambers: the Token House and the Citizens’ House. The Token House is made up of holders of the OP token, an ERC-20 token similar to the COMP token, that was originally distributed to thousands of addresses that engaged in positive-sum, community-oriented behavior. The Citizens’ House is made up of holders of a soulbound token whose distribution is governed by the Foundation and Token House. The Token House is responsible for governing the protocol. The Citizens’ House is responsible for governing the distribution of “retroactive public goods funding”.

About RPBF — This is actually really interesting; like all blockchain networks, Optimism charges fees to process transactions, however, rather than distributing these fees directly to miners or stakers as rewards, Optimism puts those fees into a fund for public goods that have been retroactively determined to be beneficial to Optimism, Ethereum, and the Collective as a whole. This in itself is increasing access of funding to nonprofits, free, open-source software (FOSS), and public goods projects.

Using soulbound tokens Optimism has created multiple legislative bodies and the makings of a checks and balances system. If whales accumulating masses of OP tokens were to form in their ecosystem, their power would still be limited to decisions in just one of the legislative bodies. Additionally, since SBTs can’t be transferred, no marketplaces for these tokens will form thereby eliminating any incentive to seek profit from these tokens. Members of the Token House have a check on the Citizens’ House because they determine who is allowed to mint an SBT. Members of the Citizens’ House have a check on the Token House because they determine how the protocol’s treasury of collected gas fees gets distributed.

How can I see soulbound tokens in action?

I’ve found that the best way to see tokens in action is to write and deploy the smart contracts for them, so here is some code to write your own soulbound token:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract SoulBoundToken is ERC721, Ownable {
using Counters for Counters.Counter;

Counters.Counter private _tokenIdCounter;

constructor() ERC721("SoulboundToken", "SBT") {}

function safeMint(address to) public onlyOwner {
uint256 tokenId = _tokenIdCounter.current();
_tokenIdCounter.increment();
_safeMint(to, tokenId);
}

function burn(uint256 tokenId) external {
require(ownerOf(tokenId) == msg.sender, "Only the owner of the token can burn it.");
_burn(tokenId);
}

function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual override {
super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

require(from == address(0) || to == address(0), "This a Soulbound token. It cannot be transferred. It can only be burned by the token owner.");
}

function _burn(uint256 tokenId) internal override(ERC721) {
super._burn(tokenId);
}
}

To see this code in action, perform the following steps:

  1. Go to Remix IDE .
  2. In the File Explorer tab, create “SBT.sol” as a new file in the contracts folder, and copy/paste this code into SBT.sol (this code can also be found on my GitHub)
  3. Navigate to the Solidity Compiler tab and click “Compile SBT.sol” to compile the Solidity file into bytecode and an ABI
  4. Navigate to the Deploy & Run Transaction tab and change the Environment to “Injected Provider — MetaMask”
  5. In MetaMask, change your network to “Goerli test network”
  6. Back in the Deploy & Run Transaction tab, click “Deploy”, MetaMask will pop up to sign the transaction (if you need GoerliETH go to Alchemy’s Goerli Facuet)
  7. Interact with your newly deployed smart contract managing your soulbound tokens
    - Execute the safeMint function a new soulbound token to your MetaMask address
    - Check that you received the token by calling the ownerOf function with a tokenId of 0 and verifying that your address is in the response
    - Try to transfer the token using the safeTransferFrom function and see that it errors out with the message that we defined, “execution reverted: This a Soulbound token. It cannot be transferred. It can only be burned by the token owner.”

The code above demonstrates all the aspects of soulbound tokens that have been discussed. They are non-fungible tokens and inherit the properties and methods of these tokens. The two key differences being 1) we have overridden the _beforeTokenTransfer function of the NFT contract such that the token the soulbound token is unable to be transferred from the address and 2) we have overridden the burn function such that only the owner is able to destroy the soulbound token.

What could the future of soulbound tokens look like?

One dimension from which to view the future of soulbound tokens is to imagine the future use cases for the technology. In his blog, Buterin enumerates a few potential additional uses for soulbound tokens like driver’s licenses, university degrees, proofs of age, and vaccination records. There are also additional use cases within governance . In addition to whales, another problem that token project’s face with respect to governance is participation. Despite all kinds of incentives that project’s deploy to encourage all holders to vote, it remains true that only a fraction actually do. But if all participants are holding a soulbound token then could we enable additional incentives based on certain conditions being met? For example, if a proposal in Optimism is close to expiring and only 1% of soulbound token holding wallets that also hold less than 100 OP have voted then could these wallets become eligible for some sort of voting reward, e.g. free gas or a portion of gas fees for a particular period? The specific mechanics and tokenomics obviously need to be fleshed out in more detail, but we can see that the benefits of having a token available only to a specific wallet having performed a specific action enables use cases where we can 1) trust the attestations of the wallet, 2) better identify characteristics of the wallet by its actions, and 3) provide further incentives for this wallet.

A second dimension is to explore how the existing technology could evolve. What will be interesting to see in the future is how soulbound tokens will evolve as we have seen non-fungible tokens evolve. As we saw in the code above, SBTs are a subset of NFTs: smart contracts initialized with metadata of attributes. This metadata can be updated based on certain criteria being met. For example, we have seen NFT artwork where the image changes based on the time of the day. As we play around with soulbound tokens, we could see use cases like driver’s license SBTs expand. Imagine a young driver being granted a “Driver’s License” soulbound token with an attribute with a trait_type of status and value of beginner and a second trait_type of points with a value of 0 where, after they have successfully attested to certain qualifications, status automatically advances to intermediate. Adversely, if they get into a fender bender points changes to 2 and status to supervisory.

A third dimension is to think about how soulbound tokens can integrate with other technologies. One example from Buterin is how soulbound tokens can integrate with zero-knowledge technology. There are cases where it is desired an individual holding an SBT may not want the details of the token to be publicly available, e.g. vaccination records. In this case, if the individual was interacting with a smart contract where knowledge of the their vaccination was required then the individual could provide a zero-knowledge proof that proves the validity of their attestation about being vaccinated without requiring the smart contract direct-read access to the individual’s vaccination records.

In summary, the future of non-transferable, non-fungible tokens is bright and will be an exciting place to keep an eye on as use cases and the technology mature.

--

--

Colin Kraczkowsky

Problem solver wielding JavaScript and Solidity as my tools. Scholar of the newly possible.