ERC-6551: A New Token Standard for Smart NFTs

ERC-6551: A New Token Standard for Smart NFTs

Non-fungible tokens (NFTs) are unique digital assets that can represent anything from art to collectables, from gaming items to virtual land. NFTs are based on the ERC-721 standard, which defines a set of rules and functions for creating and transferring these tokens on the Ethereum blockchain. However, ERC-721 has some limitations that prevent NFTs from fully realizing their potential. For example, NFTs cannot own other assets, interact with smart contracts, or evolve over time based on user actions or external events.

ERC-6551 is a new token standard that aims to overcome these limitations and enhance the functionality and value of NFTs. ERC-6551 introduces the concept of token bound accounts (TBAs), which are smart contract wallets that are permanently associated with each NFT. TBAs allow NFTs to act as autonomous agents that can own and manage assets, execute arbitrary operations, and have their own on-chain identity. TBAs are compatible with existing ERC-721 tokens and can be created and accessed through a permissionless registry.

In this article, we will explain the motivation, design, and use cases of ERC-6551, and how it can transform the NFT space and beyond.

Motivation

The ERC-721 standard enabled an explosion of NFT applications and use cases, such as digital art, gaming, metaverse, and DeFi. However, ERC-721 also imposed some restrictions and challenges for NFT developers and users, such as...

  • Ownership: ERC-721 tokens can only be owned and transferred by Ethereum accounts, which are either externally owned accounts (EOAs) controlled by private keys, or contract accounts controlled by code. NFTs cannot own other assets, such as tokens or other NFTs, which limits their utility and composability.

  • Interaction: ERC-721 tokens can only interact with other smart contracts through the approval and transfer functions, which require the approval of the token owner. NFTs cannot initiate or execute arbitrary operations, such as calling other smart contracts, signing messages, or verifying signatures, which limits their functionality and interoperability.

  • Evolution: ERC-721 tokens are static and immutable, which means they cannot change or evolve over time based on user actions or external events. NFTs cannot store or update state, such as attributes, metadata, or history, which limits their expressiveness and provenance.

ERC-6551 aims to address these challenges and unlock new possibilities for NFTs by giving them smart contract capabilities and enabling them to function as smart contract wallets. By implementing this token standard, an NFT is assigned an Ethereum account, creating a token bound account. The TBA inherits all the properties and metadata of the original NFT, and also implements the EIP-1271 standard, which allows it to sign messages and verify signatures on behalf of the token. The TBA is controlled by the holder of the NFT, and can be used to own and manage assets, interact with smart contracts, and evolve over time.

Design

ERC-6551 is based on the Ethereum Improvement Proposal 6551 (EIP-6551), which was created by Future Primitive, an on-chain product studio led by Benny Giang and Steve Jang. The EIP-6551 defines a system that assigns Ethereum accounts to all NFTs, using a permissionless registry that is compatible with existing ERC-721 tokens.

The registry is a smart contract that acts as a factory and a directory for TBAs. Anyone can create a TBA for any ERC-721 token by calling a function on the registry and paying a small fee. The registry then deploys a proxy contract that acts as the TBA for the token. The proxy contract delegates all calls to a logic contract that implements the TBA interface and functionality. The logic contract can be upgraded by the registry owner, allowing for future improvements and bug fixes.

The TBA interface consists of two parts: the account interface and the execution interface. The account interface defines the functions for querying and managing the TBA, such as getting the token ID, the token contract, the token owner, and the chain ID. The execution interface defines the functions for executing operations on behalf of the TBA, such as transferring assets, calling smart contracts, signing messages, and verifying signatures.

The TBA is permanently bound to a single NFT, with control of the TBA granted to the holder of that NFT. The TBA can only be transferred along with the NFT, and cannot be separated or detached from it. The TBA can also only be accessed through the registry, which acts as a single point of entry and discovery for all TBAs.

Use Cases

ERC-6551 opens up a new world of possibilities for NFTs, enabling them to become more than just digital collectibles. Some of the potential use cases of ERC-6551 are:

  • Composability: TBAs can own and manage other assets, such as tokens or other NFTs, creating complex and composable NFTs. For example, a TBA can represent a character in a role-playing game that accumulates assets and abilities over time based on actions they have taken. A TBA can also represent a portfolio of NFTs, such as a collection of digital art or a bundle of virtual land.

  • Identity: TBAs can have their own on-chain identity, which can be used to interact with other smart contracts and applications. For example, a TBA can represent a membership card that grants access to an establishment and records a history of past interactions. A TBA can also represent a social media profile that can post messages and verify signatures.

  • Provenance: TBAs can store and update state, such as attributes, metadata, or history, which can be used to track and verify the origin and evolution of the NFT. For example, a TBA can represent a piece of art that changes its appearance or meaning based on external events or user inputs. A TBA can also represent a certificate of authenticity that can prove the ownership and provenance of the NFT.

  • Dependency: TBAs can execute arbitrary operations, such as calling other smart contracts, which can create dependencies and interactions between NFTs. For example, a TBA can represent a car that is composed of many fungible and non-fungible components, each with their own functionality and state. A TBA can also represent a liquidity position that depends on the price and supply of the underlying tokens.

    Challenges and Limitations

    ERC-6551 is a novel and innovative token standard that has the potential to revolutionize the NFT space and beyond. However, it also faces some challenges and limitations, such as...

    • Adoption: ERC-6551 is still in the early stages of development and adoption, and requires more testing and feedback from the community. It also requires more integration and support from existing NFT platforms and applications, which may have to adapt their interfaces and functionalities to accommodate TBAs.

    • Complexity: ERC-6551 adds a layer of complexity and abstraction to the NFT ecosystem, which may confuse or overwhelm some users and developers. It also introduces new security and usability risks, such as fraud prevention, ownership cycles, and gas costs, which have to be carefully considered and addressed.

    • Compatibility: ERC-6551 is compatible with existing ERC-721 tokens, but not with other NFT standards, such as ERC-1155 or ERC-998. It also may not be compatible with some future NFT standards or features, such as metadata standards, royalties, or upgrades, which may require further modifications or extensions.

      Conclusion

      ERC-6551 is a new token standard that enhances the functionality and value of NFTs by giving them smart contract capabilities and enabling them to function as smart contract wallets. ERC-6551 introduces the concept of token bound accounts, which are smart contract wallets that are permanently associated with each NFT. TBAs allow NFTs to act as autonomous agents that can own and manage assets, interact with smart contracts, and evolve over time. TBAs are compatible with existing ERC-721 tokens and can be created and accessed through a permissionless registry.

      ERC-6551 opens up a new world of possibilities for NFTs, enabling them to become more than just digital collectibles. Some of the potential use cases of ERC-6551 are composability, identity, provenance, and dependency. ERC-6551 is still in the early stages of development and adoption, and faces some challenges and limitations, such as adoption, complexity, and compatibility. However, it also has the potential to revolutionize the NFT space and beyond, creating new opportunities and value for NFT creators and users.

Thank you very much for reading, I genuinely appreciate you. I write and break down new topics in blockchain on twitter as well! To stay up to date follow me panditdhamdhere on Twitter! Happy coding.