– Building a Decentralized Registrar on Handshake


(00:00) [Music] hi everybody uh so i guess we’ll get going on uh so this uh session is about badass domains um which you can see if you go to that that domains is an icann tld so you could see it on any uh with any resolvers but yeah uh i guess for this talk i mean i i i guess like a an outline for it would be just like i’ll do like kind of an intro about like why why we did it and then um and then like get we’ll get into the how how we did it and then kiva and matt can give more details about like

(00:57) how they helped and stuff with that but yeah i mean just to start off this was one of the most enjoyable uh and satisfying projects i’ve done in a long time like um it’s just uh yeah it just felt it was just so well what what you know it was just such a cool thing to build but at the same time like it also opened up all this this world of possibilities which is just like super exciting and not only that but like these guys man i have to like give huge thanks to kiva and matt man they are awesome like matt i mean anybody who knows you

(01:33) know who’s been in handshake knows matt is awesome and he’s a great great guy to work with and everything and kiba i i didn’t know keep but he came out of nowhere and like just helped i mean i mean so much help so thanks so much for for that you guys um yeah it was awesome to work with you guys i mean it’s just like it was yeah like the last two weeks where like everybody was just like working on this and it just all came together it’s pretty cool so but yeah i mean the cool thing about badass is like

(02:02) it’s free it’s like out there it has a life of its own like it’s not controlled by anyone um you know like dot dot at eth uh you know has key holders you know so it’s control you know it people can control it uh and um you know icann is controlled and uh you know like but like this is like i don’t know it’s like it’s just out there and has a life of its own from now on and maybe it’s not the best version of you know what’s but it’s kind of just like to show what what the possibilities are and like from

(02:36) here on out you know there will be i just think there will be a lot of innovation on it which will be really cool to check out but yeah so so why why did we do uh badass domains um i thought it might be good to answer this from like two different perspectives one is um from like a domainers because i think in the crowd like from the people i’ve seen here it’s like there’s domainers there’s a lot there’s people who are more into the current domain world like um and then there’s crypto people a lot of crypto

(03:06) people too and i think they might not like both of them might have questions of why why would you do uh badass domains and so like for the from the domainer stamp i’ll i’ll i’ll just like the domainers here so um you know like having a decentralized uh you know it has the same things about like uh ens and stuff like ownership like you truly own like on i can you don’t you know you you rent you you uh you know anybody can there’s middlemen in the way uh everywhere like a registrar people who

(03:40) work at the registrar people who work at the registry registry i can like all there’s there’s a lot of people who can take it away from you so uh there’s there’s the ownership fact factor and then there’s like just being able to program it you know it’s like domains are digital assets uh so um you know uh it’s nice to have them on a blockchain where they can you know you can actually own it and have it programmable and stuff but like another thing is um the thing that excites me from a domainers standpoint

(04:10) is uh well and also like security and stuff you know like certificate authorities and stuff but the thing one of the things that i didn’t realize at first but really excites me from like a domain or standpoint is um just breaking down the floodgates of the tld space because i can you know i know they’re just trying to be careful and like safe and everything like that but i think it’s turned into this huge it just seems like it’s turned into this huge huge slow slow slow slow moving thing where it’s like impossible to get

(04:40) a tld now like you need millions of dollars and you have to wait years and all this stuff it’s just so it’s just such a drag okay and so this like bust like breaks open the gates and like i think it’s going to lead to like with this badass domain it’s like it’s just gonna there’s gonna be a lot of uh freedom and innovation that comes from opening up the tld gates so uh i so that’s i guess from the the domainers like just to let you guys like from a domain standpoint now from the crypto side

(05:12) i think um you know this might be some uh hesitation on the second level i think i’ve heard people say you know what’s what’s the net what why do we need a second second level domains and you know we don’t you don’t need it for you know uh for some for some tlds you might not choose to have a second level on there but but i do think it’s very important and i think uh because you know it extends the name space like it uh really extends the name space like there’s a limit there’s a limit to

