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

Loading player…

ETHGlobal Brussels 🛠️ Build with $nouns

ETHGlobalWed, Oct 9, 2024, 12:00 AM

Join the Nouns team in this workshop and learn how to use Nouns for your hackathon projects at ETHGlobal Brussels, a 3-day hackathon happening from July 12 to 14, 2024. ETHGlobal Brussels 2024 brings together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ---------------- Follow us: x.com/ethglobal Website: https://ethglobal.com Email us at: hello@ethglobal.com

Transcript

[Music] hey my name Spencer for paper Club Labs we are designer development agency in the crypto space and we've been spending the past little bit of time uh working in the nouns ecosystem as Community contributors um today I want to talk about um the relatively new nouns erc20 token U which I think came out um just maybe two weeks ago or maybe even less um I want to kind of talk about it give an overview of It kind of why it's built and and what it does give an overview of the contract interface how to interact with it and then give some kind of demos of of what's already been built and then um I think at the end I have some you know tips for what I think uh you know you could build upon in the hackathon so I guess the goal of this is to hopefully kind of inspire people to build on top of um you know this new aca2 in the n's ecosystem um and and yeah so um before we kind of talk about that new rc20 I just want to start by kind of introducing the nouns and T I think probably if you're watching this video you're already pretty familiar or at least somewhat with with what nouns is um but if not uh basically it's an experimental nftd govern Dow attempting to bootstrap identity Community governs and a treasury that can be used by the community so one you know pseudo randomly generated now and is auctioned off every day um and that'll be forever and basically the auction funds go into to the treasury um anybody can then create a proposal to to build something um generally public good funding basically comes from this Treasury um and then you know the Dow votes upon whether or not your proposal should be funded um and basically one now and equals one vote so if you hold it noun you get to vote and and and say like what you like or don't like about a proposal and and vote for or against it um you can learn more about you know what nouns is nouns on WTF website which is their official official front end um I think it does a pretty good job of of kind of explaining it in more details and also um there's some some cool videos there that kind of go through um few different things and you can kind of see what's been fun um and and learn about the ecosystem um and then you can also explore nouns on on noun swap which is a product that paper Labs is working on um and basically um we're going to talk about it a little bit more because noun swap is is building on top of the dollar sign us20 um noun token that I'm going to talk about today um but here's just a few screenshots from from noun swap so this is kind of what a noun looks like and this is uh in part of the noun Explorer and then you know clicking in on on one of the noun profile Pages you can see um you know a noun has these five traits which are you know P pseudo randomly generated from a seed so each noun you know is is unique and different um and and uh yeah so I don't spend too much time on the nft side of things again go to the you know official front end and and I think it has some good information about about nouns there and you go to nouns Swap and kind of play around and and see you know what nouns exist um I want to spend the majority of the time talking about this new kind of erc20 token um for the rest of this video we're going to call it dollar sign nouns it's pretty confusing name because obviously nouns is the USC 721 or or nft which is you know the art that you see above um and this other token is is called dollar sign nouns is the erc20 so when I say nouns uh generally referring to the nft I'll try to make sure I say you know the nouns nft um and FSA dollar sign nouns I'm referring to the rc20 so hopefully that doesn't confuse anybody too much at least um so okay so what is the cc20 um basically it's fractionalized now ownership um and that's his purpose so um it basically offers a more affordable way to get into a noun and similar to how people you know stack stats um in Bitcoin you can now stack you know dollar sign now is to eventually become a noun holder um so you know each dollar sign noun is worth some fraction of of a full noun and and the exchange rate is basically one noun is worth $1 million sign nouns so in the in this noun zc20 contract any noun holder can deposit any noun can be deposited um for for one million of these dollar sign nouns um and conversely you know one million of the dollar announc can be redeemed to acquire any now held in announced contract um one thing to note about you know building on on top of this do sign nouns um for for uh in the nouns ecosystem is that the doar nouns contracts were built by the verbs team which is the team that works on a lot of the core protocol for nouns but um it has not been audited um because the audit proposal um which you can find in this link here was voted against um by the Dow it was a contentious prop um but anyhow you know um some Community developers ended up deploying it anyways it is a relatively simple contract it's basically a standard erc20 with a few um you know special functions um to support you know um adding in this kind of nft back or or fractural ownership of an nft um but nonetheless do know that it hasn't been audited um but that being said it does hold 18 nouns right now so there is you know a decent amount of of of usage um thus far um and again I think I I'll share this notion page so anybody who's watching this video will'll be able to see this it'll probably basically look like exactly the same with maybe a few more details here and there but you'll be able to kind of Click into the links and and learn more um okay so let's kind of dig into it um so yeah I guess what you need to know one noun is one million nouns that's the most important thing um so let's dig into kind of what the contract looks like so it as I said it's a standard ec20 interface um with a few functions to specifically support um you know interacting with with the nouns nft um those three are are namely deposit Dem and swap um the full token spec can be found here I'm not going to go through it all I've basically parsed out the pieces U which are most important for for developer to kind of build on top of the dollar sign ounce contract um but uh yeah if you want to kind of dig into it more and I think there's B more context in there as well um so it is deployed on mainnet and base um I have the those addresses here um and it is also on on on testnets definitely on suppo testnet I don't know if it's suppoed on basoa or not I've asked around a little bit if not I'll deploy it there before the hackathon and and uh if you come to this page you you'll have the updated address um so anyways yeah we'll get into the bridging in a little bit um you know between main net and base but it is just using the op Stacks uh in Native Bridge um so yeah digging into these two functions that I mentioned so the first one is deposit um basically this is how you basically take a n nft and put it into the the um you know dollar sign nouns erc20 contract and get these dollar sign nouns in return um so the contract takes in an array of of token IDs and basically each each noun that the token ID corresponds to um gets transferred from message. sender into the nouns contract and then in exchange for that basically you know 1 million times the number of of nfts they're sending in get minted to the message. sender of the dollar sign nouns so again one noun is$ million dollar sign noun so this is basically how you deposit your noun and get dollar nouns the only requirement here is that all nouns um in the token IDs must be owned by message. sender and the nouns contract must be approved to transfer them so um basically like to facilitate this the the owner of the noun needs to approve the the dollar now zc20 contract before calling this function otherwise it will revert um the second function is is redeem so this is how you basically take your dollar sign nouns and get nouns back um so again it takes a token ID list of of of nouns um in this case these are nouns inside of the rc20 contract that you want to basically redeem your dollar sign nouns ERC 24 um so it burns again one million times the number of nouns that you're trying to you know redeem your dollar sign nouns for um own and it burns those tokens that are owned by message. sender so and it transfers basically you know all the nouns with the token IDs from the dollar sign Nows contract to message.

