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

Loading player…

NFT Royalty Standard - EIP-2981 - Blaine Malone

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

Transcript

creating a new [Music] a new way for creators to monetize their work and that really flows in nicely to nft royalty payments and that's why i spent some spare time trying to build out this nft royalty standard so i particularly like this xkcd comic it's about how standards proliferate and in many cases there's like okay there's 14 competing standards and then some some smart alec comes along and says you know i'm going to create a new standard to universally unify all of these into one um and then you've got 15 competing standards so we kind of did go down that route originally but definitely we've found that we're converging on some solid ideas the communities really put a lot of work in here and that's what i'm going to talk to you today about but first um what do i want you to walk away with today well there's three things um the first one is i want you to have a better working knowledge of what the royalty landscape today and nfts looks like and how we can do better and how it's not great um number two i want to have you get an idea about how it's evolving the ideas that we're converging on and how it's definitely a step in the right direction um and then kind of how how can you be part of that evolving future and that's really um you know spoiler alert it's implementing eip turning it one into your ear c721 contracts or 1155 contracts and it's really it's really easy i was originally going to talk about the rationale of the eip21 today but i kind of changed the talk um pretty last minute on more of the context around nft royalties because i really think in the long run if i talk about that it will actually be more persuasive to get product managers engineers everyone in this room building something to actually want to implement the it eip21 into their nft projects so a little context kind of back of the envelope calculation here i took two collections off of a large marketplace uh looked at the volume and then done a quick calculation on kind of the amount of money we're talking about here for some collections so you can see one of the creators and this is probably an outdated number there's 30 30 million dollars in just nfc royalties alone um now that's it's important for you know large creators to also get their payments but also you know arguably even more important for smaller nft creators to be able to extract their their payments um so the goal here is to make sure that the royalty market isn't fragmented with respect to royalty payments and that people do get the payments that they're they're owed and deserved right so let me set the scene we've got five kind of actors in this scenario and i'm going to describe what the current nft royalty landscape looks like not in every case but this is a kind of common case so we've got alice bob and charlie and then two marketplaces alice is an nft creator she mints her nft on say the ethereum internet and she lists it on marketplace one in doing so she's also set up royalty information for those that nft collection and um marketplace one takes that information and puts it into some centralized database sql no sequel uh what what what have you bob likes the art as we all do and he purchases the nft this is recorded as a seal event on the marketplace side and the alice gets her royalty payment so um that'll be some percentage of the total sale amount and that'll go into her ethereum wallet sometimes this is kind of asynchronous it's batch payments which is great so bob realizes that he can make a profit here uh and he lists the same nft on marketplace too uh the problem here is that alice is kind of unbeknownst to alice so she never set up royalty information on marketplace 2 for this nft collection so marketplace too is just going to facilitate that trade but um when charlie buys this nft marketplace 2 doesn't know who to send the royalties to so there might be some platform cut but alice ultimately won't get paid her royalties um which she which she which she should um and this you're starting to see the the bigger picture here which is siloed royalty information um it's it's fragmented and the idea that we want to move towards is to remove this fragmentation and silos so just the things that jump out siloed information uh if if she did put it across marketplaces it might be duplicated and inherently inconsistent she might have you know had a fat finger moment and type the wrong numbers in for another marketplace and receive less royalties there's no real accountability for marketplaces to [Music] pay these royalties because a lot of this information is opaque and just all in all it's kind of confusing and painful to manage yeah so number two this is where we're converging on so the ideas here are what the evolving landscape looks like so from a high level we want to basically move that royalty information from these databases and we want to put them into our own chain in a gas efficient way and you'll find out we've we've actually come up with some really good methods to do this um and in addition to that we want to have and we kind of want to democratize that data and we've built a royalty registry and this is really in collaboration and manifold xyz they built this royalty registry in collaboration with all these um other large marketplaces like openc nifty gateway wearable foundation zorra this is one of the first times we've kind of seen all of these marketplaces come together and agree that this is a problem in the nft space so there's already been a lot of great buy-in here this is kind of governed by a gnosis safe i think that um the more people sort of catch on to this and start realizing that this is the way the royalties information should be managed you'll see this kind of like thought i like to call it death of siloed royalties by a thousand cuts if you if you get your nft creators to opt into this model um it kind of twists the arm of large marketplaces to start accepting this as the gold standard for how they read royalty information so i want to talk about the royalty registry in particular and why why it's great basically so it's a it's a bunch of on-chain smart contracts um it's deployed on a bunch of different uh roll-ups it's me and it robson ring b polygon and nfts that exists on those chains will have their own version of the royalty registry the idea here is that you would ask the royalty registry for the royalty information for a given nft so you can imagine the three parameters there you'd have the contract address the token id and the sale price so the reason the sale price is passed into the royalty registry is because uh we get the smart contracts to perform a percentage calculation on that sale price so the result of the percentage calculation is undisputable you can't argue with it so i guess if we're going to move towards this new way to represent royalty information i've kind of identified three key flows here and the three key actors that are going to have to change their behaviors for us to realize this so first one is nft creators circa 2019 so this is kind of like before this nft royalty standard before we thought about nft royalties on chain then we've got new nft creators circuit 2022 and marketplaces so they're the kind of three people i think we need to get buy in from here flow one is really just about supporting older nfts so again manifold have created an amazing way to do this so if you've already created an nft collection and you want to opt in here well they've basically made it like a very gas efficient way of deploying royalty information for your nfts and it uses something called um eip 1167 which is a minimal proxy contract so basically you are able to deploy tiny amounts of code on chain and then just some the necessary information and then your nfts can make use of um this this open royalty democratization of data so definitely check that out if you've already made any of these and you want to get your nfts registered in the royalty registry this defaults to using eip2981 which is the royalty standard flow 2 is supporting your nfts and this one's like really simple so when you're writing your 721 or 1155 contract just um implement a new interface and this is the the royalty standard in essence it's really simple um i can talk about the function signature here basically it takes a token id in the sale price and it returns the an address on an amount the address is who gets it the amount is how much they get and that's why the percentage calculation actually happens on jane you can see that this is a view function so it's free to invoke so you don't have to pay any information or a penny gas or anything to actually make use of this so the royalty registry invocations are free for marketplaces this uh this is like the call site of um the royalty registry and it defaults to eip 2981 so if you take away anything here it's if you want to make if you want to get involved in the royalty registry add eip 2981 to your smart contract because it defaults to checking for this which is really useful really useful this is an example implementation of the function itself and i would imagine most use cases are going to look very much like this like 99 so you'll notice here that i do the multiplication first that's just a kind of quirk of solidity it keeps the precision if you had done the division first then you would have lost some precision but essentially this returns the two values it's the who gets it and how much um and it's also at the token level you can have it at the global level so all nfts under the smart contract can have the same royalties or you can have um per token so that's useful as well the final flow was would marketplaces really have to change their behavior and i can kind of see this as a fees rollout you know they were not going to switch over to their registry straight away because i can't imagine everybody you know getting their nfts involved in this registry from the get-go but they should definitely integrate with the registry as soon as possible and you know make an invocation to the registry check if the nft royalty information is there if it is use it if it isn't then maybe go back to the database and see if it's there this would just be a matter of you wouldn't actually have to use like a rest api for anything by the way it's just a matter of normal you know using infuria to invoke a smart contract function something as simple as that i guess you know this was one of the final points then it's like how do you opt in i've kind of already alluded to it it's just implement eip281 on your contracts um i've given a a longer talk on you know the rationale behind the eip281 how long we were kind of discussing this on github discussions it went on for a year and a half um you know it got really down to the fine details of grammar on sentences which was kind of painful at points but um this youtube video is a good overview of kind of if you're a developer a product person kind of like looking to put this into your project and yet there's some solid reference implementations to to use out the gate summary of eip281 you know the receive address is a single address so some people might be like well why isn't under it an array uh well it could have been but we were kind of like wanting to keep it as simple as possible because you can always use that single address as a contract open zebra and have some nice libraries for this a payments builder library so you can have the address be a contract and then it's got like a pull payment method so that's that's really great um again the calculations don't on chain so it's undisputable we don't define the units of the seal and this is kind of for flexibility it could be a future eip um and this is like it's an optional kind of opt-in model here and we we did talk a lot about in the discussions of this eip you know how do we enforce royalties because like we're all here because like blockchain's great and we can uh you know codify things and make sure the rules get enforced and people should get their payments but um kind of some of the standards that came before uh ie eip 721 the the eth or token for the seal never touches the contract and in that you you can never really tell if it was a simple transfer event or if it was an actual seal so they're indistinguishable a seal is just kind of like an abstraction that a marketplace uses to denote a transfer event so if a transfer could be a person consolidating their nfts to their cold wallet and we wouldn't know if that was a seal or not so there was a lot of kind of hassle and really great discussions around like enforcing royalty payments but we believe that the opt-in model along with more transparent reporting of sale events can hold marketplaces and people accountable to pay these things so this is this is kind of like a call to action i suppose so um everyone kind of sitting in this room watching online there's a few engineers product managers anybody building anything relating to nfts just spread the word implement eip2981 and if there's any marketplaces in the room today be great to have a chat with you guys around you know adding this to your kind of fees roll out of royalties um yeah thank you so much that's nft royalties

Automatic transcript — names and jargon may be misspelled.