ERC-6551 Token Bound Accounts: Future of NFTs is Here!

ERC-6551 Token Bound Accounts: Future of NFTs is Here!

Intro

The introduction of NFTs was a turning point in Ethereum history that enabled asset tokenisation. NFTs (ERC-721), unlike ERC-20 tokens, are non-fungible: they have unique metadata, allowing developers and artists to create one-of-a-kind assets.

However, aside from owning and collecting NFTs, there was little else you could do with them. Token Bound Accounts (TBAs) proposed by ERC-6551 are about to change this. In this article, I will explain how the new technology works and what applications it has in the Ethereum ecosystem.

ERC-6551

The aim of ERC-6551 is to provide NFTs with smart contract wallet capabilities. It was proposed by 15 researchers representing organisations such as Manifold and Future Primitive, among others.

This proposal establishes a system for assigning Ethereum accounts to any NFT. This allows NFTs to own assets and interact with dApps in the same way that other accounts can.

This may be done in a completely backwards compatible manner, with no changes required to existing NFT contracts. The sole requirement is the deployment of an account. Each account is permanently linked to a single NFT, with control assigned to the holder of that NFT.

Account access is validated by confirming the ownership of the NFT to which it is linked to. If an NFT is transferred to another address, ownership of the account is automatically transferred with no additional processes. This saves users a lot of gas expenses because each asset would otherwise have to be transferred individually.

Technical Details

The 6551 account is a smart contract wallet. Unlike EOAs, smart contract wallet transactions can be gas subsidised, batched, and much more. They also work with current ERC-4337 Account Abstraction infrastructure, such as Pimlico.

The account address is deterministic, which means that it can be predicted prior to the smart contract's deployment. As an example, protocols can airdrop assets to 6551 account addresses even if they have not yet been deployed.

Token-bound account owners can utilise EIP-1271 to sign transactions, messages (e.g., dApp terms of service), and structured data (e.g., governance votes). dApps and Ethereum tools can validate them with the isValidSignature(hash, signature) function; however, current dApps will most likely need to add support for EIP-1271 first, either by updating to modern tooling or adding manual verifications. Viem supports EIP-1271 out of the box - verifyMessage just needs to be called from its publicClient.

To conduct a transaction on behalf of an account, the execute() function just has to be called with the operation's target address, Ether value, calldata, and operation id.

Contract Structure

Registry is a contract that serves as a database for token bound accounts and associated NFTs. It also allows users to create their own token bound accounts. It is totally permissionless, has no owner, and is deployed to a deterministic address across chains.

Accounts are actually two on-chain contracts: a proxy and an implementation. ERC-1167 basic proxy stores the general data of a token bound account, such as salt, chain ID, and token contract address, and gives developers complete flexibility by allowing for different implementations.

Potential Applications

Given its qualities, ERC-6551 can be used by protocols and users in a variety of use scenarios to serve as:

For Protocols

  • In-game characters with gold (ERC-20 tokens) and armour/weapons (NFTs);

  • Loyalty cards that collect points for activity;

  • NFTs composed of other NFTs, such as avatar reflecting clothing;

  • Social media specialised accounts holding postings and comments on NFTs.

For Users

  • Gift card-like accounts;

  • Separate investment accounts;

  • Dedicated accounts for holding certain NFT collections (e.g. a dedicated POAP bag).

Adoption

Although ERC-6551 is still being peer reviewed, over 50,000 token bound accounts have already been deployed across EVM networks.

Lens introduced Profiles V2, allowing to use NFTs as profiles on the platform.

TokenBound developed opinionated 6551 Contracts and a JavaScript SDK to improve developer experience.

Apoorv Lathey's AAbstractor allows users to log in to dApps using their 6551 account via WalletConnect or an iFrame.

Station Labs offers an API for deploying 6551 accounts, automatic gas subsidisation via Gas Pass, and Portal, a wallet-like experience that allows users to sign in to dApps using their 6551 accounts.

Outro

The ERC-6551 standard represents a significant step forward in the evolution of NFTs, opening up a plethora of new potential applications in a variety of fields. However, the long-term viability and adoption of this new technology remain uncertain, and we must wait to see if the enhancements introduced by ERC-6551 can sustainably boost NFT adoption and utilisation over time.