---
eip: 6551
label: ERC-6551
title: Non-fungible Token Bound Accounts
status: Review
type: Standards Track
category: ERC
created: 2023-02-23
requires: 165, 721, 1167, 1271
official: https://eips.ethereum.org/EIPS/eip-6551
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-6551.md
canonical: https://eips.huatuo.xyz/eip-6551/
lang: en
tldr: Gives every NFT its own smart contract account, at a deterministic address from a singleton registry, so the NFT can hold assets and act on-chain while control follows whoever owns the token.
tags: [nft, account, token-bound-account, tba, erc-721]
---

# ERC-6551: Non-fungible Token Bound Accounts

> An interface and registry for smart contract accounts owned by non-fungible tokens

**TL;DR:** Gives every NFT its own smart contract account, at a deterministic address from a singleton registry, so the NFT can hold assets and act on-chain while control follows whoever owns the token.

## What problem does it solve?

An [ERC-721](/eip-721/) token can be owned, but it cannot *own* anything or *do* anything. That makes it hard to model things like:

- a game character that accumulates items and currency over time,
- a car made of many components,
- a portfolio of tokens that should be sold as a single unit,
- a membership card that records its history of interactions.

ERC-6551 gives each NFT an Ethereum account of its own, a **token bound account (TBA)**. Whoever holds the NFT controls the account. Sell the NFT and everything inside the account goes with it. Crucially, this works for **existing** NFTs without any change to their contracts.

## How it works

**Singleton registry.** A permissionless, ownerless registry is deployed at the same address on every chain, `0x000000006551c19487814612e58FE06813775758`, via Nick's deterministic deployment factory. It has two functions:

- `account(implementation, salt, chainId, tokenContract, tokenId)` – compute the TBA address.
- `createAccount(...)` – deploy it with `CREATE2`; returns the existing address if already deployed, and emits `ERC6551AccountCreated`.

Because addresses are deterministic, a TBA exists **counterfactually**: it can receive assets before it is deployed.

**Account bytecode.** Each TBA is an [ERC-1167](/eip-1167/) minimal proxy to an `implementation`, with `salt`, `chainId`, `tokenContract` and `tokenId` appended as constant data. Different implementations or salts give the same NFT different accounts, so one NFT may have several TBAs.

**Account interface** (ERC-165 ID `0x6faff5f1`):

- `receive()` – accept ETH.
- `token()` – returns `(chainId, tokenContract, tokenId)`; must never change.
- `state()` – a value that should change whenever the account changes state.
- `isValidSigner(signer, context)` – returns `0x523e3260` if `signer` may act; by default the NFT's holder.

Accounts must also support [ERC-1271](/eip-1271/) signature checks and expose at least one execution interface detectable via ERC-165. The optional `IERC6551Executable` (`0x51945447`) defines `execute(to, value, data, operation)` with operations `0 = CALL, 1 = DELEGATECALL, 2 = CREATE, 3 = CREATE2`.

## Sample code

Finding, creating and using an NFT's account (ethers v6):

```ts
import { Contract, ZeroHash, parseEther } from "ethers";

const REGISTRY = "0x000000006551c19487814612e58FE06813775758";
const registry = new Contract(REGISTRY, [
  "function account(address,bytes32,uint256,address,uint256) view returns (address)",
  "function createAccount(address,bytes32,uint256,address,uint256) returns (address)",
], nftHolder);

const { chainId } = await provider.getNetwork();
const args = [accountImpl, ZeroHash, chainId, nftContract, tokenId] as const;

const tba = await registry.account(...args);      // works before deployment
await (await registry.createAccount(...args)).wait();

// The NFT holder makes the TBA send 0.1 ETH (operation 0 = CALL).
const acct = new Contract(tba, [
  "function execute(address,uint256,bytes,uint8) payable returns (bytes)",
], nftHolder);
await (await acct.execute(recipient, parseEther("0.1"), "0x", 0)).wait();
```

## Things to know

- **Status: Review.** The document is not yet Final, so details may still change.
- **Sale fraud:** a seller can drain the TBA just before a buyer's offer fills. Marketplaces should bind orders to the account's `state()` or to committed assets; the standard leaves this to them.
- **Ownership cycles:** sending an NFT into its own TBA (or any loop of TBAs) locks the NFT and everything in the account permanently.
- Only the account implementation needs to be trusted; the registry is immutable. Check which implementation a TBA uses before depositing.
- TBAs can also act as [ERC-4337](/eip-4337/) smart accounts if the implementation supports it. Compare [ERC-6059](/eip-6059/), which nests NFTs directly inside other NFTs.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-6551
