Unlocking the Potential of NFTs: ERC-6551 aka Token Bound Accounts
Jun 7, 2023
Since the introduction of the ERC-721 standard in 2017, NFTs have revolutionized the way we tokenize digital assets. NFTs have captured the imagination of creators and collectors alike. However, as the NFT space continues to evolve, developers are constantly seeking ways to make these digital assets more dynamic and interactive.
Enter ERC-6551, the latest Ethereum standard that is set to transform the NFT landscape. By introducing "token bound accounts," ERC-6551 creates a smart contract wallet for every ERC-721 NFT, unlocking a whole new realm of possibilities for blockchain-based digital assets.
In this article, we will explore how ERC-6551 enables token bound accounts, look into the exciting new use cases it brings to the world of NFTs show you how you can get started.
What is ERC-6551?
ERC-6551 is the Ethereum standard that facilitates token bound accounts. In simple terms, it creates a smart contract wallet for each ERC-721 NFT, establishing a direct link between the NFT and its associated smart contract account.
Developed by Future Primitive, an on-chain product studio led by Benny Giang and Steve Jang, this standard builds upon the Ethereum Improvement Proposal 6551 (EIP-6551).
A token bound account serves as an interface and registry for smart contract accounts owned by ERC-721 tokens. These smart contract accounts are customizable and can store assets and execute transactions.
Additionally, token bound accounts maintain an immutable record of all on-chain activities performed by the associated accounts. This transforms every NFT into a wallet that encompasses the complete ownership, transaction history, and utility of the asset.
The best part is that existing NFTs can seamlessly implement ERC-6551 without any fundamental changes, ensuring compatibility with the ERC-721 standard.
Token graph of ownership using ERC-6551
Why do we need token bound accounts?
You might be wondering why token bound accounts are necessary when ERC-721 NFTs have already paved the way for mainstream adoption and unleashed the potential of digital assets on the blockchain. While ERC-721 NFTs have their merits, they do come with certain limitations:
Limited provenance: Currently, NFTs primarily serve as proof-of-ownership for assets, whether they are stored on-chain or off-chain. Their utility is limited to establishing the link between the digital asset and its owner account.
Lack of composability: Traditional NFTs lack the ability to incorporate additional functionality on top of the asset. This restricts innovation and hinders the creation of more dynamic and interactive experiences.
Inability to act as on-chain agents: ERC-721 tokens are limited to representing identity and cannot independently interact with other on-chain assets or contracts.
Static JSON metadata: The static nature of JSON metadata recorded by ERC-721 tokens hampers flexibility in terms of maintaining Uniform Resource Identifier (URI) codes, security, and efficiency. It prevents the embedding of additional data or value into the token itself.
With the introduction of token bound accounts through ERC-6551, these limitations are overcome. NFTs can now transcend their static nature and become more versatile assets while retaining the advantages and compatibility of the ERC-721 standard.
How does ERC-6551 work?
Token bound accounts are essentially smart contract wallets that are owned by ERC-721 NFTs. However, the control of these accounts is delegated to the NFT owners. In other words, NFT owners can initiate on-chain actions using the token bound account on behalf of the NFT.
To enable token bound accounts, ERC-6551 leverages the power of smart contracts, particularly ERC-4337 and ERC-1167. The process involves two main functions within the Registry:
createAccount: This function deploys a token bound account for an ERC-721 token, utilizing an implementation address.
account: This function computes the address of a token bound account associated with a specific ERC-721 token.
Each token bound account is deployed as an ERC-1167 minimal proxy contract with immutable constant data appended to the bytecode. This approach allows for cost-effective deployment of clone contracts and reduces operational efforts by enabling one-time deployment of a proxy contract pointing to the same logic with new data instances for subsequent deployments.
The account interface defines the functions available for token bound accounts, including receiving Ether (ETH), executing calls, limiting execution permissions to the NFT owner, and granting execution permissions to non-owner accounts.
Furthermore, ERC-165 and ERC-1271 are used to standardize the token bound account interface and enable users to sign messages on behalf of a smart contract.
It's important to note that a single ERC-721 token can own multiple token bound accounts, each serving a specific purpose.
NFT can contain absolutely anything you would put into your normal wallet. ETH, USDC, ERC-20, ERC-721, ERC-1155, and any other tokens you would normally send to your Metamask, Ledger, etc.
Since every NFT is a Token Bound Account, there are no limits to how many tokens you may have nested in your NFTs, or how far down you go. If you want to put an NFT inside of an NFT inside of an NFT you can. When you transfer that NFT to someone else, everything inside automatically goes along with it. This opens up many new patterns of bundling NFTs together for trading, gaming, governance and more.
Use cases for ERC-6551
The possibilities of Tokenbound accounts are only limited by our imaginations. However, some clear use cases that have emerged are:
Token bound accounts enable enhanced composability for NFTs by bundling an ERC-721 token with its associated assets into a cohesive profile. This allows for the creation of versatile inventory systems capable of automating tasks like staking NFTs and collecting rewards. By bundling tokens and assets into a single token bound account, users can easily transfer assets and seamlessly switch between platforms, resulting in a more intuitive and user-friendly experience.
Fully on-chain identities
Token bound accounts empower NFTs to own wallets and associated assets, facilitating the creation of comprehensive on-chain identities and reputations. These NFTs can interact directly with decentralized applications (dApps), eliminating the need for intermediaries like external wallets. This opens up opportunities for behavioral economics-driven airdrops, loyalty programs, in-game rewards, and even credit ratings that can enhance lending protocols.
Token bound accounts have significant implications for gaming. By leveraging the composability enabled by ERC-6551, game developers can consolidate all in-game assets and related tokens into a player's character wallet. This integration streamlines the user experience, allowing for seamless asset transfers and enabling the creation of complex in-game user interfaces. Players can truly own their characters as ERC-721 NFTs and enjoy a more immersive and interactive gaming experience.
Other use cases
Community loyalty or reputation systems
Minting or curating baskets of assets (art, collectibles, DeFi)
Composable media structures (stems to songs, art layers to painting, digital textiles to garments)
On-chain meme/derivative economies
NFTs as onboarding vehicles instead of wallets
How to use NFT as a wallet
Each NFT already has an address that can be calculated using ERC-6551. You can view the tokens in your Token Bound Accounts at https://tokenbound.org/. You can think of this as a visual https://etherscan.io/.
An easy way to find out NFT address is to go to an NFT on https://opensea.io/ and replace opensea.io with tokenbound.org.
In the near future you will be able to use your NFT to log into, for example, uniswap.org. You will go to uniswap.org, click on wallet connect, generate QR code, copy it. Then you will go to your NFT on tokenbound.org and paste that. This functionality is still under development and will become more seamless in the future.
As adoption grows, Token Bound will push for further integration with wallet apps like Metamask, Rainbow Wallet, Coinbase and marketplaces like OpenSea, Zora and blur. Their SDK tools and documentation also make it easy for creators and developers to integrate this functionality directly into their own websites and apps.
The future of ERC-6551 and token bound accounts
Token bound accounts are revolutionizing NFTs, transforming them into dynamic, interactive assets with limitless possibilities. With the advent of account abstraction (ERC-4337) and the integration of token bound accounts, the web3 user experience is elevated to new heights.
Wallet providers and decentralized applications can now mint NFTs for users and create token bound accounts in the background, simplifying the onboarding process and eliminating the need for users to manage wallet creation or seed phrases.
This development propels the adoption and integration of NFTs, setting the stage for a future where blockchain-based digital assets seamlessly integrate into our everyday lives.