(05:45) the number of names like and that and the and the purpose of a naming system is you know to to to make memorable like easy easy to read and memorable names you know be able to convert them to something that’s really hard like ip addresses or like quality dresses or something like that so there’s a limit to the number of memorable like good names that you have on the tld side but when you break open when you add the second level like it hugely extends that and like that’s what one reason i think it’s really important i mean

(06:16) i think also like handshake you know what i love another thing i love about handshake is it’s like it’s just the decentralized root zone like one simple problem like one like just mission it’s a decentralized and secure root zone that’s it it’s not like ens which is like trying to you know like you know oh i’m not going to put down anything we use dns i like units but like you know it’s not like other things that are trying to solve everything or like you know it’s like focus on one thing make it you know

(06:48) everything all the code that goes into the core you know like like everything should be about that mission making a decentralized and secure root zone and then so once you have that foundation you can build on top of it you can build you know things on top of that strong foundation which is what makes badass domains so cool is that it’s anchored in that foundation of handshake whereas like you know dot f and like um name coin or other things like aren’t necessarily in that like so um so yeah i mean i think i

(07:21) personally think that the killer apps of handshake are gonna take in they’re gonna there’s gonna some of some of the killer apps of handshake are going to be at the second level like they’re going to be involved like the second level is going to be involved second level domains are going to be involved in some of the killer apps of handshake um and i mean like for example this is just kind of an example i don’t know if this is killer app status yet but like dot c like i’m watching the registrations on

(07:48) dot c names right now and it’s going crazy like it’s like a chart like just going straight up like that and uh you know i don’t know like you can speculate as to why i don’t know what i like there’s uh but like something’s happening there some things you know you can’t ignore it or you can’t like pretend it’s not happening something’s happening there so uh but yeah so anyway the the reason we did this uh for well i wanted to do this uh badass the decentralized second level

(08:21) domains is because we we built with park that i o we built like a registry system so we did a more centralized um a centralized second level dome uh system which is what they that if they wanted to like it would be really easy to plug in and start selling.c domains for example or anything from name base that you know anything that’s hooked into the registry system at name base so there’s advantages to that but it’s centralized so i wanted to see what would be a cool decentralized solution so that’s

(08:50) that is why um that’s pretty much why i thought badass domains would be a cool idea so now uh so yeah i uh i don’t know if you guys want to add anything on that before we get into that i’d like to jump in a little bit on the story too because um mike carson was really obsessed with the second level decentralized second level domains idea and we had a sub channel on telegram where people kept bringing up this i think this idea of a decentralized subdomain um fernando fauci was in there brandon d’s was in there

(09:24) people would bring it up in the in the dev chat and we’d take them into the second level domain channel um and and i i am one of the people that was telling mike that this is a silly idea like we already have decentralized top level domains like if you want a decentralized name like that’s what handshake did we just launched that like it’s it’s happening right that’s where it is but i get this idea of wanting the subdomains and how important that is too and also um like my background as a musician like

(09:51) artists love naming stuff like we just love naming things and the dot is part of our culture now this dot com you know what something is by by how there’s two words so handshake is bringing this one label url into you know the zeitgeist but people still want to have like a joey.

(10:09) badass obviously like i am a badass or or something like that or like dot c if you write a program at c having a dot c so i get that sub domains are important and the other anecdote that i have is that um we were speaking to an investor and he was about to buy a tld but the deal was that the original owner got to keep some of the subdomains which is an interesting concept and fernando falci described it as buying a building or selling a building but getting to keep one of the apartments or something and like this is technology this is new

(10:37) technology it’s blockchain that seems like something we should be able to do but on handshake like that’s not really how it works you can’t divide up the second level space on the blockchain if you transfer a name to somebody they have complete control but it seems like that should be something that we want to do so the idea of decentralized subdomains there were a lot of ideas on on how to do it censorship resistance decentralization on the second level there were ideas about um side chains and um there’s all kinds of like