Sender so message. sender basically is is transferring the dollar sign now erc20 in and they're getting the noun back um the requirements here is first of all all the nouns and the token IDs must be owned by the doll nouns contract uh because obviously they're they're being you know the dollar nouns are being redeemed so the the net nfts are coming out during this process so they must have been deposited at a previous time and obviously the message. sender needs to have you know a sufficient balance of of dollar sign nouns um if they're only going to redeem for one noun then that's that's one million but obviously 1 million times the number of of nouns are redem which is you know token id. length um then the next function which um you know we're the most excited about as I mentioned earlier um at paper CLP Labs we're working on a product called noun swap um is the swapping so this is basically um an optimization basically over depositing and redeeming so if you think about it I can deposit one noun um for a million of these of these erc2 dollar sign nouns and then I can redeem those dollsi nouns for any other noun that lives in this um dollar nouns contract so it's permissionless basically swapping that this enables and and the swap function is basically just an optimization on top of um you know doing the deposit and redeeming in two steps so it swaps all the input nouns um from message. sender for you know token in nouns from message.

sender to token out nouns um from uh from from the erc20 contract um again yeah optimization over over depositing and redeeming and then the requirements here is obviously the the number of nouns you're swapping input in must be equal to the number of nouns you're trying to swap out for um all the nouns that going in similar to the requirement for deposit must be approved um so the nft must be uh the erc20 contract must be approved in the nouns nft to spend or move or transfer the nft from me for message. sender so message. sender needs to go to the nouns nft contract and approve the dollar sign nouns contract to to for their n um and again all of them need to be otherwise it will revert and then similar to the redeeming requirement you know all the output nouns that are the outputs of the swap need to be owned by the dollar sign contract so they must have been deposited prior to to when the swap happens um cool so I hope that all makes sense it is relatively simple and again basically you know everything else with everything else about an erc20 also exists on this contract so you know you know approving for the rc20 transferring and everything you can do with an rc20 you can do with dollar sign outs um so it's kind of like a financialization of of nouns in a sense because now you can go bring this dollar sign nouns and and go do defi things with it um for example um so so yeah few different use cases I think the financialization one is is is definitely interesting as well um so I guess yeah what's already been built on nouns um so as I mentioned a few times noun swap so we built um inside a noun swap the ability to basically deposit redeem and and swap nouns um we'll give a I'll actually give a demo here of of noun swap um I think this is suppo testnet um so supp. nouns. WTF um and if you're going to build on on dollar sign nouns or anything in nouns ecosystem on soia this is probably the best place to come to actually purchase nouns in the auction I don't think there's any other front ends um that are on too for the auction to actually acquire nouns um so anyways I'll go through kind of what the I'll put these side by side and we can kind of walk through the these function calls um and what's going to happen under the hood here so if you go to the convert page this is um you know for dollar sign nouns there's some information about it on the side here I think we've kind of talked about a lot that already um and there's some useful links here the the token contract addresses um and and basically we try to compile every link um that you might need with regards to nouns or or as a user of noun swap to figure out um you know what you want to do so this is useful also if if uh you want a quick way to access the the contracts um or whatever um so let's go through an example here I have a bunch of nouns on suppo test not already um let's do this moose so I'm going to deposit by my moose now number 511 for a million of of these um you know dollar sign nouns so if I go ahead and try to do this the very first thing you're going to notice is it's asking me to approve noun 551 um so this will give um the noun zc20 contract permission to deposit my noun so this is calling the nouns nft contract it's calling the approved function and it's um approving the nouns erc20 contract that makes sense so this is going to satisfy this requirement if if we don't do this and we just try to call deposit immediately it would it would revert so we'll go through this first step um and we can take a look at the transaction here um hopefully this goes pretty quick okay I'm not going to go ahead yet um I just want to show you the transaction that just happened um on Seether scan loads over here come on it's so slow it's been there we go okay so what you're gonna see here is on this ZX 4c4 contract which is the nouns nft contract on suppo test net I've just called the approved function um for my token 511 and this is the contract um this is the noun dollar sign nowc 20 contract address so I'm saying that dollar sign nouns now is permission to move noun 511 so the next step is I can go ahead and um do the actual you know confirm the conversion uh which in this case is just going to call the deposit so I can go ahead and confirm that um so again it's just going to call the deposit in this case it's only one noun so there's going to be one noun in this you know array token IDs inside of the deposit function and you basically pretty simply is just going to deposit this now and give back a million um you know erc20 um dollar sign Downs um so kind of we'll wait for that to go and I'll show you the the contracted um I'll sorry the function execution for that as well missed it so um as I said here basically so this time it's calling the erc20 contract um dollar sign nouns and it's calling the um deposit function and it's again an array but it only has one piece of data in it which is you know n 511 so you see that n 511 just got transferred from my development wallet address into um the dollar sign nouns contract address and in return I've just been minted a million of the dollar sign nouns um it's called test on suppo testnet but this is the the dollar sign nouns contract um on on suppo testnet cool so basically yeah that's the um this is a deposit flow uh the redeem flow is basically the exact same thing um except there is uh no approval um that that's required U before we do the redeem uh we'll talk about the bridging in a little bit um but I'll just show you really quickly so redeeming basically you know sending a million dollar sign nouns which I now have because I just deposited it I think this wallet has kind of a lot more than a million as well um and basically huh ah there we go sorry not sure what happened there course took a long time for some reason I'll have to figure that out but um basically depositing $1 million or redeeming $1 million on nouns for any noun held in the um dollar announced contract so we basically go fetch you know what are all the nouns in this contract um so let's say I want to you know take the popsicle head um and in this case there's only one transaction there is no approval required we've just met the requirement already because um you know this noun is in that contract and then if I go ahead and confirm um and we can take a peek at this transaction um it'll basically uh be calling redeem with um you know n 5 548 as the payload and we're going to see that um now 548 got transferred from the dollar signs contract um in into my my my wallet and then uh as well the the dollar sign down dc20 tokens a million of them should get transferred into the or or burned in this case um cool while that loads I'll um also show the swap process really quickly um so let's take a peek so yeah if you filter by instant swap these are basically the swappable nouns um that that are basically living in in that um dollar nouns contract so [Music] um I'll pop back over this transaction really quick um and then we can close it and get a bigger screen here but you'll see that I just called the redeem function with you know 548 and and what you can see here is the dollar signs contract just transferred 548 to my wallet and I just burned a million of of the dollar sign Nows so that's that's the um redeeming and then the swapping basically let's say I really like this Cherry noun I'll go ahead and and do an instant swap um I can choose a noun that I want to swap um give up basically so I'll give up the thumbs up down and I can go ahead and swap now again I need to approve um similarly to the deposit the noun 508 um and I'll go ahead and do that and then the next transaction will basically be just calling the swap function um with the input of 508 and the and the output of 518 and what we're going to see is that um 508 and I will go ahead and approve that as well what we'll see is that 508 is going to go from my wallet into the dollar sign Nows contract and then um you know 518 is going to come into the dollar signs contract back into my wallet so this is a permissionless swap of a nft of the nouns nft um which is really cool this is the first time that um you know it's been possible to to swap permissionless so that loads quickly and then yeah as I said basically it's just CLI swap function um deposit IDs withdraw IDs um I'll update this try yeah I'll update this everywhere for you guys I'm just to make that it actually matches the the parameter names but basically that's it so um if you look at the data basically depositing 508 got 518 back so if you look at what happened to the nouns 508 went from my wallet into the dollar sign nouns contract 518 went from the dollar sign nouns contract into my wallet um so from my perspective you know I gave up 508 and I got 518 back which is great I just permissionless swapped uh my n um Okay cool so that is noun Swap all the code is open source for noun swap so um if you have any questions or or can you know wondering how this works or or how the function calls look uh you can take a look on GitHub um and if you go into the uh hooks here inside of the transactions you can see how each transaction kind of works so if we look at you know the deposit transaction um in our case we're doing a few extra things because we store the transaction um context and whatever but you could basically um rather than just assembling the raw request and and calling send transaction you could um you know use send transaction hook from from wagm um and and VM so uh basically that's it so um you know this is how I'm constructing the payload and things like that I think you can kind of dig through and and uh see how that's done in in noun swap um again all open source so that should be pretty straightforward to figure out again the contracts are not overly complicated um so yeah the next cool thing that was built is um product called by nouns this is a more the data side of things I think noun swap is the only one that actually interacts with the contracts um the other ones that I'm going to show now are more on the data side so um this's basically a leaderboard of of of noun dollar sign n owners um for mainnet so um you can basically see in this leaderboard and then you can also see the daily volume of dollar sign Nows over time and unique buyers um I think yeah and then the other product or project um that I know of building on nouns is is noun scan um so it's basically like ether scan for nouns it shows you all the um you know interactions that are happening I think on on Bas and mainnet and uh also all the back nouns um and then and new holders or whatnot so um yeah I think the next thing so that's a few projects that are that are built on on dollar Nows now um I'll kind of talk about some other ideas that I have later on that I think could be good hackathon projects um but the next thing is about liquidity pool so this is an nc20 do is an the rc20 so um it has been pulled with eth on both mainnet and Bas um I sent I put the links here for the Unis swop pools most of the liquidity is on base and overall there's just such small liquidity right now of dollar sign nouns that if you want to swap like any any meaningful amount there's just huge amount of slippage I think if you reverse this direction you get something like 80% slippage um when you do two million or something like that when I was trying earlier but um there is there is LPS on both main net and base um so those are the links there um if if you want to kind of explore those and actually you know get in to buy a few fractional pieces of nouns yourself this is probably the best way to do it um yeah the next thing brings us to bridging so um as I mentioned earlier so dollar nouns is deployed on both ethereum mainnet as well as base um the pr and and the only bridge that exists for dollar NS right now is is a super Chain Bridge um so the pr to actually add this into the Super chain is I linked here but you can basically just see you know those addresses that I've linked prior to this as well um you can use super bridge to do the super Chain Bridge um to interact with the super Chain Bridge and you can Bridge you know dollar sign ouns to and from um you know base but one thing to note is because the only Bridge that's available is the native Bridge you will need to wait the 7-Day optimistic challenge window when you bring dollars back to main net and the other thing to note is that nouns can only be redeemed on Main net so you know their functionality in terms of redeeming swapping and and withdrawing is or depositing is is M that only and then I think people are basically bringing them to base because it's cheaper to interact in terms of lping them and doing things with them like rewarding um you know Community contributors and things like that with them happen on on base um if you are interested in bridging um you Bas has some examples of using the native Bridge here um basically for for both eth and erc20 um to basically you know programmatically using that bridge and and building that into your project um yeah it kind of brings us to kind of the end um I guess some tips for the hackathon is well you can buy SEO nouns for testing um in the auction on noun swap um so you can go ahead and place a bid here 0.

