All you need to know about ERC-6551 and Token Bound Accounts (TBA)

IntermediateNov 03, 2023
ERC-6551 is a proposal for the extension standard of ERC-721. Although it is still in its infancy stage, there have been many practical implementations and applications. This article will analyze its technical principles and application scenarios.
All you need to know about ERC-6551 and Token Bound Accounts (TBA)

What is ERC-6551?

ERC-6551 is a proposal for an NFT standard introduced on February 23rd by more than ten industry experts including Jayden Windle and Benny Giang. This proposal defines a system that assigns Ethereum accounts to NFTs. These accounts are called Token Bound Accounts (TBA), which allow NFTs to be bound to smart contract accounts, enabling them to own assets and interact with applications just like regular accounts, without modifying existing smart contracts or infrastructure.

Simply put, the original NFT standard is based on the ERC-721 standard and is a standard for creating unique digital assets on the Ethereum blockchain. Common forms include PFP, Pass Card, etc., which can only be transferred or owned. EIP-6551 allows NFTs to be bound to smart contract accounts, enabling NFTs to have more advanced features such as being able to store other regular NFTs and tokens, interact directly with Dapps, and function as a smart contract wallet.

Additional Information: EIP (Ethereum Improvement Proposal) is a series of improvement proposals for Ethereum, consisting of various types such as Core, Networking, Interface, ERC, Meta, and Informational. ERC, on the other hand, focuses on application-level standards and conventions, including proposals for contract standards and related extensions. The current ERC-6551 is still in draft status and may change in the future. Therefore, ERC-6551 can also be referred to as EIP-6551.

Who Created the ERC?

One of the initiators of ERC-6551, Benny Giang, was previously a team member of CryptoKitties and Dapper Lab. He also participated in the establishment of the ERC-721 standard and contributed to the development of projects such as Cheese Wizards and NBA Top Shot. In addition, he founded a software development and design company called Future Primitive. The rest of the proposal participants are also experienced experts in the industry.

Authors and Created Date of ERC-6551 (source: EIP)

How to Implement ERC-6551?

Before understanding the implementation process, it is necessary to understand two concepts:

Registry

In everyday life, the registry generally refers to the database that stores the settings information of the operating system and applications in a computer. In ERC-6551, it is used to standardize the specification and serve as a single entry point for querying account addresses bound to all tokens. It has two functions:

① Create a token bound account for the given address of an NFT.

② Compute the token bound account address for the given NFT.

Contract Account (CA)

It is a smart contract wallet that can receive NFTs, ERC20 tokens, or ETH and execute arbitrary transactions.

Implementation Process of ERC-6551 (source: ERC-6551 proposal)

The diagram above shows the basic schematic of ERC-6551. We will simplify the process description as follows:

  1. A user holding any ERC-6551-compatible token initiates registration.
  2. The registration contract of ERC-6551 reads the template contract code.
  3. The registration contract verifies the ownership of the NFT.
  4. A contract account that complies with the standard is generated.
  5. The user interacts with other protocols or completes other operations using the generated Contract Account address.

Although the process of ERC-6551 may be a bit technical for ordinary users, there is already a dedicated development tool called TokenBound for developers.

Tokenbound is an open-source toolkit centered around the ERC-6551 standard. One of its services is an account browser interface, which allows you to deploy ERC-6551 accounts and interact with others. If you are interested in deploying a Tokenbound account for your chosen NFT, you can follow these steps:

  1. Go to https://tokenbound.org and connect your wallet.
  2. Click “My NFT”.
  3. Select the NFT you want, then click the “Deploy Account” button.
  4. Confirm the deployment of the transaction with your wallet and wait for the transaction to be completed.
  5. You will now see the “Use Wallet” option in the dashboard of the selected NFT.

According to the official website of Tokenbound, there are currently 12.5k NFTs using ERC-6551, and over 1,400 operations have been completed on the EVM blockchain.

Note: The above operations are for educational discussion only. The safety of the Tokenbound contract cannot be determined 100% at the moment, so please be aware of the risks.