(11:04) separate blockchains so what if you tell tld had his own blockchain um what if there was like a two-way peg sidechain and as someone who’s been watching bitcoin news for many years like we’ve been through the side chain discussion like a lot of people propose stuff for side chains and we didn’t really get a decentralized side chain yet it hasn’t really happened um not a two-way pick but but anyway so like there were a lot of imaginative ideas that i was kind of like ah you know this is clever but like

(11:30) i’m telling you i’ve heard people discuss this already and this is probably how it’s gonna turn out um and i actually spoke to some some very smart people who were involved in the development of handshake and i’m like can we do this can we do it like what if we use some of the handshake name space to do second level domains instead of top-level domains and most of the responses i got were the same as my initial reaction which is decentralized second level domains like why um but then there are these

(11:53) important use cases and the the obstacle to decentralize anything is you know you need some consensus system and especially if you want to be decentralized that means there has to be multiple verifiers miners or proof of stake or or something like that there has to be some way that if one party censors you another party won’t and that data is consensus and so you know it’s funny that we ended up using ethereum um we ended up using an entire other consensus layer too and this is one of the reasons why i thought decentralized

(12:22) subdomains were going to be so hard and perhaps so silly because like well we already are working on this decentralized consensus system called handshake if you want to do a dsld you’re going to need a whole other consensus system to process who wins that auction who gets who actually owns a name you know um and so yeah ethereum is a great place to do that or anything that’s ethereum compatible um there’s tons of blockchains out there i don’t know about tons but there are many ethereum killers just ethereum classic for one or like or

(12:50) um flare or or even block stack uh block stack rootstock um lots of other blockchains that still use solidity and stuff like that and they can all be a extension um the problem is that you need to get the users to verify all that consensus data also and that’s maybe an obstacle we can get into um later but yeah that’s i just wanted to share that extra part of the story yeah cool thanks yeah the cool thing about badass is like all the sub-domains are tokenized so they can do all these things with the subdomains like the

(13:23) website that’s hosted add a subject and check if someone owns uh something within badass to be able to accept uh be able to access that website and things like that so the way that badass was created um you could do like all these other cool programmatic features which i think is the really cool feature of it yeah yeah a lot of that stuff we didn’t realize until you know we got more into it and it’s like wow this opens up a lot of possibilities a lot of cool things that can happen from this and and badass does things that not

(13:53) really that some users like it does extra things we’re not just like the fact that the name badass on handshake is locked is awesome and the fact that the badass registry on ethereum is locked is awesome but with the same plugin and interface you can you don’t have to lock anything you can just take your regular old handshake name and use ens as your name server instead of having to run bind on an ip address and do it like that you could just use the ens get a name on enos and use it as a decentralized storage solution and the

(14:24) plugin can extend all kinds of other other ways to do that like footnote for example a lot of people have already used footnote or nomad um i’m pretty sure that protocol has a subdomain or like a a name server function that’s that’s you know decentralized um and they just need a way to point the handshake data at it and this is you know one way to do that kiba seems like they’re saying in the chat they want something they would like some examples yeah i i thought that example you mentioned i didn’t i never thought of

(14:54) that but that’s really cool like you’d have to like for somebody to visit the website you could check that they yeah so i’m like really into the whole like community tokenization space within ethereum so there’s like a lot of this like getting content where you have to own a certain amount of like here’s tokens which are just like fully exchangeable or you have to own an nft to be able to access some other nft which represents content so there’s that use case um but these are just like their tokens

(15:22) they can represent they represent this thing but you can do anything with that thing because it’s just like all programming so like whatever you want you can create um i was i like proposed kind of like ingest but that like we create like a badass dao where you um with like nft mine with badass domain so if you take these domains that you bought on the badass registry and you would like stick them into a contract and you like earn tokens back um which they’re not going to do because it’s a stupid idea but

