Reverse Mapping NFT Ownership With ERC-6551
Tags: nft, ipfs, blockchain, erc6551
Published: 2023-09-07 18:11:38

Pinata has been at the forefront of NFTs since 2018, always looking for how they may evolve and adapt into their next cycle. Lately, [our focus has turned to ERC-6551 Token Bound Accounts](https://www.pinata.cloud/blog/a-new-era-erc-6551-and-token-bound-accounts-tbas). In simplest terms, ERC-6551 is a new Ethereum proposal that can create wallets called Token Bound Accounts (TBAs) for existing ERC-721 NFTs. With it, an NFT can own other NFTs, tokens, cryptocurrency, and even sign transactions. 

ERC-6551 is already making a splash in the Web3 Developer ecosystem and there are plenty of projects taking advantage of this unique standard. [Some of them are using the standard to create dynamic NFTs where the items held by the NFT determine it’s main appearance](https://tokenbound.org/assets/ethereum/0x26727Ed4f5BA61d3772d1575Bca011Ae3aEF5d36/1). The use cases we’ve seen inspired us to create Tokengraph.cloud, a web app that allows users to track the connections between TBA’s and the assets they own.

## Concept for [Tokengraph.cloud](http://Tokengraph.cloud)

Before we had the idea for this app, we made a separate one to experiment with ERC-6551. That app is called [Pinatabound](https://pinatabound.com), an easy way to demonstrate and interact with TBAs. It lets you connect your wallet, create a TBA for your NFT, then send assets to that TBA for Pinatabound to display. 

{% embed https://youtu.be/VvlCASPX44U %}

We built it using the [Tokenbound SDK](https://docs.tokenbound.org/sdk/installation) which made it pretty easy to create a TBA for any designated NFT. [We wrote a tutorial on how you can do something similar here](https://www.pinata.cloud/blog/erc-6551-token-bound-account-for-nft). A week or two after we built it, there was an update to the SDK that released a new method called `getNFT`. This method would take in a TBA address, then tell you what NFT owns that TBA. 

This exercise gave us an idea. What could we do with this method and a single address? 


![Preview of tokengraph.cloud](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mm5zpuozd12kx5r0xi12.gif)

This was the start of Tokengraph.cloud, where we take in a single TBA address and then map out any assets it might own, what NFT owns it, and then what wallet owns that NFT. We combined that data with a [React Flow library](https://reactflow.dev/) that allows the user to tangibly move around different assets to see the connections. At the time of this article the app can accept Ethereum Mainnet or Goerli TBA addresses, but it proves an important concept behind ERC-6551 and the future of NFTs. 

## Implications of ERC-6551

[Tokengraph.cloud](http://Tokengraph.cloud) revealed how deep ERC-6551 could go and how many different industries it could effect. Before this standard, the relationship between a token and the owner was limited. You could go one step in a vertical motion, and perhaps see other tokens in a linear view. Now with ERC-6551, this movement of data can now infinitely spread in all directions. The mind blowing part of TBAs is that you can nest them. The Pinnie NFT can own a fiesta NFT, and that NFT could own a happy cloud NFT, and so on and so forth. This results in an infinite graph of data that could apply to any industry; from payments to advertising to loyalty point systems. A data profile that is tied to a unified source of truth, the blockchain, along with immutable off-chain storage like IPFS, expanded by an ever expanding web of connections through ERC-6551. We’re excited to see what can be built with this standard and how we can be in the middle of it all with developer friendly IPFS services. 

Happy pinning!