Related Technologies and Concepts

Regarding ERC-6551, it has certain correlations with technologies like ERC-721, SBT, AA, etc. Learning about these concepts can help us better understand the technical features and advantages of ERC-6551.

ERC-721

ERC-6551 is a standard built around the extension of ERC-721. The ERC-721 token standard allows developers to create non-fungible tokens (NFTs). “Non-fungible” means that each token has a unique value and serves as a verifiable, unique digital object. NFTs cannot be exchanged with each other like ERC20 tokens.

ERC-721 tokens are commonly used to represent ownership of an item on the blockchain, such as physical asset contracts, digital collectibles, and digital art. Additionally, due to their uniqueness, ERC-721 tokens cannot be exchanged with each other. In short, the creation of the ERC-721 standard aims to fulfill the Ethereum ecosystem’s need for token uniqueness.

SBT

The team also mentioned in the interview that the inspiration comes from SBT. SBT stands for Soulbond Token, which is a token bound to a user’s account or wallet and cannot be traded once generated. It can be used to represent commitments, qualifications, affiliations, etc., similar to a resume as a proof of social relationships in an application.

The main difference with ERC-6551 is that SBT relies on a new NFT that is bound, while ERC-6551 is an extension of the ERC-721 standard and is applicable to most ERC-721 standards.

AA

AA stands for Account Abstract, a technology based on the ERC-4337 protocol. It allows users to use smart contract wallets instead of traditional EOA wallets controlled by mnemonic phrases and private keys. By binding smart contracts to accounts, it abstracts away tedious daily operations and optimizes user experience, such as social account recovery, one-click cross-chain transactions, and batch transactions.

Since both combine accounts and smart contracts, many people tent to compare them. However, their innovations lie in different levels - one in at the account system level and the other in for the NFT standard. The former is more foundational to the industry, while the latter is more focused on NFT basics. Perhaps there will be more innovative points of integration between the two that will emerge in the future.

For more details about AA, please refer to the Gate Learn article.《Account Abstract and Hot It Works》

Application Scenarios of ERC-6551

Advantages of ERC-6511

Composability

Combining NFTs with smart contracts brings about more imaginative possibilities, and using NFTs as accounts can enhance their scalability. Additionally, since the assets stored within NFTs and the NFTs themselves are mutable, NFTs will become even more unique.

Programmability

Currently, the contract account is defined for asset transfers. However, due to its contract properties, it can support more custom operations in the future.

Ownership Separation

By holding NFTs as an account, it can solve the issue of previously exposing all assets once an EOA account is connected to a protocol, and it is more advantageous for account management.

Potential Use Cases

Based on the technical characteristics and advantages of ERC-6551, there are many potential use cases, such as:

  1. Inventory systems for items, apparel, and equipment (designed for games/metaverse)
  2. Community loyalty or reputation systems
  3. Minting or managing a basket of assets (artworks, collectibles, DeFi)
  4. Composable media structures (from song to song, art layer to painting, digital textile to clothing)
  5. New on-chain gaming mechanisms
  6. On-chain meme/derivative economies
  7. NFTs as access tools rather than wallets
  8. Enhancing NFTFi composability, like generating yield from NFT collateralization
  9. Authorizing accounts without transferring ownership
  10. Combining decentralized identities to create identity cards

Real-world Applications

Piggybank

Piggybank is a project from ETH Global Waterloo hackathon, which turns ERC-6551 NFT into a savings account, allowing users to directly deposit ETH into NFT. Once deposited, the only way to withdraw is to destroy the NFT, and the features change as more money is deposited. It’s currently on Goerli testnet only.

Source: https://testnets.opensea.io/collection/piggybanknft6551

As shown in the figure above, after depositing, the NFT will display the deposited amount, and not only tokens, but other NFTs can also be transferred. Piggybank mainly utilizes the binding account feature of ERC-6551, which supports asset transfer functionality. Currently, this project is still in demo status.

Lens Protocol