(15:50) it’s like just like an example of something that you can do with all these tokens like they’re just they are a thing and you can make that thing do anything you want um and especially like you can create other systems built on top of that so literally because we locked up everything for like the handshake capital domain and the ens registry um the only thing that’s really controlled is the registrar i don’t know if you already like burn those keys mike but like right now i think the only thing that he can actually control just

(16:15) like the price of domains so like okay we can only access this like one like feedback so like what can we do with just the pricing um by like creating this token and then we can like have the pricing kind of like allow people to token to get coupons because you can create like another smart contract that like accepts the token but then the dialect puts eth from the registrar that from the actual sales like you can just do anything just your imagination um which is the great thing about ethereum is like there’s just like all

(16:40) the stuff that’s already built and then you can just like plug in your little thing into there yeah so i uh maybe it’s worth talking about like how we did uh some of this stuff and like i guess it’s broken the the two sides of the you know the two sides like what kibo was working on was like like the ethereum side like forking like ens and uh like helping like deploy and verify the code and all that and also the ens app which is the web interface that uh makes it easier to register and manage the domains which you see if you go to

(17:19) and then the other side of it was like on the handshake side and the resolver side like how do you see a badass domain and uh um matt did all that did the plug-in for uh a plug-in called handover uh which we open source you can see on github um and uh yeah it’s awesome because it you also made it so that like it was the first resolvable dot domains which is really awesome but uh yeah i don’t know keep it is there did you want to uh talk about how you did that or like like what like how like the how part of

(17:59) that yeah um like as you were saying yesterday and currently it’s like enos is super easy to fork they’re they’re really great smart contract system like they really thought through it and the reason why i could help you so easily was because like i had started doing research into ens a couple weeks before and i read all of their proposals for standards to the ethereum community um which they have like eight of them or something for like all the different types of resolvers for the actual ens registry so there’s

(18:26) like a ton of documentation about the es system so it’s pretty easy i mean like the actual code and like functionality is like not super well documented but the overall id and concept is very well documented for anyone that wants to do their own um and then yeah it’s just smart contracts just did a git clone and then i think i wrote the script that you used um which i’ve moved into like another repo now and it’s like a little bit more robust and it automatically deploys like a resolver for you um and everything now

(18:55) and yeah if you really run that script basically what the ens registry does is it um allows you to like take some domain and it generates a hash of that like actual string so that’s becomes like some kind of abstract hash so let’s store in a smart contract because you pay for all the data um and then from there it’s like a tree structures like all the subdomains are hashed based on the parent hash of the top level domain and yeah that’s how the registries work is you give the top level domain access uh controlled by

(19:25) a smart contract and that smart contract now owns the top of the domain so right it’s like not owned by uh mike carson it’s done by the smart contract and then that smart contract can just do whatever it wants with it and in this case we’ve set it up to accept ethereum and then it will give you whatever subdomain you want underneath that top of the domain um and that’s also one of the ens contracts that we forked so everything was just kind of already there we just with badass and actually the smart contract was probably

(19:56) the easiest part it was really the web app where all these things were like hard coded um but luckily when i did it with with badass i tried to change everything over to like environment variables so anyone can just change those environment variables and the app should work for the new topic yeah they they had hard-coded like that dot f into all like even the like the modules and stuff that you have to install so yeah we had to change it in a lot of places there but um yeah that was i guess that was the hardest part doing

(20:29) the the web the web interface and we’ve we ran into some issues where uh like some of the code hadn’t been pushed to like the co i think the code for the web interface had uh was relying on updated uh like a the latest version of the public resolver which we um didn’t so basically we had to i had to deploy that again which cost like another six hundred dollars in gas fees or something the good thing about like what zipkin did is that um it allows you to like formally delegate your domain’s name space to another name

