[ETH Seoul 2023] Global Proof of Personhood in the Age of AI by Penryn
ETH Seoul 2023 · June 2023 · 26:19
Penryn, who leads developer relations at Worldcoin, explains World ID, a privacy-preserving proof of personhood protocol for telling real, unique people from bots in the age of AI. The talk compares phone numbers, KYC, webs of trust and several biometric options, explains the iris-scanning Orb, and shows how developers add Sign in with Worldcoin through NextAuth and anonymous actions through IDKit with nullifier hashes. A simulator walkthrough and hackathon bounties follow.
Topics
From ETH Seoul 2023, hosted by Kryptoplanet.
Transcript
foreign [Music] I'm Penryn I lead developer relations at World coins focusing on building with World ID and I'm here to talk about global proof of personhood in the age of AI so who in here has heard of worldcoin before quite a few of you all right and how many of you have ever built something using World ID I see two hands which makes me very happy so in this talk I'll go over what world ID is what world ID does and what it doesn't do why worldcoin created World
ID what you should do with World ID and how you integrate it into your app and can grab your slice of the twenty thousand dollars worth of bounties that we have for all the hackers here so to start World ideas here to solve one big question how do you know who or what is a real and unique person right it's really really tough to know who's a real person and solving the Civil problem is a huge issue for web3 and even in web 2 as well it's a useful problem for all of Tech but the solution has its roots here in web 3.
so to solve that problem we have World ID it's private inclusive and robust right those three things are super important because we want as little information as possible about which real human you are which is you know a big issue with a lot of other ways that you prove you're human we want it to be inclusive so that as much of humanity as possible can be a part of the system to prove that they're human and we want it to be robust to ensure that one person gets one identity in World ID and you can't have multiple accounts per person so with Pathways we looked at having proofs of personhood we looked at email
and phone which I've got multiple emails I've got multiple phone numbers not that great of a solution but is a Step Beyond just they have an account we looked at doing kyc on official IDs but that's very invasive you're giving up a lot of information about your identity and less than half of the world has a digitally verifiable identity so it doesn't it's not inclusive enough for what we want to do we looked at webs of trust but the issue with the web of trust is that every jump further away from that initial core set you are the less powerful that proof of humanity is and every implementation of a web of trust so far has had this too
small of an initial set and that leaves us with Biometrics which might initially sound invasive but I'll tell you how we managed to do it in a way that isn't we looked at a lot of different ways in order to do biometric verification of humanness and uniqueness fingerprints and palm scans and face scans were some that we looked at initially and while those might be good for letting you log into your phone telling if this person presenting themselves now is the same as this person who presented themselves at sign up is a different problem than determining if this person presenting themselves now is different from every person who's presented themselves to this system before Touch ID and face ID on your phone can distinguish about one in 30 million
people we need to be able to distinguish one in a billion people right we also looked at DNA which highly invasive it tells you a lot about who a person is you can determine things like race and sex from that for example and that's not what we want so we settled on Iris scans right it has a high enough level of entropy to determine one in a billion people it's been highly studied and additionally the iris scans that we do make it very hard to passively capture that data right people talk about face tracking where you know if you're just walking down a street and there's a scanner it can scan your face but Iris scanning requires a
level of attention which means it requires a level of consent no one can passively scan your iris in the way that worldcoin can and when it comes to that Iris scanning there's a couple different ways that we looked at doing that we looked at phone sensors we looked at off-the-shelf Hardware but phone sensors didn't have enough resolution they couldn't get enough data to distinguish in the one in a billion people that we need off the shelf Hardware wasn't trusted enough it was clunky it didn't suit our needs exactly so we settled on building custom Hardware which no one really wants to do I find it fun personally but it is like a very tough process so we settled on the orb and I have a
clear orb here that if anyone wants to look closer at it later you can all of the hardware is also open source and the orb has been in development for a few years we've gone through lots of different revisions of how we can scan more effectively more securely and with the orb it does a couple things it makes sure you're real it makes sure that you're an actual human presented in front of it not a photo of a human for example it checks your iris code is unique so on the orb device an iris code is calculated from the photos of your irises taken at the orb those photos never have to be stored anywhere they can be deleted from the orb if you
choose to have them stored it's entirely opt-in and if you have them stored it means that if we upgrade the algorithms in the future you don't need to be rescanned but again entirely opt-in and with this process it verifies your world ID your self-custodial identity currently available in the world app which is the app that worldcoin has created and put out into the world ID is sort of like a global digital Identity or it is a global digital identity protocol it's somewhat like an internet passport right you have your proof of personhood credentials right now you can verify yourself at the orb we consider that to be the gold standard it's a very strong proof of humanness or you can verify with a phone number if an orb isn't
available in your region for example and in the future we'll be adding support for more forms of you know these proof of personhood credentials for us this proof of personhood is a spectrum right it's not you are a human or you aren't a human it's How likely is it that you're a human how sure can we be that you're a human so for example if someone's phone verified with World ID perhaps you give them one dollar a free credit whereas if they're orb verified you give them ten dollars in free credit we design World ID to be privacy first decentralized and open source worldcoin has to collect no identifying information about who you are your phone number is not required we
never ask for your email we have nothing about your name or who you are decentralizing is an important part of what we're doing uh while or verification is something controlled by World coin at the moment we are going to be opening up the protocol to other companies forms of humanist verification in the future and it's open source idkit our front-end widget is open source our smart contracts are open source and for the things that aren't yet open source we are always working to open source them when we can and there's a lot of different things you can use World ID for it's really useful to know that a user is a unique human in a lot of different circumstances voting is a great example you can make sure that one person gets
one vote instead of one wallet address gets one vote or one token gets one vote you can have a very fair system for social media everyone wants to know who's a real human and who's not we've all seen what's happened with Twitter and how Twitter blew and verification is trained drastically but a system where you know this is a unique human behind this account but they can still be an anonymous account they don't have to give up their real identity you just know it's a real human customer incentives I already talked about you can give you know a little bit of free credit for someone who has a lighter proof of personhood or a lot more free credit to someone who's been or verified events you want to know that it's real human signing up and not Bots tons of different use cases and if
anyone wants to talk about what your use case might be in the hackathon I'm happy to chat with you at our booth after this talk and we designed World ID to be super easy to integrate both for web 2 and web 3 use cases you can use World ID on the web you can use World ID on your mobile device you you can use World ID on chain and there's two main ways to use it you have sign in with worldcoin and Anonymous actions let's start with sign in with worldcoin so who here to use chat GPT before all right I see a few hands I think it's actually more people than raise their hands but I won't say anything
and when you sign into chat GPT it uses auth0 right so you can sign in with your email or sign in with Google or sign in with your Microsoft account and very shortly you could potentially hopefully sign in with worldcoin when you sign in with worldcoin you tap the button and it takes you to our page you see a QR code it's very simple you scan that QR code from your phone you can go in the camera app or you can scan it from the world app and it pulls up this model that asks you to approve your sign in it tells you what you're signing into if it's a verified app and then you're signed in now if you want to integrate sign in with worldcoin there's a bunch of different ways all
zero as I mentioned there's next auth you can use the oidc well-known file with another provider build out custom oidc flows but for now let's focus on how you would integrate it with nextos this is all you need to integrate World ID with nextdoth when you configure your next auth provider all you have to do is fill in this information set the world ID application ID and your client secret from the oidc provider and then it works it's super simple next auth has made this incredibly easy and this is all it takes in order to integrate signing with worldcoin into
your app with next auth specifically if you're interested in using sign in with worldcoin we have a three thousand dollar Bounty for the best sign-in with worldcoin use case and now let's talk a little bit about Anonymous actions Anonymous actions are a little bit more complex than sign in with worldcoin Anonymous actions let you prove that you're a unique human doing something once with a specific signal although the signal is only supported on chain so what does this mean when you do an anonymous action you get that verification that a user is human and you get to know which verification method they've used if their phone or verified you get to know that they're doing something once because every time the same user takes that same action it will
generate the same nullifier hash that nullifier hash is sort of that unique identifier for that combination of user and action and the signal for on-chain use cases is part of that zero knowledge proof generated on a user's device that will make sure that the information they wanted is part of that proof that can be their signal in a vote who they're voting for or what they're voting for or if they're claiming an airdrop that can be their wallet address it ensures that that is part of the proof and hasn't been tampered with so to integrate sign in with worldcoin everything starts with ID kit so idkit is the component you can use in
your react front end and this is all you need oh wait I'm sorry this slide is not supposed to be in here sorry it all starts with ID kit ID kit is this modal right the one where the user scans the QR code this is all it takes to integrate ID kit it's one component you have to pass it your action name your app ID the function that you want to call once a user's verification has been returned to your app that's on success handle verify is optional but I can explain a little bit more about that later and you give it which credential types you want to accept for this so you can limit it to only people who are or verified only people who are phone
verified or people who have either one you have a single button that opens ID kit and on your front end that's quite easy but you have this response from idkit that gets passed back to your app your Merkle root is saying which Merkle root that user has been validated Within the nullifier hash again is that unique identifier of that user and action combo the proof is this very long hexadecimal string from semaphore that actually is the zero knowledge proof and as well you get the credential type they're verified with but you have to do something with this just having someone verified on the
front end alone is not enough to know that they're a real human because people can manipulate things in the front end you still have to verify the proof you still have to verify the proof you still have to verify the proof I want to make that super clear because if you don't verify that proof anywhere you're not eligible for the bounties and you haven't integrated ID kit correctly I just want to make it abundantly clear that you have to verify that proof and how do you do that so one way you can do that is verifying it with the worldcoin API we have an endpoint the API V1 verify endpoint with your app ID at the end of that you simply pass it all of the
information that you got from that uh the from ID kit that Merkle root that nullifier hash that proof and the credential type and then you'll get a response from our API that says yes this user verified or it will return an error code indicating why they weren't verified that can be that the Merkle root was invalid that can be that they've already verified for this action before in the developer portal for the API verifications you can set an arbitrary number of times you want to let a user perform a certain action you know oftentimes that'll be a single time you want to let them do that sometimes that'll be an unlimited number of times you want to let them do that
but if you want to let a user do something three times say you're a social media platform and you want a user to be able to have you know a docs account an anonymous account and you know a third account just for whatever they want you can let them verify up to three accounts but only three accounts but what I'm sure most of you are interested in is how to verify proofs on chain in your hackathon projects so when you want to do on-chain verification you have to instantiate the world ID instance so you pass it the address of the world ID contract we have ens addresses or ens domains that resolve to those you can find those in
our documentation and then your app ID and action ID so then you have to create the external nullifier by encoding and hashing the action ID and app ID together and then you have that instantiated and then to actually verify that proof you call the verify proof function on our smart contract you pass the Merkle root the group ID which will be zero if you want to check if a user's phone verified or one if you want to check if the user is or verified you give it the encoded and hashed signal if you want to uh if you aren't looking to use a signal you can leave
that as an empty string uh you give it the nullifier hash the external nullifier and the proof and then it will revert if the user cannot validate if they've already if any part of that doesn't validate properly but if you want civil resistance for your web 3 on chain verification you have to handle that yourself and we see that here so if the nullifier hash is already in the list of nullifier hashes we revert because we know that they've already performed this before but if the proof verifies the next thing we do is add that nullifier hash to that list of nullifier hashes so that we basically check the box that yes they've
done this action before so for the hackathon As I said we have twenty thousand dollars in prizes we have five thousand dollars to the best overall project three thousand dollars the best governance use case three thousand dollars the most creative use case three thousand to the best sign-in with World Coin App three one thousand dollar honorable mentions and a three thousand dollar prize pool for any project that properly integrates World ID or sign in with worldcoin so our SDK is currently still invite only uh if you'd like to get access now please scan this QR code or go to the link on your computer uh if you don't grab this now you can
also come ask at our booth and then I'll I'll give everyone a minute to scan it who wants to I still see a few more phones all right and then at worldcoin.org Soul 23 you can see a notion page that we've compiled with lots of information and resources about what we're doing here at esol so you can see the bounties there there's links to our starter kits both for on-chain and off-chain use cases all our documentation blog posts that dive further into how World ID works and our FAQ
and that is how to integrate World ID so I figure I'd also give you all a quick demo that should hopefully work we did just update our simulator so for production use cases right actually perhaps I should start with the developer portal so the developer portal is at developer.worldcoin.org you have to sign in with worldcoin for this um I don't have a cable to connect my phone to my computer otherwise I would put it up on the screen as well but to sign in with worldcoin all I have to do is scan this QR code it opens up the modal within the app as I showed earlier
it's waiting for my phone to finish I just tap verify with World ID proof is generated on my device sent over to the idkit front end and we are now logged in so with the developer portal I can create an app I can just name this Soul demo the description is optional but there's two things you have to choose here you have to choose if it's staging or production so if it's a staging app proofs will only validate if they come from the simulator which you can find at simulator.worldcoin.org or production apps which will only validate with proofs from the app the world app on a user's device so we'll go with a staging
app and then we have to select cloud or on chain so Cloud actions you verify with the API or if you want to do sign in with worldcoin you'll also create a Cloud app on chain you can only validate on chain so we'll go with a cloud staging app for example I'll create this new app and then from there I have to create an action so I'll create a new action let's just say verify at each soul you have to give a description that explains what you're asking users to
verify in order to do so let's just say test here it creates your action identifier this is what you will pass to ID kit and pass on chain and then you can select how many verifications you want to allow so I can say up to five I can say a hundred but for this let's just go with unique only letting a user verify once so I create my action why is it not working here let's see if it didn't like how short my description is all right let's refresh the page and try
again and now we've created an action so if I wanted to go ahead and integrate this into my app I just have to set the app ID and action ID in my environment variables so you can do that with in your local.n file you can do that in your versel environment basically that just has to make sure it gets an ID kit so I put together a brief uh brief demonstration of using World ID for an
off chain use case I wanted to let people claim a free item from a Shopify store and they get a more valuable item if they're verified with an orb or a cheaper item if they're verified with their phone so let's see if the simulator is working properly once idkit comes up if you're testing with the simulator you can actually just click on the QR code to copy that to get that over to the simulator you'll insert your QR code manually paste that in there hit submit this has been sitting here for a bit so I bet I just need to refresh the simulator or do I need to log out and start from
the beginning well let's start from the beginning of the simulator so when you start from the beginning right now the only chain that the simulator works on is polygon Mumbai but as we will be transitioning to optimism in the near future very shortly you'll be able to also do this on optimism so I can either generate a persistent ID where I would sign in with a wallet but for this oh I took myself back to where I was for this we will create a temporary ID so I click this it takes a second but it will take me into the simulator
and I'm not verified right now I am not verified with the phone I'm not verified at the orb so I can click verify my identity let's start with phone number verification so I click verify this is a fake phone number but now we can see that I'm phone verified so if we take this QR code and insert it here this might not work because it typically takes a couple minutes for that identity to be inserted on chain in order for the verification to work but I have put in the QR code I'm going to verify with the phone it knows that the verification hasn't
been put in yet I'm going to try continue anyway and see if it works it appears that it did but the success is just called once idkit has returned everything properly this does not mean that the proof is verified on the back end yet so if I click here it appears that it did not work unfortunately that's all right I can show you another example of what it does look like when it works properly so we go to try it out in the docs and let's do a staging app let's separate these tabs and we'll open up the simulator in split view here so the action let's just say
you want to accept phone credentials continue with worldcoin oh we need to update it in the docs because it doesn't have the click for the QR code unfortunately that's unfortunate let's go with production just so I can demo this on my phone again let's go with orb verification because I am or verified on my phone I scan it's waiting on my phone verify with World ID
and it's successful so that's a brief overview of how you can use the simulator or how you can test it out in the documentation in the docs there's lots of information about world ID overall how to use idkit specifically how to use our API how to do things on chain and as always if you have any other questions you can reach out to me at our booth here you can reach out in the worldcoin Discord um and yeah I'm always here to help you build on world ID here at the hackathon thank you foreign
Related talks
- What is Aztec
- The Next Renaissance: Privacy, Identity, and the Future of Crypto Growth
- The Entire History of You Is Being Sold by Jesse Leimgruber (Devcon4)
- Privacy: Past, Present and the Post Quantum World - Dr. David Chaum | ETHDam 2024
- ZK Badges: A new primitive for self sovereign identities by dhadrien | Devcon Bogotá
- Privacy and AI
- ZKpassport: Private Unforgeable Identity
- Exploring Proof of Personhood: Privacy, Biometrics, and Why It Needs Ethereum.
- Introducing Self Protocol
