New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Decentralized Metadata for NFTs_Andrew Hill

Ethereum DenverSun, Oct 9, 2022, 12:00 AM

Transcript

hi everybody uh that was an excellent talk uh i only caught the end of it but i will be watching the live stream later um so a tough one to follow but today yeah i'm pretty excited to talk to you about a project that we've been building to try to create a better home for metadata on web3 it's called tableland you can find it at tableland.xyz so i'm going to just bend a couple slides here telling you what that is so then you know why i tell you the rest of this story so tableland is just tables we thought this is really interesting because web3 actually lacks this data structure in any sort of consistent reusable composable way when i say tables i just mean rows and columns and web3 that you can query with sql it's an interesting feature that you can add when you have structured data in tables we're building it so it'll be interoperable with all the protocols that do excellent things on top of data and we brought this week in early beta it's a gateway that you can actually explore what it means to use basic sql and tables to build projects um and so these tables this week are anchored to rinkeby so these are actually every table is an nft so you can actually trade access to that table you can burn access to that table and we're experimenting with a lot of things right now so if you're a developer we'd love to get you in there giving us feedback on what this thing looks and feels like um we're very early in this project uh so this is this week but we're going to be moving pretty quickly to defining the protocol and the network and then launching the network on mainnet as quick as we can so yeah today i wanted to talk a little bit more about metadata because i think it's a really interesting problem right now in the way people are designing projects in web3 but it's also a really cool opportunity to kind of take these projects to the next sort of phase of development and the next sort of building the next applications and possibilities in web 3. and so i'll talk about that i'm going to talk about these trade-offs and limitations that we've been identifying and then talk a little bit about tableland at the end and show you what i what i mean when i talk about having tables in web3 a little bit about me my name is andrew i'm the co-founder of a company called textile we've been building for a number of years in this space really focused on ipfs and then filecoin and actually building some early bridges and ethereum and and just building a lot of little side projects experimenting with what's possible here but we've been thinking a lot about data data's really in our wheelhouse and we've been really talking to a lot of developers about what these pain points are and what they're trying to build and where they're getting hung up um building things on web3 and this is where tableland really emerged it's just identifying this big hole and one thing i didn't say about tableland that i think is really an interesting insight here is we don't talk about it as a database because if you think about any project that's been built for web3 that's a database it's actually pretty redundant most of the time because as you know the layer one ethereum is actually pretty awesome database for a lot of things and so if you can think theoretically about breaking up the way you think about a database as two parts you have sort of the data the structured data oftentimes in tables or documents and then you have the methods of interacting with those tables and then you have all the other stuff which is your access control your role management your collections things like that all that stuff is actually what layer ones are awesome for and so we've been building just the tables and making them so that they work with the layer ones so i wanted to back up and like explain some of the thinking for why this is important and interesting to 2018 and if any of you were here in 2018 so were we and we were building things with other experiments that we were creating at the time and um and i don't know if you recall like how much people talked about dapps i mean we still talk about dapps quite a bit but dapps were pretty pretty common topic back then and what's what was really interesting thinking back of this on this moment was actually how basic the idea of dapps was in 2018 it was like literally let's take web 2 apps and now make them decentralized and we saw a lot of projects building this way and trying to basically say that would be what web3 would become which is like a fine starting point and it created a lot of again really interesting experiments a lot of projects have actually moved out of this and pivoted into interesting products in web3 but really this didn't come to fruition and i know i'm preaching to the choir saying something different happened and so you know everybody was thinking at the time ah like yeah apps but decentralized now and then last year year before-ish something totally new came right which is the all of this wave of momentum around uh nfts and for me i think there's a really linear connection here that i haven't heard many people uh articulating and so yeah so like nft is everywhere right and actually i i think nft's as sort of the keys sort of your your access control your your membership in web three so you can kind of you can kind of bleed into dowse as well but sort of the nft i think domain is is really worth focusing on here but i i think that actually nfts and if you look at nfts and dows we can think of them not as necessarily just tokens and just concepts in web3 but we can actually think of them as the new application stack and so what we thought was that apps were going to be just like they were on web 2 but now decentralized and what we're seeing is that the app now is not a ui it's actually a human experience and so people are buying nfts now not to play not for access to a ui but they're buying them for the experiences they confer and so those experiences could be membership they could be roles in a discord they should they could be you know alpha they could be access to future nfts they could be just the ability to flip them these are all games these are all applications if you really think about it and so for me thinking about why dapps didn't happen i think this is why web3 got something totally new that humanity hasn't really experienced before and i think everybody here is aware of that and but i think this framing of it really explains what's going on in my mind thinking about what applications are really being built and these are the and what's really cool about these applications is that they're totally driven by metadata so metadata for web3 can be built in a few different ways um but that metadata does everything it describes what your uh what the assets are that make up the artwork in your pfp there the metadata tells you what channels you're going to get into in the discord the metadata tells you your score in a game it tells you what uh it's it's your decision of what nfts you're going to display in your gallery this is all metadata that we're trying to build and create and connect to web3 and it's and it's and it's fairly scattered so a really basic example of this is the really is the most obvious one which is kind of the pfp or artwork or any sort of asset based nft the first thing that happens um is is to display that nft it's going to have to get metadata and so there's a few different ways to do this but i'll show you the kind of off out of smart contract way here is uh you know you go to looks rare open c and they're going to call the token uri for the token that you're looking at and so you're going to like say you have token zero you're gonna they're gonna call the smart contract read method on token uri for token zero and it's gonna return a token uri which is that url for getting the metadata for that token someplace out of the smart contract so oftentimes this is for an ipfs gateway sometimes it's for an s3 bucket it can be whatever it is actually i've never heard anybody look at this either but outside of defy i feel like token uri might be the most access read method in ethereum it'd be an interesting thing to figure out but um so anyway so it returns this metadata you can see it's it's structured data in json that then tells the gallery or the marketplace or your wallet what to display the name of your asset the the images behind it where to get those all of that but so the way that creatives are storing and making this metadata available has trade-offs so the first option is often the best option for a purist which is to put all of that metadata directly into the smart contract so a great a great and really famous example of this is is loot and so that's the whole idea of loot is essentially it's really basic information store purely on chain and then you build out from there and this works great for some projects but it can be really limited and costly right because actually putting raw data on chain is costly so if you're doing artwork or you're doing uh your how you have big imagery things like that or even if you have complex metadata that you wanted to you want to create a lot of information around this token um it's going to be it's going to be very costly and then mutating that data can also be costly because every mutation is going to be a full write back to the state of that smart contract and composability is going to be really high right because it's all right there on chain you can build other smart contracts to reference it you can do lots of cool things but by far the more popular option for many of the most famous nft projects is actually just to push it off to decentralized storage so the way this works is you actually create those metadata payloads as static files and then you put them on ipfs you go to infira or pinata and you have them pin that file for you and then you get that token uri well this actually introduces more problems it's great for scaling because it's pretty cheap but it makes mutability not only costly now but complex and so it's costly because every time that you want to change that that ipfs payload you're going to have to change the pointer on chain so there's going to be there's going to be a call to change the state and now it's actually really complex because of the way that you're storing that file right now if the user is doing the change how are you going to get them to get somebody to host it for them how are you going to get them to make sure that it's available the new change is available someplace on the decentralized storage network um and then composability is going to be pretty low because of those same two problems and then of course there's a lot of projects that use centralized storage and this obviously could scale as much as you want like web 2 style but composability is going to go to junk because nobody else can use it and the users don't really own it and there's all sorts of all the problems that you're aware of if they do it this way but there are nfts that do it this way so in so with these trade-offs about for a creative thinking this through what they're going to do they like making that decision means that they're actually changing the way that they're building nfts and the experiences around them it means that they're limiting what the application is that they can actually build with these things um so if it's stored in static files for for example it really limits the experiences you can build because mutability is going to be really hard ownership is going to be really hard those things but in fact metadata is like is such a powerful construct because you can see it sort of it starts with the token uri but it flourishes into everything like i was mentioning before your your roles and your dow your membership and discord the your assets that you acquire in your game the new whatever it is um and so with the metadata we should be actually building unique experiences that are interoperable across any game that people build new interfaces that people bring um and in user controlled worlds so on so on and so this is our goal and table land this is why we're building tableland it's just tables for this metadata where we focus on the tables themselves being mutable we focus on the tables themselves having sort of interoperating with the layer one so that you can you can change ownership of those tables to your users and actually with sql it's really cool because you can mix data across tables which means you can have a table that's immutable and query it uh combined with a table that has mutability so that in a way limiting some of your data to being immutable while making other data mutable and so just some like basic example examples of what you can do with this you can build nfts where the user can actually change that nft appearance on the fly based on what they're doing in your game a really a really like basic example that i've been giving a lot this week is like with loot the first thing that if you imagine lou it's just a set of a set of the things that you own in the yet to be built built game but if you imagine the next thing that any game builder wants to do is they want to create an inventory where they where your player can see the things that you own whether it's in one loot or multiple loots and so and then with that inventory you want to give the user interactivity so they can choose which items in their inventory are going to go with them on the current adventure so a concrete example that maybe you maybe in your loot you have a broadsword that broadsword in this game is going to make you more powerful you're going to have a power score of five but you're going to get slower because you're carrying a big hunk of metal so that could be stored in a table the user's inventory could be stored in a table where the user could choose whether their their sword is enabled or not those basic capabilities are just metadata and different rules for who can change them and actually that loot example we have an example in our docs doing it on synthetic loot if you're familiar with that so you can play with that already very basic but just give you that idea and so our idea here is is tableland is actually a network of validators that are maintaining these tables so they'll be permissionless and our goal is to make it fairly cheap highly mutable and highly composable and the reason it's highly composable compared to data stored purely on chain is have you ever tried to fork a data set that's in a key value store in a smart contract it's actually very limiting and hard to do but storing it in a fairly readable table on a network that makes it easy to extract that data for any new user you can fork a table you can build on an existing table so your view of a game built on loot i can fork and build my game built on loot in a really easy way just with metadata so i want to show you we have this little terminal in our on our home page so you can actually play with this right now you have to get whitelisted with your uh with your wallet address and our discord so just a flag there um but but once you do that like i'll just go through the steps here i'm going to use this terminal to create a table and then i'm going to insert a row in the table and then i'm going to query the table and you'll see you know if you've ever used sql before this is this what's like right now it's on rinkeby so that's that's what i just connected to has a bunch of commands that are these are just terminal based commands that are wrapping up our little javascript client you can see that's how you select so first thing i'm going to do is i'm going to create i'm going to create a table the really cool thing about tables too is like you can actually read the schema of the table and so here we have this idea that tables can be compliant with known metadata so here's an erc721 table and so we know by making this it's going to comply with all the necessary attributes of a erc721 nft and this would be really handy here in a second so i created it um there it is it took a second to to basically register that on chain and here i'll just do a select statement and you'll see it's empty but it will share with me the schema so there are all the columns that were created but no rows yet and we were just talking last night we need to actually make this a table based response so you can see that it's table right now it's just showing the json um so here i'm going to insert a row that so that zero at the top the first item i'm going to insert there that essentially could map to a token id in your smart contract and in that way in your smart contract when you're calling that token uri method it's just a templated uri that you know where to call in tableland to get this exact row with this exact metadata okay i insert that inserted that data i'll just do another select here and you can see now it has it has that data now what's really cool is on the gateway because this is an erc 721 table i can select against this table and that row id and using this using this format which is really common in that token uri method of basically templating your uri response from your smart contract i can use that here and i'll just show you against our gateway making that query so i think i'm just copying and pasting the fields that i needed yeah so here i'm just going to swap in the table id which came back from the create statement it's just a number one three five and then the id of that row which is zero like i was pointing out and you'll see it spits back json just this is exactly what open c or looks ray or anybody who displays tokens expects and you can see tableland isn't for storing big data or big blobs of data so here i'm still leveraging ipfs for storing the imagery the static attributes this is really just the metadata that wraps it all up um if you're interested in all that we have um some really cool uh use cases on our docs we have some really awesome grants for the hackathon so if you want to play with this we're really like hoping to see some cool stuff built already this week but we'll be here all this all this week oh yeah and in the docs there's this loot uh the synthetic example where you can actually play with an inventory based on the loot you have um and like i said we're really early in our roadmap so we'd love to get you involved be part of this and uh help us define this new metadata layer for web3 join us on discord if you want there's a little qr code i'll have it on the next slide too just repeating there we have some grants and bounties available and yeah check us out thank you awesome thank you so much uh qr it's there yeah

Automatic transcript — names and jargon may be misspelled.