(21:16) like your name server to another namespace um and so like what i was doing for my project which was allowing you to port handshake to any um other blockchain basically i was just doing like a text record with like some kind of nonce challenge but then when zip can make this plug-in and this like now it’s like a formal handshake improvement protocol whatever proposal um that makes like my job way easier actually for like doing my project so ideally um when i get this like cross network kanji thing going no one has to

(21:47) deploy any smart contracts so there’ll only be like one set of ens records or even smart contracts just the registry not like sub domain registrars you’ll still do that as a top level domain but it’ll definitely save you a ton of money on gas um because like the most expensive thing is definitely like the eoc 721 like nft token contract i think which probably cost like the most money um cool so yeah oh go ahead i was going to say how hilarious it is that how many times we have to say badass and and the other one of course is that

(22:23) is that the first e s name to have an uh eip 1158 data set well eip1158 is the actual standard for actual dns wire format dns records on ens which they don’t have an interface for so it’s very very possible that mike carson the handshake developer was the first person to add actual dns records to ins to the name dot youth and so all this time all my tests are like god is working can i resolve father right now or is the plugin working let’s check so this is like my carson’s personality on this project

(23:03) it’s great uh yeah that was fun so yeah matt do you want to get into how like what you did on the handover stuff yeah sure um there’s a lot to talk about i i’ll try to screen share if i can and i’ll show okay can you guys see um this uh test provably locked okay here we come i see it’s yeah okay so this is the the first step this isn’t even a plug-in yet this is um these handshake addresses here can you guys see this this looks like a long handshake address that’s um an encoded script and what the

(23:35) script says is that anybody can renew um the name saved by this address but nobody can do anything else to it it is a it is an address that does not require a signature um doesn’t require a public key or a private key but it only lets you do one thing which is renew and anybody can renew um and um what’s interesting about this is back in the test net days i thought this was a bug and i talked to joseph poon about it like do you realize that you can send a name to a script where like anybody can renew and then the whole idea of requiring

(24:07) renewals every two years on handshake like this is the cheat code right here if you guys don’t want to pay your renewal fee or you’re afraid you might lose your key like i don’t think this is a vulnerability i talked about it with a project founder we decided not to change anything like um you know you you don’t have you don’t have to have your own private key to renew you can make it so anybody can it’s this extra step but it’s a little weird it’s a little funky and stuff but like it’s

(24:31) it’s there it’s in the protocol and hopefully it doesn’t change because now we found a really good use case for it it’s possible in the future we software this out for whatever reason but anyway so it’s just kind of interesting so the first thing we did is we sent transferred and finalized first you set the badass records and i’ll show what those look like and then we lock the name badass on handshake in this way it’s a name that um nobody owns nobody owns the name badass but anybody

(24:51) can renew it um maybe i’ll renew it tomorrow and mike will renew it next year or something like that um okay and then so that’s cool one of the cool things and then hip five is the proposal that my carson and i wrote to um to make this standard so when we’re talking about decentralized subdomains what do we do how do we tell the handshake resolver to look at a completely separate consensus system um to get some name data and uh encourage people to read hip five if if if you want to it’s kind of interesting um

(25:22) so there’s there’s two supported standards now there’s dot ethan dot underscore eth and both of these tlds are blocked in the handshake resolver you can’t actually use them in any way even if you could win them in an auction which you can’t they can’t be used so that’s why we can sort of soft fork our own little function into them and so this text area here this is what the ns record looks like for cert for badass on handshake uh don’t forget this record can never be changed um and it’s an ethereum address followed

(25:49) by underscore eth and so normally a dns resolver will look at that and be like oh i need to go ask underscore eth about this weird second level domain and then eventually get an ip address um of course no recursive resolver is going to be able to do that so the handover plugin lives inside the hsd root name server i don’t want to get too technical but this diagram looks kind of interesting and maybe you guys can just kind of get a quick idea of how the story works that when the recursive resolver asks the root zone hey i’m looking for

