Coinbase Unlocking the Future of NFTs – Exploring ERC-6551 Token-Binding Accounts

Original Title: Unlocking the future of NFTs: exploring ERC-6551 Token Bound Accounts

Original Author: LianGuaitrick Hughes

Original Source: coinbase

Translation: Kate, Marsbit

Tl;dr: Token Bound Accounts (TBA) add additional utility to new and existing NFTs by equipping them with smart wallets. TBAs can be used to receive funds or other NFTs, reduce operational costs for portfolios, and provide provenance for goods such as coffee. Deploy your NFT and Token Bound Accounts on Base with our official guide.

In the world of blockchain and cryptocurrency, innovation never stops. New ideas emerge constantly, aiming to change the landscape and make it more universal, secure, and applicable than ever before. One such innovation is ERC-6551, a groundbreaking proposal introduced by Benny Giang and Future Primitive, which introduces the concept of Token Bound Accounts (TBA). In this blog post, we will explore the world of ERC-6551, unveiling its potential and applicability for enterprise operators, developers, and cryptocurrency enthusiasts.

ERC-6551 and Smart Wallets

Smart wallets are at the core of ERC-6551’s innovation. Unlike traditional externally owned accounts (EOAs) controlled by private keys, smart wallets are contract-based accounts with programmable functionalities. These smart wallets can store and manage assets, making them the perfect companion for non-fungible tokens (NFTs), also known as ERC-721 tokens. With ERC-6551, NFTs gain an exciting new dimension through their association with these smart wallets.

When NFTs are equipped with smart wallets, a new realm of possibilities arises. These Token Bound Accounts not only store assets and facilitate transactions but also provide an immutable on-chain history of the NFT’s journey. Just like heirlooms carry a rich and often recorded history, NFTs with smart wallets possess inherent, immutable records of ownership, transactions, and utility. This notable feature captures the essence of provenance, ensuring that the on-chain activities of NFTs are transparent and traceable.

This provenance of ownership is directly related to real-world goods such as coffee, clothing, and artwork. ERC-6551 captures these real-world relationships and transforms them into the digital realm. With every interaction and transaction recorded on the blockchain, the journey of an NFT becomes an immutable narrative, adding depth and authenticity to its identity. This innovation allows NFTs to transcend mere tokens and assume roles as unique and traceable entities. While on-chain records show today’s buy, sell, and mint activities of an NFT, they do not provide a comprehensive view of the NFT’s journey, especially in the context of interactions with other assets or smart contracts. In contrast, the on-chain history of a smart wallet documents the interactions happening within the wallet, reflecting the utility and engagement of the NFT beyond mere transfers. This means you can see how it interacts with other tokens, executes transactions, or interacts with decentralized applications (dApps).

Similarities between NFTs, Smart Wallets, and the Real World

In the rapidly developing field of blockchain technology, the combination of NFTs, smart wallets, and their owners has given birth to real-world analogues that go beyond the industry and redefine ownership structures. Consider a family office – a stable entity managing a diversified investment portfolio including real estate, stocks, bonds, and other valuable assets. Traditionally, such portfolios require complex transactions and interactions, each requiring meticulous orchestration. The innovation of Token Bound Accounts (TBAs) – a revolutionary concept supported by the ERC-6551 standard – seamlessly connects affiliated NFTs to a single overarching NFT, introducing a new way to manage and transact assets. This concept leverages the inherent interoperability of blockchain, facilitating the rapid integration of innovative protocols. By adhering to the immutable code-as-law principles of blockchain, ERC-6551 opens the door for NFTs to accept tokenized assets. By conforming to ERC standards, any asset that complies with ERC token specifications can be considered as such, expanding the potential of this groundbreaking technology.

In the realm of tokenized real-world assets, a transformative advantage has emerged for investors who frequently manage different asset portfolios such as real estate, stocks, bonds, and physical assets. The innovation of Token Bound Accounts brings a new level of efficiency, rather than the complex process of individually selling each asset. Imagine having an ERC-721 token that aggregates several other ERC-721 tokens, each representing different assets. This consolidation of ownership simplifies the process, allowing the entire investment portfolio to be sold through a single NFT. For example, a family office can now offer an NFT that represents their holdings of a series of tokenized real-world assets, from real estate to stocks, enabling seamless transactions, efficient settlements, and increased liquidity. The elimination of intermediaries, shortened transaction times, and improved transparency drive this transformation, opening the doors to broader participation and reducing barriers to entry. This approach democratizes investment opportunities, making previously inaccessible assets more easily available to a wider range of investors. As ownership patterns evolve, the integration of tokenized assets into powerful NFTs brings dynamic transformations to the management, trading, and diversification of investment portfolios.

