Worldcoin đź› Proof of Personhood with World ID - Miguel Piedrafita, Flywill
ETHGlobal·Sun, Oct 9, 2022, 12:00 AM
Join Miguel Piedrafita and Flywill of Worldcoin for a workshop titled "Proof of Personhood with World ID". ETHGlobal hosted ETHMexico in Mexico City 🇲🇽 - our first IRL hackathon in LATAM in over four years. This year hackers had the chance to build the future of web3 with a chance to win over $150k+ in prizes from teams like WalletConnect, dYdX, AAVE Grants DAO, as well as experience talks from guest like Vitalik Buterin and Aya Miyaguchi! Thank you to the 580+ attendees from 27 countries who joined us for this unforgettable weekend of learning and hacking. For Mexico, 65% of hackers were from LATAM, and 46% were new to web3! Thank you for being a part of it! ❤️ After ETHMexico, we are heading straight into a full month of learning & building 🏗 Get ready for ETHOnline, our largest online event of the year! --------------------------------------------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
[Applause] [Music] we are here to talk about why crypto is really really awesome before of that though uh i would love to tell a shoe of friends who here understands spanish because we may be able to do this thing in spanish if everyone understands it otherwise no so if you understand spanish put your hand up that is all i think we're going to fall back to english still but uh thank you for that you can if you have any questions about that you can come ask us in spanish afterwards but yeah we are welcoming and we are here to talk about why crypto is really really awesome uh that did not switch there that seems wrong there we go okay so crypto is really really awesome i don't think i have to explain it i feel like everyone agrees why crypto is really good it has unlimited distribution it's decentralized all of these really cool things the issue though is that well it is really really cool it has a big hoarding problem where the people that got to it first have like got most of it and now the new people getting in have less advantage it's like less inclusive you have to be early basically and at one point we had this idea of what if bitcoin has started by giving one person each person in the world one bitcoin how would the network effects played out how would accessibility to this technology improve the world and so bitcoin is unfortunately really expensive so we cannot just like buy eight billion bitcoins and give it to everyone but we thought let's do it with a different currency let's do it with a welcome and pretty quickly we got into a big problem which is if we're if we're going to give something that is valuable for free to everyone people are going to try to game it they are going to try to claim multiple pieces and so how do we make sure that each person only claims their part once and there's this thing called civil attacks it's pretty common especially in like airdrops from the company which is from different projects which is when someone just like creates multiple wallets and pretends to be multiple people maybe they're doing like some activity to seem active and then just like give them the money and they sell it so that's not really good for the project that's not really good for pretty much anyone except for those people and that is called a civil attack and we we wanted something called civil resistance we wanted to be able to tell people online and we wanted specifically something that was both private inclusive and scalable something that the whole world could be onboarded into something that didn't require you to give out your personal information and something that didn't really differences from early or late that anyone really could sign up something universal and so we started looking into the options asking for email or phone serves as a way of identity but it's like i i personally have like more than 10 emails so it's not super civil resistant then maybe you could ask for a passport or an id but aside from like some people in some place of the world not really having ideas this has a big problem with the privacy part because then we need to store your info then we looked into something called web of trust which is when people authenticate other people and the issue there aside from a bunch of like mathematical stuff is that you need an initial web of trust source so you need an initial set of users that you trust and then people that are like super separated from those people maybe someone here in latam if this gets started in sf will be it will be much harder for them to get authenticated as human so it's not super scalable and then we looked into biometrics which is something that everyone has it's relatively easy to sign up and say okay maybe this will work and so there are multiple biometrics that we could use the most important measure here was what we call entropy the whatever we use has to have enough information so that we can tell eight billion humans apart an example of this is the fingerprint you cannot like fingerprints are not different enough so that you could tell eight billion humans apart just from the fingerprint and also if you make a little cut on your fingerprint now it's a completely new one so it is an also super simple systems we have the face but the face kind of has the same problem um face id from the iphone can tell you apart from around like 30 million people obviously it locks after 10 attempts but if 30 million people try to unlock it one of them could so it's also not super scalable for us we have the palm which has the same issue with the fingertip where you can just like make a little cut or have someone finger in the middle and that's again a unique one you have dna which could make me work but aside from being even more creepy than scanning your eye it's also really expensive to process and takes time and it's amazed so we go to the iris which stays constant after you have grown up and it's unique it's easy to verify and it's really really hard to change and so we started looking what can we use for these services maybe we can use our phone cameras turns out you need a really really high resolution for these things and the phone cameras are unfortunately not enough same thing for off-the-shelf devices devices that are built for this like whatever clear uses or all of these other sources these also have the issue of they're usually made to verify not um identify so what that means is you will put in your id and it would say okay let's make sure that this is miguel i'm going to check their iris with like the iris that we have stored for miguel what we want to do is make sure that my aries is now in a list of 8 billion eight billion um eyes and so those tools are not built for that and they were like okay maybe we have to build custom hardware and that is not great no one wants to build custom cargo it's a really really hard problem but after a while we ended up building this thing the arm this one is the special mexican division um which basically takes care of um making sure that you're real making sure that you're not trying to trick it by scanning a dead body or a pet or just like showing a picture of an eye to it and then it will look at your iris and it will compute what we call an iris code which is then used to register you without actually having to save the photo of your irises because again privacy is really important and so we have a solution that will our is this thing one slide kind of have the feeling that every time that i press the button it's just like one slide below anyways we can work with that i'm just like sorry for the context before uh but um basically we have a solution that doesn't require images or your name or contacting for any or any ways or traditional kyc we just have this iris code that is computed from your iris but that's that's not really enough we wanted something more because even with the system if we just like said okay this wallet is verified then you can kind of track your wallet across different users of the protocol and figure out who they are and so we looked into using c knowledge proofs now we jump to anyways we looked into using c knowledge proofs in order to fix it and we ended up with a system that is pretty complex jumping around anyways we ended up for a system which is like pretty complex but it works really well it preserves your privacy it's fully private some even maybe anonymous where you can just like get scanned it you get added to the list and then you can anonymously verify that you are on the list which are revealing which entry of the list you are so this was great we said let's let's go outside straight out we went all around the world to more than oh it's just like delayed a few seconds okay to more than 25 countries and we tried it pretty much anywhere that we can think of we onboarded [Music] we onboarded more than 650 000 people it's changed a little bit since this image because we keep growing and it is fully open source as well uh you can check the core the code for the open source protocol and we're going to continue open sourcing the hardware of the europe and everything else but there was one thing that kept coming up um since everyone was saying you built this whole system to give out your coin to give out wall coin to everyone um isn't it a shame that you can you're only going to like use it once and then throw it away and there's a bunch of other apps that could also use this civil resistance that you're building and something that is scalable at this why can we not reuse it and um yeah we want to rebuild that and we with a protocol called wall id which allows you to reuse the same security and verification that we have created ourselves to do all of these things and so quality is a protocol to anonymously verify that first of all someone is a real person but also they've never done something before like claiming working or boarding a governance proposal and it does this completely anonymously it will not reveal any information so for example i can prove i'm a real human and i have never claimed well coin or i have never voted in nepal or mint nft or redeemed this air drop or even completely wept to things like join the discord or follow someone on twitter and the system that enables all of these is really really complex specifically because we want to maintain privacy but the really good news is that you don't need to really care about any of these things integrating this whole thing into your app basically takes um [Music] this code you put this in it will show a captcha like widget which is um there that captcha and so users can just like click that scan the qr with their what shows up with their welcoming app actually using qualcomm we saw before and then um you just like verify that either through an api or on saying with our contracts and there you go you have seen resistance so for example if you have this example air drop you literally just have to add a wallet in there and there you go it will pop in the app as this application wants to re-file your human you click verify and you get the whole thing that you can then verify anywhere so it's really really easy and it's really really powerful too it's super flexible we've been talking for ages about all of the really cool things that uh having simple systems could enable and and now we have civil systems so we can start playing with all of these forms of quadratic voting and funding we can do errors we can do social incentives all of these really really cool things and also you can use it obviously right now we have um developers.working.org we also have wallpaint.org mexico which has all the resources that you guys will need and just like to show again how easy this is paolo here is going to actually add wall id to them to an app from scratch so we're going to take an app to mintapo app and we're going to show you how you would make that civil system it's a really simple app it doesn't even use insane it makes use of the api but i feel like it's a really good example of how you how easy it is in literally five minutes to make sure that your users can only make an action once or register or any of these things um while that's loading i'll share a bunch of examples of what we've been using this for one of the things that we've been doing is we have a discord bot where discord has this really big spam problem traditionally even though they have captchas for signing up because someone can just like complete the caption multiple times and then you go with multiple accounts and start the email spamming people and so we made this bot that allows you to verify with quality once you join the discord and then it will make sure that you can only have access to the channels that you want to your users chat to if you've been verified once so that makes sure that um that make sure that only one one account per this when account on your server will be a human and also if you want someone they're gone forever they cannot come back so i feel like it fits really well the idea that we traditionally have of one user equal to one human now paulo is going to demo how you would set up from scratch all right thanks miguel i'm gonna do a live coding session and show you how easy it is to integrate world id this is a demo so hopefully something will go wrong but let's get let's get started so easiest way to get started with world id is going into our developer portal our developer portal will walk you through all the all the ways that you can integrate world id and basically we have two ways you can integrate on chain or you can integrate with our api under the hood the api is doing the same thing it's calling our smart contract to verify everything on chain we just abstract that complexity for you if you just want to do something off-chain so as miguel mentioned what i'm going to do is show you an example of claiming perhaps but you can only claim once verifying that you're a unique person claiming a pull-up so we have this very simple uh website where i can claim a pull-up but anyone can come in and just uh get all the posts for themselves so what we're gonna do is we're gonna we're gonna create an action in our developer portal should be very very simple um this is the important part where you select if you want to run this on what we call cloud which uses our api or if you want to run it on chain we're going to do cloud for this example and create an action here so it's going to give you like all the instructions of what you need to do which we're going to skip for now because i'm going to do it and you the only extra thing that you need to configure is how you want to display uh the the verification in the world coin app so you can say something like uh claim my po app once and you'll get here something called an action id the action id is what scopes the uh verification for the user so when when you get a verification from world id you'll get three things one is the zero knowledge proof that verifies that you're a unique human two is the merkle root which uh aids with that verification and number three is a nullifier hash that hash is quite important because that is the unique identifier for that person for your app so you can use that as a as a unique user identifier but the cool thing is it will not uh track users across apps so i'm gonna i'm gonna take this here uh and then uh we're gonna start with the development so i'm gonna set this um action id now i'm gonna install here the the the world coin uh sdk i'm sorry i think i need my glasses looks like internet is not helping us out here there we go so i i just i just need to um very important if you're using next uh the javascript widget uses a dependency that requires windows so you're going to have to do a dynamic import should be quite simple so you import the widget we're going to say statistics widget props and i have the widget so i'm gonna i'm gonna insert the widget here the signal is a string that you need to pass it's part of the zero knowledge proof verification it's an important security measure depending on what your app is in this case uh it's not necessary so i'm just gonna add an arbitrary string uh i'm gonna u mount the action id and then we're gonna say on success set proof which we're gonna create here all right and then we're gonna say like don't let the person claim the pop unless the proof is set and we're gonna run this so now i have the the widget here now i need to verify the proof so i i'm gonna go to my handle claim process and then we're gonna do call the caller api here where we send the signal is my pop and then the proof and then if the response is successful we're gonna redirect the user to the claim url and if it's not we're just gonna console error and then set error error claiming there we go and this is our api request so the cool thing is like if you're if you're using our api in the developer portal you just need to call our api to verify that the response so it will look something like this there we go and then we'll just send rekt.body and then again if verification response is successful we'll send the the pop url if it's not let's just send an error and i think we should be fine here oh we're missing and i wait all right so let's try this out so i'm gonna i'm gonna verify i'm only claiming my pop once i have my world coin app here which you should be able to see so the user the user flow is the user clicks on the captcha then on your worldcoin app after you've verified an orb you have your role id you scan the qr code we connect through wallet connect which is like a pretty cool thing you get here the prompt you can see here this is what we configure claim ipod once you can add whatever whatever text that you want and you can do the verification once the verification is done i can actually go and claim my po app um looks like there was an error oh thank you we i missed a little thing here let's try this again and i can actually go and clean my pot and the cool thing is if i go back and i as the same person using the same world id try to do this again i'll get an error saying that i've previously verified this so it's quite easy to integrate if you want to go the smart contract route you should just go to our starter kit uh it's worldcoin slash world id starter we have a very simple smart contract that will let you uh do the this verification on chain as you can see the the the the critical code is just uh calling our smart contract to verify the proof and if it's valid you just execute your action if it's not valid it'll just rebirth so uh should be quite simple if you guys have any questions we'll be around and we're happy to answer english or spanish and yep thank you so much what we can we can go we can do more stuff oh yeah and also we have uh 20 k in prices we have three main prices we have two honorable prices and then we have a pool apple for everyone i yeah and we also have the notion we have this url that you can go to which i mentioned before um worldcoin.
org slash mexico that has all of the information about the prices starter resources the documentation the developer portal everything that we mentioned here and everything that you will ever need it's on that pc again it's wallqueen.org slash mexico and as i was saying before we have 20k in prices which is uh for best use of the protocol we have 5k uh 3k and 2k for the three best uses we also have two 1k prices for honorable mentions that will make the top still really cool and then we have 8k distributed amongst everyone else that qualifies and yeah really really excited to see what you build like we said we'll be on the booth most of the day we're also in the discord anything that you need we're willing to help in english spanish and good luck [Applause]
Automatic transcript — names and jargon may be misspelled.