(26:19) you know certified badass the root zone was says sure well i don’t have the a record for that but here’s a referral to this weird ethereum address.underscore eth and i know the recursive resolver isn’t going to be able to deal with that so the plugin actually is in the middle there intercepts the record as it’s being resolved and says oh i know that this is an ethereum this is a hip 5 record because it ends in underscore eth so it redirects the lookup to the ethereum contract gets the answer from ethereum and then

(26:47) returns that um and it was tricky to get this work with to get this to work with unbound and bind and um bns which is jj’s uh dns resolver written in javascript um and we had to do some tricks and there’s some limitations to it and not sure everything’s gonna work forever but we got certified.

(27:08) badass to work um and that this can also the plugin can also um resolve regular eth names like fuckingfucker.etherhumbly.eth um that which uh which which bypass uh handshake altogether and this is kind of one thing we touched on yesterday mike was talking to brantley about how handshake is a root zone and ethereum has its ens is not restricted to subdomains okay it has some subdomains like eth and um this is a way to resolve eth names so without even having to do what badass did or without locking your name on handshake or without forking ens um you you can

(27:43) you could use the actual like official ens and resolve it from hsd with this plugin um was that too complicated or not complicated enough or any questions that was good okay yeah there’s a lot i mean it’s awesome there’s a lot of cool things i mean not only on the handshake side and stuff but like to make the first resolvable you you made the first resolvable dot eth names that you can resolve in a browser with dns it’s pretty cool i know brony points or the bonus points um i i was thinking about it for like

(28:19) last couple days um as i was like expecting to talk to ens or like here dns at this conference and i think i found a way to get badass domains to be results from the traditional like the normal ens system which would then make badass domains resolvable from brave browsers and opera browsers natively which would be pretty cool but i still like write the smart contracts and figure it out but i’m pretty sure it’s possible um but yeah wow that’s so cool nice all right so do you want to try to hit some of these questions or uh

(28:54) sure why on ethereum not polka dot or cart or carafano maybe that means cardano we can do it we can do any of those the next thing i think i want to add is namecoin um oh by the way uh nick johnson lead developer of ens and and jeremy rand lead developer of namecoin both very available on irc and were super helpful i was still very helpful nick johnson was very helpful um you know learning about ems and stuff like that so that was a shout out to that guy who’s great um the top level demands that control the second level okay because the top level

(29:28) domain controls it okay thanks to all three we’ll pro oh we’ll promise you face with browser compatibility this is another good point because the the idea what i’d love the handover plug-in to use ethereum and cardano and polkadot and ethereum classic and and and flair and namecoin but and then we can people can resolve their sub domains and whatever weird smart contracts they come up with on all these other consensus systems every time you add one of those the user needs to run that like the handover

(29:51) plug-in right now uses the infera api it’s trivial to just set it up to use an ethereum full node but if if badass domains um become really popular and everybody wants to resolve them all the time everyone’s got to run a handshake node oh and by the way also an ethereum node if you want to be truly decentralized and trustless and so every time we add another thing like namecoin okay now you’re running three full nodes um etc yeah but ethereum data is super available right it’s yeah someone asked is the second level

(30:28) domain also decentralized um and yeah like you definitely own it no one can take it away from you um you just have to renew it and then yeah it will always be yours johnny says one more question who wants to ask one more question badass as a surrender okay all right well we’ll be we’ll be hanging around uh in the lobby right at the tables and stuff at the at the conference if people have more questions and we’re all available on telegram and and like that so um i think we can yeah you know any final words mike

(31:12) carson.badass uh no i mean i’m just excited i’m just super excited about what the possibilities that are gonna i can’t wait to see what keeba’s gonna do next with this stuff and like it’s gonna yeah it’s gonna i think it’s gonna be cool so anyway thanks thanks everybody thanks mike thanks cuba great work guys yeah thank you guys super fun [Music] you