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

Loading player…

Sismo 🛠️ Sybil-Resistant and Privacy-Preserving Airdrop Using Sismo Connect - Leo Sayous

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Join Leo Sayous from Sismo for a workshop titled "Sybil-Resistant and Privacy-Preserving Airdrop Using Sismo Connect". Welcome to back to ETHGlobal Waterloo, where it all began! Returning to Canada's tech hub, we're thrilled to bring together international enthusiasts and local talent for an unforgettable hackathon experience. This year we had 650+ attendees from 29 different countries and 47% were new to Web3! We concluded the weekend with 168 projects submitted and gave away $250,000+ in prizes ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Music] and today we are going to do a workshop and it's I think a pretty exciting one because we are going to cut lifecode and deploy a CB resistance add a lot um from privately aggregate data and so this made sense a bit easy but in fact not is that easy because we are going to use sorry we are going to use uh to give on this adverb some amount of token that depends on the data you are able to share and this data can be on different accounts and using zero knowledge proof we are able to only disclose the data we want without revealing the accounts so in its call it will have CB resistance privacy preserving data aggregation so aggregation from data from your very private toilet your previous from gita.com Twitter account and stuff like that without linking these accounts and at the end you will have a double spending protection also uh to avoid to be able to mean this token a lot of different time so I propose to answer directly in the demos so you understand what happens uh directly and so let's go so all of this um has um it's called his Rod um all his open source you have a case today with it which is very detailed so you can later I will sound the QR code and the link at the end of the workshop but you can dig into it and more understand the concept but so we will see different uh important ones so when we launch the app we see that we have a claim token page this claim took a token depends an action you made functions here inside the system community so um to have your token you need at least to be parts of the system Community member group I will explain you whether all groups later you need also to have the gitken passport although with more than 15 possible resistance and then you have also optionals data you can share that will increase your amount of token for instance you can show that you were early committee members on sismo that you use the factory which is a product of system I will show you later uh as a new pages rest where you want to receive this uh this okay and you are going to prove that web is different data using sign in with sismo and sismo connect that again I will explain you later how it works yeah just here we need a Wi-Fi okay so here I arrive on my system redirected it's like a password manager where where I have all my accounts that I imported once when I created my Cisco data board I can import other icons whenever I want like your password manager and then here sismo connects show me that safe drop wants me to share some information and this is this different data different information will be taken from um what we call data gems these data gems are just data you are going to share and with anonymization around the owner of the data typically here this is data I edit from one account but the other one the data re users is from another account and by sharing all of that I won't make any link during using their own language proof so I can aggregate data from my very private toilets and some model from privity credits so I need to generate the proof so here it's belong because it download all the groups of data of all the holders of the different data gem in the browser and uh so what happened here is that you find we find the you you generate the ZK proof or you put who you are inside this group without revealing this account so if the Wi-Fi is be slow it takes a long time to download all the groups basically and these groups are maple tree I will explain you later but this how the zero Niche performs okay so here I share all the information so we see that we have a so I'm connecting my token oh sorry I need to change my Network but here we see that I'm available for 400 R token um I will redo the flow and hide some information and you will see that it decreases for instance here I won't show that I am a system only user and that I'm a factory users and I can do against the CK proof hope it will be faster this time so now I have a less token to claim let's claim it the construct was deployed on polygon and so what we're going to do during the workshop is to cut the system community group and the Bitcoin password groups and live deploy this contracts and test it at the end um okay foreign to explain what happened um so in this mode you have this small data volts where you can import all your icons here we can see that I I import in my unit 21 dot is address where I have my ens my econ password because my click on passport all the difference um very public account I have my Twitter my GitHub I have also a proof of humanity which is inside so it's already all of that are already docked but on my on system I'm doing stuff with my very private wallet so I don't want anyone to to know it when I import this uh what we call data sources into the system data world I can then share this granular piece of data so this is called the data gen so data gen is just a granny loss of rain data here it will be okay on the gitcoin passports groups of all the holders of a Bitcoin passport I have a 42 as a score inside it and my new 21. is and using sismo connects which we call a crypto native SSO it's like a communication protocol between my very personal data and application I am able to granularly reveal this data so here we see against the flow I sign in with Cisco from an app I'm redirecting to my system data world I agree to share different data and then I'm redirected to the application that so what I can I can do exactly from this smooth data works it's having uh for instance here I can prove that I own the leo21.is address but I can prove also that I own a guitar background a Twitter account and something else that is called a volts Vault ID I will explain you later how it works and you can share some data gems so just disclose that I am part of the git coin password groups with a score that is more than 15 with the application won't know that I have 42 in fact and that I am also this is no community members but the application won't know from which accounts I am a system Committee Member and finally I have the message signature which is at the end and it serves to unbanned embed user entrance for instance um you can say for example for for voting you could say I agree or I disagree so it's really to embed user sentence here I will put my leo21.is address I tooken on this address and it's used for avoiding from training of my proof because otherwise my proof could be front-end by other address and claim for myself the token okay so um in in seismo connects what you are doing is just selectively disclose some data it was using zero Andres proofs so you have approver in the system and the application as the verifier and verifies this proof so here if I take back my data gem I show you later so um sorry made a dream I assure you before I had a Bitcoin passport on my u21 with a value of 42.