Creating and Controlling Token Bound Accounts

Creating a Token Bound Account involves several fundamental steps. As we transition from theory to practice, let’s explore each step through code snippets. The code example below provides a glimpse into the process, but for the complete source code and detailed deployment scripts, please visit the Base Guides GitHub page.

Step 1: Minting Your Unique NFT

Before diving into TBA, you need an ERC-721 token, commonly known as an NFT. This unique digital asset represents ownership of a unique item, whether it be artwork, a collectible, or a game character. You can create and mint your own ERC-721 tokens using a suitable platform or library like OpenZeppelin.

Here is an example of using the OpenZeppelin ERC721 contract to mint ERC-721 tokens. This contract can be used online in an IDE or on a local computer:

Step 2: Create and Deploy Registry

The core of ERC-6551 is a decentralized registry, which functions somewhat like a virtual art gallery curator, but without the limitations of physical space or exclusive invitations. Imagine NFTs establishing their own identity and ownership through a permissionless and trustless process. This registry establishes an unbreakable connection between NFTs and their smart wallets, much like a driver’s license issued by the DMV. The key difference is that the ERC-6551 registry is completely permissionless and decentralized, allowing users to interact without intermediaries. The registry revolutionizes the landscape of NFTs by closely linking them to their associated token-bonded accounts, much like how the internet revolutionized communication.

Surprisingly, due to this registry, ERC-6551 is backward compatible, allowing existing ERC-721 tokens created prior to this proposal to have the ability to possess their own TBA. It’s like opening a door to enhanced ownership for traditional NFTs, injecting them with new vitality. This compatibility bridges the gap between the past and the future, allowing the old and the new to coexist harmoniously within the scope of ERC-6551.

The “createAccount” function in the provided example ERC6551Registry contract facilitates the creation of TBA by deploying a smart wallet with the specified parameters.

By combining these parameters and hashing them using ‘Create2’, the function calculates the address of the TBA. The ‘_creationCode’ function generates bytecode for the smart wallet using the provided parameters. After creating the TBA, the function emits an ‘AccountCreated’ event containing relevant information about the newly created TBA.

Here is a snippet of the registry contract:

Step 3: Deploy Smart Wallet

Deploying a smart wallet is like setting up a personal bank account for your NFTs. Just like you choose a bank to manage your funds, deploying a smart wallet assigns a contract to manage your NFTs. Smart wallets act as guardians of your digital assets, equipped with basic interfaces for interaction and verification. They authorize NFT owners to perform transactions, unlocking the full potential of their assets. In short, this contract enables the functionality of token-bonded accounts.

Here is a simplified code snippet of the smart wallet contract:

Step 4: Calculate the Token Binding Account Address

After preparing the ERC-721 tokens and smart wallet, it is time to calculate the TBA address for each NFT. This address serves as the unique identifier for the interaction between the NFT and the blockchain. Here, NFTs can airdrop new tokens (ERC-20, ERC-721, etc.), send Ether, or view their transaction history on block explorers like Basescan.

To learn more about how to implement ERC-6551, including deployment scripts, please visit the Base Guides GitHub.

Embrace the Future with ERC-6551

In the ever-evolving field of blockchain technology, ERC-6551’s TBA demonstrates the power of innovation. With the fusion of smart wallets and NFTs, a new dimension of ownership is created with limitless potential applications. From democratized investments to preserving origins and histories, ERC-6551 opens the door to a world where NFTs are not just tokens, but living entities with stories to tell. As entrepreneurs, developers, and crypto enthusiasts, you have the opportunity to be at the forefront of this revolutionary change. Explore the code repositories provided on the Base Guides GitHub and become part of the movement shaping the future of NFTs. Embrace the power of token binding accounts and embark on a journey of breaking innovation boundaries and unlocking new possibilities. Together, we are charting a path towards a more interconnected, transparent, and exciting digital era.

Like what you're reading? Subscribe to our top stories.

We will continue to update Gambling Chain; if you have any questions or suggestions, please contact us!

Follow us on Twitter, Facebook, YouTube, and TikTok.

Share:

Was this article helpful?

93 out of 132 found this helpful

Gambling Chain Logo
Industry
Digital Asset Investment
Location
Real world, Metaverse and Network.
Goals
Build Daos that bring Decentralized finance to more and more persons Who love Web3.
Type
Website and other Media Daos

Products used

GC Wallet

Send targeted currencies to the right people at the right time.