ERC 6551 is an Ethereum Improvement Proposal that gives every NFT a unique wallet address, enabling NFTs to own assets, interact with dApps, and participate in the Ethereum ecosystem as self-sovereign entities rather than just static assets. The standard uses a permissionless registry and Create2 mechanism to assign wallet addresses to all NFTs, allowing them to own any type of asset (ERC20, ERC721, ERC1155), generate their own transaction history, and be used as identities in applications like DAOs, gaming, and social protocols.
Intro to ERC 6551: Token Bound Accounts Explained by Jayden Windle
Added:foreign [Music] this talk is an intro to erc6551 this is an upcoming standard as an EIP and this kind of talk is going to be a walkthrough of what it is how it works why it's important and most importantly how you can use it to build cool stuff at the hackathon this week um so before we go too much farther obligatory intro slide I'm Jaden I'm one of the founding engineers at Future Primitive we're Adventure Studio we build Crazy crypto stuff I'm also one of the authors of erc6551 um if you want to follow me on Twitter uh that's where you can DM me um teacher primitive so we are a on-chain venture Studio we build Crazy crypto experiments and we love everything nfts uh Benny one of our Founders who's sitting here in the front row he was one of the founding team of cryptokitties back at heathwaterloo on an early eat Global hackathon and from there we're just a Dapper where they launch choose Wizards and NBA Top Shot so been around the NBA in the mft space for a long time and have launched a lot of crazy nfts since then you can see a couple of the ones we built here but we believe really deeply that nfts are much more than just a financial commodity or something you buy sell and flip We Believe really strongly in the potential of nfts as an on-chain medium we think every nft should be able to do more than just be an asset that sits in your wallet shouldn't just be a static image a static thing that sits there nfts should be able to own things they should be able to take actions and do things they should be able to change States they should be able to claim things like airdrops they should be able to be used as an ethereum identity because that's the potential of nfts as a token but right now it's not really realized nfts are just a thing that sits in your wallet so how can we change that I mean if you zoom out on the history of media on the internet as a whole you know jpegs kind of brought media onto the internet where you can now see images online and then we built stuff like Facebook and things like that we can start doing things with media you can start liking it you can share it uh you can send it to your mom I give you all these things with media and then nfts took that even further now not only can you interact with media you can also own it you can buy it sell it trade it you own a piece of it uh it lives on chain and we think kind of the next evolution of nfts is that you can become your nft you can use your nft you can interact with it it's no longer just a thing that gets passed around it's its own unique identity and that's what ERC 6551 is designed to allow erc6551 or the token bound account standard this is a proposal that gives every single nft a wallet and not just new nfts that you build every nft that's ever existed on any evm compatible chain has a wallet now that it can start using today as you can see up here these are real wallets real talk about accounts for these nfts on ethereum yeah so now every nft is a wallet nfts can do crazy things like own any kind of asset because it's just a wallet you know your nfds can connect to dapps you can trade your favorite meme coin on uniswap using your nft rather than using your wallet your nft is that same ability that used to be only something that wallets could do analysis can have their own transaction history right with their own wallet they can generate their own history outside of the history that your wallet creates so how does that work so erc6551 the standard you go and read it it's live on the EIP page um what it does it defines a single registry that is permissionlessly Deployable nobody owns it it's fully decentralized you can deploy it on your favorite chain this hackathon if it doesn't exist there yet and that registry gives every nft its wallet address and it does so using the magic of create 2. create 2 lets you deploy smart contracts to predetermined addresses and so the registry reserves wallet addresses for every nft that's ever existed or ever will exist every nft gets a unique wallet address that only the owner of that nft will be able to use and so when that wallet address is deployed the only person who can use that wallet is the owner of the nft you can think of it kind of like a token gated one of one safe the owner of the nft will always own the wallet and all assets inside it and all execution permissions on the wallet and this is all Allowed by having that registry that's open in public the whole source code is in the EIP you can go and start using it today it's fully decentralized sports with every nft it's pretty cool one of the things we get asked a lot since we we started this process of trying to get this standardized as in the IP is wait isn't this just X you know isn't this just ERC 998 um didn't we do this a long time ago isn't this just this just some other ERC isn't this just some other centralized company that I've heard of that does like nft nesting or nft holding things um and we've we've built with all of those uh Future Primitive we built a lot of experiments with nfts and we've used all the tooling that's out there and none of the things that we saw really fit our use case because we had some really core beliefs about what nfts should be able to do what rights should an nft have um first of all every nft should get a wallet not just some nfts that Implement a certain standard right just because you launched your nft a long time ago doesn't mean your nft shouldn't be able to use all of these cool features and most of the standards out there they only work for new nfts and they only work for a subset of nfts and so that didn't fit our use case we also wanted nfts to be able to own anything they shouldn't just work with some types of assets it's no fun if your nft can only own other nfts in the same collection NFD should be able to own anything erc20s 721s 1155s if somebody comes out with a crazy new token standard tomorrow it should work with your nft your nft should be able to own it and the big thing was we wanted all this to work without any contract wrapping or burning a lot of the other standards if you wanted to use existing nfts with them you'd have to wrap the nft into another nft that could then be used with the standard and you know wrapping nfts is great for some mechanics but in a lot of ways you lose the provenance and the value of the original nft when it gets ground so we want to do all of this without any wrapping and we wanted to work with existing platforms right it's cool if your nft can own things it's cool if your energy can own anything but if you can't you know see the things your nft owns anywhere other than some app that somebody builds that's no fun it should just work with existing infrastructure so you can see what your nft owns and finally it should be fully decentralized there's a lot of other projects that do this in like a centralized we've got upgradeable contracts everything goes through one place we really think that nft should have their own self-sovereign wallets nobody should be able to control what you do with your nft it's a it's a bearer asset it's something you own the Shane should be true of the things that your nft owns and so we thought all of this was really really important and we didn't see anything out there that did all of these things and so we started talking to friends of ours about this idea we had about giving nfts wallets and they were like wow this is super cool we would use this for a whole bunch of things and as soon as we heard that we thought you know this is way bigger than just our projects just things we want to work on this should be a standard that every nft should be able to use that every ethereum should be able to use so we launched the rc6551 now you're an NFC developer you're here at a hackathon You're Building cool stuff you kind of have the chance to Choose Your Own Adventure if you're building with nfts there's a couple of options you have first you can just pull like an off-the-shelf open Zeppelin nft spin it up and then you can worry about all the utility for it later if you want to build like a uh you know a staking contract you want to build some game mechanic with your nfts you can launch a really plain nft and then put all the logic in some external contract that you use um that's good and all but you have to build a whole bunch of custom contracts and it's only going to work with some nfts I mean you can make it work with all nfts but um there's just some some necessarily like non-standard things you're going to be able to do to make that work and so it's not going to work with every system out there because a lot of it has to do with like wrapping nfts or burning nfts when they go into a certain circumstance and so you can do it it just gets kind of messy and everybody does their own thing and then if you're going to bring this to production you've got to get an audit you got to do all of that it could be pretty heavy weights the other alternative you have is to use one of these other standards that have come out now you could build your nft project on something like ERC 998 and you could write all of the logic about your nft owning things into the core nft contract itself you can do that the problem is with standards like erc998 it only works with nfts and erc20s and I think only nfts in your c20s that also implements the sum 998 compatible interface uh and so you can build all this logic into your nft contract but you're making some trade-offs it might not work with every other token out there your nft might not be able to own every other thing and that's only talking about ownership it's not talking at all about being able to use your nft to interact with dapps or all of those other things so you can build a lot of logic into your nft contract but the end of the day it'll still be hindered by even if it is using some sort of standard it's not going to have the same level of compatibility that your nft having a wallet is going to have because wallets are universally supported any application on ethereum has some concept of a wallet and some support for the concept of the wallet so your third option with erc6551 is you can launch the most boring nft nothing special about the nft contract you can launch an open Edition or you could launch an open Zeppelin fork and all of a sudden every nft you've launched will have its own wallet and you can start building and putting things in that wallet building at building authentication logic using those wallets and your nft project doesn't have to be anything crazy you don't even have to write very much custom code to support this your nft can just own things and do things out of the box and that's a really powerful mechanism you don't need to make this decision when you're launching your nft you don't need to do crazy Custom Contract development afterwards you can just Bank on the fact that every nft in the collection that you launched has a wallet and you can build applications around that so that's a really powerful medium some cool things you could build with this so this kind of turns every NFC into a folder so if you're doing air jobs or if you're having you know if you're collecting co-ops or if you've got soulbound tokens in your project all of a sudden nfts can start collecting those po-ops and the Soul bound tokens you can start putting assets inside of an nft this opens up some really cool mechanics that you can build inside of a hackathon project especially for airdrops you know it's really interesting when say you have a big collection of nfts you want to do an airdrop to all of them um every nft having a static token bound account address versus the dynamic owner address makes stuff like airdrop's really easy because you don't have to do snapshots and you can do some really neat gas hacks to save gas when doing that so your nft being able to have a wallet you're being able to put assets into it is a really cool thing that you can use for your hackathon projects this week couple of other interesting ideas to throw you away down membership a lot of nft a lot of dows have this concept of a membership card or an nft that represents your membership in the Dow you can see in this case this is the FWB membership card nft and the more things you do within the Dow the more stickers you collect to prove that you've done things in the past except as it stands right now all of that just sits in your Walt so every time you do something in the Dow it's your wallet that gets the sticker but what happens if you sell the membership card but keep all the stickers you kind of have this weird out of sync history about your participation in the Dow where you keep the membership card but you sell all your stickers you know what are you supposed to do with that when all of the nfts are supposed to render the card and all the stickers you just get this weird kind of photosynctus because the membership card isn't really your form membership in the Dow your wallet is and trying to represent that as an nft gets difficult but with token found accounts your nft can actually own all of the all of the artifacts from the actions as taken within the Dow your nft can be the core participant in the Dow rather than your wallet being the core participant and your nft can collect artifacts about its historical contributions to the dial it can collect uh Soul bound tokens it can collect attributions and all of that will go wherever the nft goes if you sell that nft on openc all of that history goes with the nft to the new owner whereas before it's just stuck in your wallet address and finally this is a really cool mechanic for on-chain gaming because um you know it works with every asset so your characters in the games can own e where they can own meme coins or you can represent items in the game as 1155 and because every nft has its own wallet you could have your character represented as an nft collecting all of these assets in game and then when you go to sell your character all of the assets it's collected over time go with the character versus right now if you're putting all of those assets into somebody's wallet then they can sell a character but keep all the assets or sell all the assets between the character and you have to figure out how to do like bundle orders on openc to make that work it just gets messy but with this characters can be represented as nfts and this form is a really interesting basis for on-chain inventory management inside of an orange chain gaming contact so crazy amount of stuff we can go down many many many deep rabbit holes uh to share what that's all about but um to start we'll get to a demo eventually but we've got a crazy community of developers who have helped contribute to the standard there's been a ton of folks in our in our DMS in a telegram working group that we've formed if you want an invite to join come see me afterwards we love your contributions because with eip's the biggest thing is getting Community Support is rallying the community to come to consensus about what is the standard that should be there we really think it's important that the concept of nfts having a wallet nfts having an account is something that everybody agrees upon that we can come to consensus on and so all people all of these companies have been helping us do that we've got a killer group of devs if you want to join so I'll give you a quick demo we built a bunch of tooling around this if you want to build on top of your c6551 at the hackathon we've got some tooling for you um so the first thing we've built is an Explorer you can think of it as etherscan for tokenbound accounts for any nft that exists you can find its wallet address and you can interact with the wallet if you're the holder of the nft let me just see if this works here I'm going to pop this open all right does anybody have an ens address I'll just pick someone random in the audience okay what's your ens 0xjax dot eth says j-a-c-q-u-e-s dot e okay so I can do an ether scan and I'm going to grab your wallet address so ether scan doesn't think of a Bop okay it's not the right wallet address okay yeah give me a different one wh ale dot Ace okay jocks Wells Dot eth okay I don't say it anyways I'll use mine it would have been super cool to use somebody in the audiences but oh yeah sure yeah Jordan Dash public okay Jordan Dash Dash public dot ease okay this is the right wall address aac2 perfect okay so let's go and take a look at all of your nfts there Jordan so I just gotta paste your wallet address in here and so here are some anesthesual right you've got a pragma nft you've got Jordan public.eth um so let's pick the pragma nft so here's the nft and here's the wallet address your nft is a wallet and you can see it there so if I pop this guy open here in etherscan you can see it's got a wallet address it works just fine um so now what I'm going to do is I'm going to go into a nft that we have is there a nice feature primitive logo here and I'm going to airdrop an N of T in into that nft's wallet so let me just send this through yep you got that you got the free airdrop here so if we just wait for that transaction to go through Excuse me while the ethereum network takes a little while cool is in there in the metamask oh I air dropped to the metamask oh my bad yeah sorry let me air drop into the token about account so now you get two you get one of your meta masks too all right up in there great now we're going to put one in the tokenbound account at the end of T so in a second when that happens you'll see that nft just shows up here it shows up in this wallet because this nfc's wallet now owns that nft we just use an external tool that knows nothing about togaman accounts knows nothing about erc6551 and it just works if you want to airdrop nfts to this wallet as a way to refresh the page bam this nft now owns this token and this works anywhere like you can copy the same address and go see it on open C right if I copy and paste this address in here on openc oops sorry I got a search for wallets there we go if we go see this address on openc you can see that it's probably gonna be under hidden because we just airdropped it sorry open C sometimes hides it when it's a it's an airdrop like that especially when it's an open Edition but it is in there you can go see it on on either scan um if we pop this guy back open you can see that the nft really exists we go under nft transfers you can see we minted this nft in this wall so stuff like etherscan stuff like um you know openc all of that it all just works with even despite not knowing about this nft being owned by an nft it knows this nft is owned by a wallet and that's really important because wallets are universities universally supported on ethereum it doesn't matter what you're building you're going to support wallets and if you support wallets you naturally support 655 watt out of the box that's part of the power of this and so by giving every nft a wallet we let nfts participate equally in the ethereum ecosystem just like any human just like any wallet ethereum that nfts can participate and that's a really really powerful thing there's a ton of stuff we go into that um to start because it's a hackathon we'll dive in mostly into what you can use this weekend so the Explorer is there you can check it out works on mainnet works on gurlate adding polygon support this afternoon for you guys want to play around on lens because there's some really cool things with lens we're also sponsoring a bounty with lens if you want to build a cool lens x6551 integration but the talking about Explorer is there you can go to tokenbound.org for any nft you own you can see its wallet and you can start using its wallet today which we think is pretty cool second thing we built is an sdkit so if you want to build deep support for erc6551 accounts into your application you can install the tokenbound SDK it's on GitHub npm and Tall npm installed at tokenbalance SDK if you're using VM SDK ethers if you're using ethers if you have issues with that come see me happy to help out but you can just pull this into your applications and start calculating the addresses for any nft right away if you launch ft this weekend you can get the address for that nft within your application and start airdropping stuff into it we'll start executing transactions from that nfts wallet within your application and you don't have to worry about any of it um you can just pull in the nft you can just pull in the SDK and go to town it works really simply the other thing we've lost is they're talking about wallet so it's actually really hard to build a wallet a wallet uh smart contract um safe's done a great job that a lot of other teams have but you know for a hackathon or for a product in general you shouldn't be responsible for the security of your nft's wallets with some contract you through together you should use something proven something audited something that you can trust and so we've got a token bound wallet implementation it's live on mainnet it's live on all the test stats for you to play around with if it's not on your favorite chain come see me we'll get it up there together but this is a really extensible erc6551 account implementation that you can start using right out of the box if you use the SDK you don't have to worry about this the SDK takes care of it for you but if you want to use do some crazy custom Smart contract wallet stuff um that's our implementation you can feel free to play around with it it's open source uh it is 4337 compatible one really powerful part of 6551 is you can think about it as a couch abstraction for nfts every nft gets an abstract account that the nft owns and that's a really powerful Paradigm means you can use all the crazy cool 4337 tooling that's coming out with your nfts wallets so your nfts wallet gets automatically deployed on the first transaction your nfts will let you use pay masters so a can use other tokens other than eat the big app like all the crazy four through seven stuff you've seen it works out of the box and so you can start using it with token Mount accounts uh it's extensibles if you want to add custom logic to your talking about account our wallet implementation supports that that's super cool uh folks who want to do stuff like overriding receiver methods and stuff uh it's live on mainnet so you can play around with it we have a we do have some audits for us um so this is kind of like out of the box you don't want to do anything crazy you just want to start using this Paradigm feel free to pull in the SDK and the talking about account uh tokenbound wallet implementation uh and if you have any questions about how any of this works docs.tokenbound.org is your friends so that'll cover the SDK cover or wallet implementation uh it's a little sparse forgive me we are working on that but if you have any issues please I'm here all weekend come and see me uh and for anything like ERC specific if you want to dive into the internals of how this works under the hood how 6551 actually gives every NFTA wallet without requiring any interaction from nft creators or nft holders uh you can look it up on the EIP website just Google eip6551 and it'll come up that's all the crazy nerdy details if you're into like VIP development so that's that uh that's talking about accounts that's erc6551 uh we think it's really cool we think there's a ton of applications you can use uh we've got a few minutes left if anybody has questions would love to answer some of them totally so the question is uh you know every nft has a wallet that's cool but how do I actually use that wallet right if there's Assets in there how do I pull it out or how do I interact with it and so there's a couple of ways you can do that first every wallet is its own smart contract so every nft gets its own smart contract that is token gated so the owner of the nft is the owner of the smart contract wallet and that means that you can use any tool that interacts with smart contracts to use the wallet so if you want to go on etherscan and manually execute transactions using your tokenbound account you can because it's a smart contract that you control your if your nft is owned by your metamask wallet you can use your metamask wallet to control the tokenbound account smart contract that ownership is transitive so if you own the nft you own the smart contract wallet and if you ever sell the nft you will no longer have access to the nft smart contract wallet the new owner will automatically have asset access the moment that transfer takes place and so you can use either scan you can use the tokenbound.org website there's some you can pull assets in put put them in pull them out on the token Matador site deploy the contract we've got some some tooling around that you can use but really anything that works with smart contracts you can use your wallet with that's a good question so the question is what happens if you burn the nft what happens to the stuff in the world uh it's all Burns too because nobody's ever going to be able to access that tokenbound account again because the nft changed hands is now the burn address and unless you can somehow figure out how to execute transactions from the bird address which would cause other very significant issues uh all of the nfts in the talk about account will be forever burned so if you burn the core nft you also burn the assets in the world oh yeah absolutely let me see if I can pull up this demo we do have a demo of this it gets crazy quickly um anyway what's it called so tokenbound and no more versatile yeah so EXC excuse this this was kind of an early uh early iteration of this this concept that we built but yeah nfts can totally own nfts that own nfts that own nfts as deep as you want uh you create a whole family tree of nfts and this is a real live example of that on chain so you can see this test net clone X phones these three nfts these three nfts each own nfts themselves and these nfts own other entities you can you can make this as deep as you want uh this will be like we you know it's crazy enough that nfts can have their own wallet that's kind of what we're focusing on but if you want to go really off the deep end nfts can own nfts in any depth it creates a graph of nft and token ownership which has some crazy implications and importantly uh with some of the changes we have coming up to the wallet you'll be able to if you own this root nft you can just execute directly against the contract of any sub nft because transitively you're the owner of it and so it creates some really interesting ways that you can build like tree based structures on chain one more go for it you would think but that's actually not the case so the question is isn't it really expensive in gas fees because you have to work out the transitive properties of the graph and yes it's more it will cost more gas if you execute further down in the tree um that's you know it will cost more gas but it's actually not incredibly much more gas because what you can do is you can because all of the talk about accounts their addresses are computable right you can compute the account for any nft without making any external contract calls and so you can pass in a set of data that you can compute the owner addresses all the way down the tree locally within the contract you want to do the the logic so in this case the lower level nft account can do this computation on a proof that verifies that you the caller are calling from the top level nft without having to execute a waterfall of contract calls all the way down so you as the caller can call just into the bottom nft and you can it will cost a little bit more gas because you're like verifying data on chain but it's much much cheaper than if you had to call into the top contract which calls into the next one which into the next one um yeah go for it yep totally yeah so that's an important thing the security of wallets in this this concept your wallet is only secure your token Mount account is only as secure as the wallet you hold it in that's true for all nfts but it becomes especially true when your nft can own assets so if your wallet gets rugged and you lose your nfts sorry you lost your nfts that's just you know if you get rugged you get rugged if there's something malicious on the contract where somebody steals your nft from you even though your wallet was still secure uh sorry your wallet will also get stolen wherever the nft goes specifically wherever the NFC contract says the owner of the nft is that person will have execution permissions on the smart contract wallet so if you get rugs or if you lose your private keys or something like that not much we can do I'm sorry that's just the nature of self-solverty cool I think we had a question here that's a really interesting thing yeah you can you can totally have a noses safe that has nfts as signers on the Nosa safe now because you know the wallet address for any nft so you could have a you know 505 Nosa Sig that the signers are actually nfts and no matter who owns that nft they'll automatically be a signer on the Nosa safe that they're talking about account sure yeah yes it would work for every contract um the question is where do you draw the lines like where does this become useful because if it's not token bound it's really just contract bound contracts and what does that mean well like what are you going to do with contract bound contracts it's Josh totally and so this importantly this works with 721 is the best right so it's kind of a lot of this assumes there's a single owner per token but this can also be extended pretty easily to work with other types of tokens where there's not just one owner so you can make this work with 1155s um if there's the cases where 1155s have one owner like ens names are now 1155s this works out of the box because ens supports the owner of method so talking about accounts work with some 1155s out of the box they can also work with some more fungible 1155s with a little bit of tweaking and so you can use the same pattern to support other types of tokens you could I mean you would be very much breaking kind of the spirit and the lines that we've drawn in the standard to do contract bound accounts but theoretically if you put an owner of method on the contract you could make Con like this could be contract found accounts but we just think that like because of the liquid nature of tokens because tokens change hands that makes this really powerful because we haven't had a way to do wallets that have liquid marketplaces for their contents before and so by tying wallets to tokens you get to take advantage of all the infrastructure that exists around tokens rather than working with custom contracts question the back totally yeah so the question is what are some use cases so we talked about three of them a little bit in the slide so this is really cool for airdrops because you can airdrop a token amount of counts uh it's cool for Dows because nfts can now be members of dows signers on the safe voters on the the contract uh and your entire history of membership in the dial can be a part of that nft you've got on-chain games which is super cool this is kind of like the perfect inventory management solution for on-chain games but there's lots of cool things beyond that uh like what are some of the things people in the what's that oh digital fashion yeah so for example like one of the projects we're working on I'll demo this real quick because I think it's in my wallets um we're working on a contract called sapiens if I can find the fire the nft and the Sea of stuff I've collected here uh we're working on a project called sapiens that uses this mechanic for digital fashion and so this is a sapiens nft you can see inside the sapiens out of T are two other nfts one is an nft that's part of the a previous collection we did that once this all reveals this nft at the beginning is going to turn into a T-shirt and the pfp that's revealed to this artwork is going to be able to wear that T-shirt and then collect future nfts that become t-shirts and hats and other other items equipped onto the nft and if the nft owns the assets the nft has the rights to equip those assets and we think that's super cool the other one is one of the reasons we're here this hackathon is nfts can own lens profiles so this nft owns a lens profile and that means this nft can post on lens it's got its own social profile that goes wherever the nft owns wherever the nft goes if I sell this nft the new owner automatically gets the lens profile and can keep posting from it so there's some really cool use cases around nfts can now become identities in a social context they can chat with each other they can use lens they can use other decentralized social protocols and and really by giving an nft a wallet which is the core of all of this you let an nft do all of the same things that you can already do as a web 3 user so if you can do it your nft can do it now and that's pretty powerful I think that's all the time we've got thank you so much you guys
Up Next

Understanding ERC-6551: NFTs as Wallets in Generative Art
@TheCPRshow
2.4K views•2023-05-26

Torrent File Format & Bencoding: A Technical Deep Dive
@AsliEngineering
12.5K views•2022-08-08

ERC-4337 Account Abstraction via Alternative Mempool | Ethereum Foundation Talk
@ETHGlobal
6.2K views•2022-04-27

Understanding Ethereum: A Comprehensive Beginner's Overview
@99Bitcoins
3.1M views•2018-06-26
Related Study Plans & Knowledge Roadmaps
Structured learning paths in Blockchain & Crypto






