Lens Protocol is an open-source, composable decentralized social media protocol with high recognition in the Web3 domain. It tokenizes content and ownership, minting users’ profiles as Profile NFTs, which follow users, with the content also being minted as NFTs for sale to fans. In its V2, it utilizes ERC-6551 for a significant functionality upgrade.

Account Demonstration Using CryptoKitty. Source: Mirror of Lens Protocol

In Lens Protocol V2, ERC-6551 grants the capability to personal profile wallets, providing out-of-the-box support between personal profiles and the ERC-6551 token standard, reintroducing powerful composability. In V2, the value from “minting” and “collecting” can accumulate in personal profiles rather than their owner addresses, granting NFTs their own social relationships, voice, and monetization opportunities. For instance, a CryptoKitty can have a Lens profile, follow other CryptoKitties, and post content, creating its own value chain. Similarly, in the virtual gaming world Sandbox, you can purchase virtual land, and the land can have a Lens profile to open a mailbox and communicate with other virtual lands.

Challenges and Prospects

Challenges

Gaining support from existing NFT projects and platforms

Not all NFT projects adhere to the ERC-6551 standard, especially those not following the OwnerOf method, like CryptoPunks. This means some of the most popular and valuable NFTs cannot enjoy the token-bound account feature.

Technical Maturity

Due to technical or commercial reasons, some NFT platforms might not wish or be able to integrate with the ERC-6551 standard. Hence, ERC-6551 NFTs might not be immediately available to all collectors and creators.

Contract Security

ERC-6551 NFTs can own assets and interact with applications through smart contracts, making them attractive targets for hackers attempting to exploit vulnerabilities. Two security concerns are notable:

  • Fraud: Sellers could deceive buyers by selling NFTs claimed to contain ETH, then withdrawing the ETH after sale, leaving the buyer with an empty account.
  • Ownership Loop: A situation could arise where an NFT is placed into its own token-bound account (Token Bound Account), permanently locking the asset in an inaccessible state, forming an “ownership loop.”

Learning Curve

ERC-6551 requires a user-friendly and intuitive experience. It introduces new complexities and functionalities for NFTs, requiring users to elevate their understanding and awareness to utilize them effectively. For instance, users might need to learn how to create, access, manage, and transfer token-bound accounts and their assets.

Prospects

The integration of well-known Web3 protocols like Lens and attempts from various new projects have demonstrated the feasibility and composability of ERC-6551. At ETHGlobal Waterloo hackathon, out of 11 projects, 4 were related to it. However, these attempts also show that current applications of ERC-6551 are limited to basic asset storage and simple product trials like blind boxes. Many scenarios mentioned in the “Potential Use Cases” section earlier have not been realized yet.

While numerous scenarios are plausible, it’s wise to temper optimism. Initially, one of the concepts behind TBAs, SBT, garnered attention and ignited creative enthusiasm. However, the market has yet to witness mature and sustainable projects. Additionally, competition from akin technologies like AA also influences TBA technology’s market stance. Hence, the future of ERC-6551 hinges significantly on successful demonstrations of its use cases, fostering broader user acceptance

Conclusion

In common Web3 contexts, the connection between NFTs and DeFi, GameFi isn’t close, but with the advent of ERC-6551, binding NFTs with smart contracts has transformed NFTs from mere assets in an account to “sub-accounts,” capable of independently controlling assets and interacting with various Dapps. This is a significant change for NFTs, enhancing their utility in other Web3 domains. The current market attempts are merely technical preliminary trials or simple integrations, and we can anticipate more innovative application scenarios. Lastly, despite some risks and limitations, the attention it garnered even in its infancy is commendable and its achievements are worth recognizing

Author: Wayne
Translator: Sonia
Reviewer(s): Edward、KOWEI、Elisa、Ashley He、Joyce
* The information is not intended to be and does not constitute financial advice or any other recommendation of any sort offered or endorsed by Gate.io.
* This article may not be reproduced, transmitted or copied without referencing Gate.io. Contravention is an infringement of Copyright Act and may be subject to legal action.
Start Now
Sign up and get a
$100
Voucher!
Create Account