using 0 and rage proof I can granularly selectively disclose that I have a score that is more than 15 and it's on and on we don't know which accounts um basically although this works using SnapChat groups so in sismo you need to generate the groups the system data groups with all the order of a Bitcoin passports and with a different value that it has a different score that it has in the same way in this small contributor you have a different level to have different uh amount of token in the in the in the safe results I showed you before and you can disclose which value you have um all these groups as a group ID I will show you later when we will code how to retrieve a group ID and how to create these groups using our Factory or directly using our repository which is an open source Repository so finally this is sismo connect the flow I already show you it's very simple you have a button in your front end you do a system connect request where you request the data you want the user generated in his sismo data world to generate the CK proof this response which is in fact is sent back to the applications that can verify it it works on chain we are deployed on 11 chains so many networks Etc and it also works of change so you have a typescript package that you can install into your application to verify the converge proof so seismo connect response so now we are going to uh to do this to do this slides and uh we are for to to start this project We are following a tutorial that we have made uh which is in our documentation I'm going to show you so in build with seismo connect here we have all our tutorials so unchain one which is build a screen resistance elsewhere from privately aggregated data is basically what we're going to do um so I already uh set up I already set up some the repositories so we don't have to do it with the time we have so when you launch it you are redirected to this page it's the main page so it's a bit different from this one yeah there's a channel different it's a bit different from the same thought it's a very easy template to start with you have only the system connect button inside it which is here and we are going to create these requests that allows us to have the data we want for the savings Rob so yep we first wants to generate this type of requests so we want to have the proof of a voltage I will explain you later what is it share that as a choice seismo Community member and that you have a geek and password more than 15. so let's come back to our Repository so when we do claim with sismo so here I've just launched it I'm redirected to this page so I can see that I have only connect to Safe develop so it's not a good application I need to create an application using the factory we are going to do it just right now and here I only sharing the user ID but we are going to add also so the the different proofs that you want to send back so here let's go to Stats by giving the right application so for that we need to go to the Factory The Factory is a UI tool for developers to use gismo and to have access to different tools so the first one is to connect to create the system connect apps or to to retrieve your existing one um and then we have the system data groups I showed you before and we are going to dig more into this after so let's start from the application here you can see I've already created it so I have an application ID I will be able to embed into my projects you can update it's very easy to do you just have to enter the name description a logo and you create it it's it's done right away so here I'm taking the app ID and going so in the system connect unchain tutorial I'm going to the main page here so inside it you have this data this directory structure it's basically a react app an xgs react app with Android so here you have CRC are drop the contract I will show you later and here you have the fountain with the main page so at the beginning so all of this is explained in the tutorial if you want to do it after you will have all the steps that is very detailed um to begin with we need to so let's try to find the system correct button which is here and we have the config to Define uh we start by defining the Apache so this issue is the one with the tutorial we are going to replace it with our new applied okay let's come back again to our uh reposit to our page doing claimway system and now we see that we have connect to Safe lob is global weather so let's go back here for what we want so we want to prove ownership of a volt ID show data from system community and glycoin passport more than 15. so what is exactly this this voltage so so I have defined it here basically inside your system data works you all have a World secrets that was generated when you created your smaller tablet cell we just show you that you have an app ID for each app that comes through the Dual system connect Exchange when you do this and you request a vote we are hashing in the one knowledge plus inside the proof The Vault secrets and this app ID and also the derivation kit is not very important for here it's zero by default but by hashing of all secrets and this app ID I will have a unique word ID that is a bit like a user ID that is available for the application and that you can use as a user so it's really like um like a unique number deterministic unique numbers that I generated using my system data world so in the case of the safe develop we are going to use this volt ID as a newly fire for the uh l-drop what this means is that thanks to this you will be able each time you do the system next flow you will have always the same volatility so by Saving support ID we know that you are already claiming your head up and we are even going to so instead of creating a mapping for that we are even you are going to use it as the token ID inside the erc20 adult token so my token ID will be under sorry as it will be just newly filed in a mapping we will show you we get it later so here that means we already have the beginning that means we already have the our voltage now we need to have two other claims so let's add our claims and our claims are group membership so here what's in it means is that I need to find Mal groups for that I'm going to the factory and here you have the system data groups inside uh inside system so you can look here so here are all the groups that we have created and we can search for uh the seismo community and we find it here so we have the group ID yeah this this so these groups you can take a look at what is inside so inside you have all the data gems of all the users of the small communities that did some some things I will show you later what is it and the value you can you can see when it was generated when will be the next generation and how it has been generated so for this you you can click on the data boom generator it's a bit like a an infra as a service where you can just cut the way you are going to generate these groups and that will run at a specific frequency for instance here this good generator will run at a daily frequency and execute this code and sandbag Zoo groups all of this is open source you can you can take a look at all the groups so some groups has been generating using the factory others has been directly coded and did a pull request into the system hub so I will show you how you can create a new data group so to create a new data group you need to um to edit the name for instance here I can save a Neo friends and you can add how you are going to create to to have this remembers so you can add eligible icons 20 digital accounts it can be very easy like putting your lists of the different accounts these groups can be also hybrid so for instance I could put my guitar backgrounds I could put some Twitter accounts and you have also a telegram account you can also add a value a level for each accounts for instance I will say one for this this one three for this one Etc so this is a way to add data so this is here it's just static data so it can be well interesting but you have data providers inside these data groups that will help you to to fetch data from the outside world so here you have a full list of data providers for instance we can say okay we are going to use a GitHub data providers to get all the contributors of a repository so for instance we can take system it will find a 66 eligible accounts and put them inside the group and here you have some descriptions a bit like metadata around the groups and then you can just deploy it when you would do this it will automatically generate the pull requests on this repository which is open source and uh this pull request contained all the system that I would and how the data are generated so let me show you here we can see that this group was generated with the factory it takes the uh is used null groups and uh some this as a as a data so we can dive into all of this after so okay let's now go to add our socismo community members and Bitcoin orders so we take the group ID here group it put it just here and now we want our Bitcoin passport holders let's search for keycon passport holders here we can show how it is generated the same so we can we see that we are acquiring a gitrean passport IP API to generate the group and we put it here okay let's go again now we are pretty happy because we have so our voltage user ID our system community and the git contest Port here we are only sharing that we have more than one so we want to request only more than 15 possible resistance so we can just in our request add claim types okay so it could get a copy let's do it for me it's it's nice greater than or equal 15. okay I get back do it again and now we are good if you are not inside the groups and you want to test and develop the full flow we have a feature in the configuration that allow you to impersonate some accounts um so I will show you here you can put the list of addresses you want to impersonate and the system that alert will contain all of these accounts so let's do it again and I do claim with cismo I am now in the impersonation mode so it's a very specific mode and in my system I I see all these accounts so if you want to I don't know to for instance announce they are orders as information we want to share you can you can go to the group search for a user inside that is eligible and in person in this account you can functions take this one and vaccinated so I will remove this and and okay so now that we have done our requests let's go here we want to verify inside our constructs these requests and to give the cement so we go to our Elder contracts and what we need to do is to to have exactly the same request that is coding into the contract so why that if someone gives you a proof this is proof in itself doesn't mean anything this proof means something in the regard of a request so uh inside the the seismo connect library to implement for the contract we will verify that this is seismo connect proof is valid verifying SDK proof but also that it's uh it's a zero noise proof that was made for these groups so here I need to take the same app ID that I put in the front end so this is very important otherwise it won't works because it won't correspond bus Fontana and back end so contracts need to be equal um here you see our adverb that is es20 and you implement the seismo connect Library here and by implementing the smoke connect libraries you have also the Constructor where you use the iPad this is how the app ID is uh pass to the library okay so now we need to do the request so the same thing that we have done but here so we are going to add the claim requests okay so we have claims zero that is a group ID or we will put our group ID here so we have public constants a system oh okay he's doing for me nice group so we know that I did it a lot of time let's let's verify it's exactly the same so seismo community members groups here uh it's okay and it's a Bitcoin passport here is a good one so I'm pretty happy I will change like that and okay so here I will put directly the system community members and for the claims one okay nice so we have the group ID click on passport holders value 15 and waiters are not equal here we will verify the response so this is more connect response with which is best here as an argument to be sure that it's valid so we need to add also the claims which we have just declined before and so if the results is valid we continue here we extract the volt ID we nullify the word ID has already claimed so it's made here and we've verified that the voltage was not used before and we mint to the center the amount here we can see also the signature which contain inside my my address and it's used to avoid the phone training I told you about so here I'm just I just need also so as I have multiple claims I also need to to put an array here so the odd requests uh okay okay so now we are pretty good for the contracts I'm just checking that this is good so we have the ability and we have the same odd and claim so I think we are pretty good okay now let's deploy so in the tutorial we have um all the steps for you to deploy I am so same I have already set up a mnemonic here to gain some time we are using Foundry so you we just have to do a full script deploy adverb we have our RPC already set up we are going to send it and to verify so let's go once uh during the time it's deployed I will change here uh the address so here I'm you we were using a Mumbai fork in local so I will put the ID of the chain so this is a wag me configuration you you may already know and I need to change to use polygon so all of this is explained in the tutorial so it seems to have been deployed and now it's very famous contract so let's go checking so 18 seconds ago it's here okay now it's deployed and we can see that we have our app ID connected by D and we have all our code so let's go back now to um our untang switch to polygon and claim with sismo so here we are not an impersonation mode so you can see here my my accounts generate ZK proof and claim so adopt so it's working that's on this going again to the transactions and we can see it here so itals can polygons can yeah claim with this more and we see our uh I think I need to over here okay it's not 12 index for now let's yeah we can see that we have uh uh we had our adult token of 100 here so the free case study is available here as I show you at the beginning you can dive more on when we add the different level when we add different groups ID and how we compute the final element of token here it was only 100. uh and uh yeah thank you for your time uh enjoy your hacks and mainly we have any questions available or I don't know if we have the time no we don't have the time okay

Automatic transcript — names and jargon may be misspelled.