0 one e and and you'll win it I think the auction time is are like two minutes or something so you can pick up a few nouns pretty quickly um you'll need these to basically start um you know interacting with dollar sign nouns because um I think most of the liquid on seia is just in in EAS um and so basically if you want to start you know get some dollar Nows this is the best way to do it just buy a you know a noun in the auction on sapoia and then deposit it into that that contract again you can use now SW for that or if you're you know building your own things um then use that um recommendations like um not necessarily related to dollar sign ons but just kind of a recommendation for um you know the hackathon um getting a a Dap You Know up up and running quickly I think coinbase has been doing really good work on their build onchain apps template um so this an nextjs project with with T1 CSS wagy VM baked in um I think you use this coinbase smart wallet um you could also probably plug in rainbow kit or or family whatever you want to use or connect kit pretty easily um also has found Foundry and Anvil so like it's just a really good starting point I think um for you know making your repo gets a lot of the BL played out of the way you can you know keep and and get rid of um what you do and and don't want um that's my recommendation um but just generally uh our projects we generally use you know ramb kit wagy and and BM to to do you know all the interactions with with wallets as well as on the blockchain um and The Foundry for any any solidity um or smart contract work as well um but you can use hard hat or or anything else you want um but yeah this just basically save you maybe like 45 minutes or whatever and the hackathon um and yeah some ideas I get [Music] um some ideas I guess um in terms of you know what to build on dollar sign Downs next I think um one thing that has been one thing that I think is really cool is is the the governance aspect of it so they're not governance enabled right now so you have all these nouns that are sitting in the dollar sign nouns pool um unfortunately it's not possible to vote um with those nouns so you know as a as a um um you know as a dollar sign Nows owner or fractionalized now an owner I'm not actually able to cast you know my fractional vote um there is another project Doan noggles that's kind of working on this their their proposal did pass I'm not sure when it's going to be out but um so they're kind of working on a more governance enabled ec20 um but I think it would be cool to explore like what what can be added to dollar sign Nows or on top of it to to enable this um in some way um like what does the MVP for that look like and uh yeah I mean if you come up with something you know pretty interesting that uh you know is obviously fair and safe uh I could see it potentially getting adopted um for dollar sign nouns so I think that's something cool to explore is like how how do you upgrade how do you put a layer on top of dollar sign nouns to basically um what is the minimal layer you can put on top of dollar sign nouns to enable governance I think because dollar sign nouns is immutable um when you transfer that now and in you lose any delegations or whatever in terms of governance so will basically need to be like a fork of dollar sign Nows contract but I think it wouldn't be that hard just to enable um um some governance you're running into some tricky things around um probably you need to put the nouns in a different contract for each one just due to the way that governance works but if you're interested I think you need to dig into nounce governance um and you can try to you know look through that and figure that out um another problem is you know I mentioned there's a liquidity issue there's just not much liquidity around uh in dollar sign nouns right now um so if you wanted to trade any significant amount there's just a crazy amount of slippage um you know for small volumes it's fine but um definitely you know there's only 18 nouns so positive so's about1 18 million you know dollar CS in existence and um you know I don't know what percentage is actually inlp but you know maybe 50% or whatever um so you know fixing the liquidity [Music] issue I don't know how you want how you do that exactly but one thing is just basically you know getting more liquidity there attracting more people into dollar sign Downs um creating you know a way to to get people into the nouns ecosystem through dollars on nouns by do you know thinking about some clever you know distribution mechanisms or or you know reward mechanisms I'm not exactly sure but I think that's something you know that could be built off of um better bridging again because the liquidity is just so small um you know a lot of the liquidity Bridges just won't work um right now uh and yeah I think you know better bridging this this 7-Day challenge window definitely sucks um and I think you know a lot of the people actually you know broader announced announ a base maybe didn't necessarily realize that because I was talking to a few users and they're like oh I need to wait seven days to bring this back that's crazy um so yeah I think yeah if you could think about a solution there again I think this is a pretty complex topic to solve probably in a hackathon but um and maybe better bridging just comes with better liquidity so that's you know you can you know tackle it for through that that front and then look at what what it takes to basically you know create a liquidity Bridge or um you know explore what you know ccip or or um you know different type of bridging methods would would look like um and then yeah deeper data analytics I think there's been two dashboards built I think maybe somebody else is working on on some other stuff but I think yeah it's just cool to basically see you know all the data around dollar sign nouns is is is useful to know uh what people are using it for if people are using it um could could see like a subgraph being built for it could be cool um yeah could be interesting and then um yeah if you're interested more on the defi side of things um you know what can you use this for in the defi space that um has interesting use cases um and and yeah one thing is obviously you know an Arbitrage bought to balance liquidity pools it's kind of you know boring but you know be creative like how can you use this and defi more and I think like that's a really big unlock here is is you can now with fractalized you know nft ownership you can now do a lot of defi things um with nfts so like that's the most exciting thing for me um you know aside from probably swapping um is yeah what kind of Def Primitives uh can you you know bring nouns into now that that you weren't able to before um so yeah hopefully hopefully uh this was this was useful and I'm excited to see people kind of build on on dollar sign nouns um if you have any questions or anything um yeah you can feel free to reach out to me at Spencer perkins. E um on wecast or you can go to our Pap laabs website and I think you can send us a DM or or email here um and check that out but uh yeah otherwise hopefully this is really helpful um and good luck with the hackathon um again I'll publish I'll publish um the link to this guy as well with this video so you'll be able to kind of look through and and uh and see those docs and refer back to it cool yeah good luck and thanks [Music]

Automatic transcript — names and jargon may be misspelled.