Best Kinto App Overall - ETHOnline 2024
ETHGlobal·Wed, Oct 9, 2024, 12:00 AM
Join us for a workshop with Victor Sanchez titled, "Best Kinto App Overall" This workshop is part of ETHOnline 2024, an async hackathon that takes place from Aug 23 – Sept 13, 2024. ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.com/ Email us at: hello@ethglobal.com
Transcript
hello everyone my name is Victor Sanchez and I am one of the co-founders and the CTO for Kinto the safety first L2 for finance I am extremely excited to be here at eth online 2024 and have the opportunity to have wonderful hackers like yourself creating great applications for Kinto in this short webinar I am going to tell you everything that you need to know about Kinto about our sdks about our apis and of course how to be successful and getting those 10,000 worth of prices without further Ado let's go I know I know there are so many projects and now you have to decide exactly where are you going to be spending some time as part of the ethon Line Global 2024 haathon well let me give you a quick overview on why you should decide to develop on Kinto look Kinto is the safest L2 in the ecosystem but we are still very much uh evm compatible so everything that you know about the smart contract uh will still apply exactly the the same on our chain however in Kinto every single user and every single developer is either kyc or KYB which allow us to leave all the Bad actors outside of the chain I know what you are thinking kyc oh my God my allergies well do not go anywhere yet Kinto does this in ex an extremely privacy preserving way we call it user own kyc and I will give you all the details as part of this webinar however even though no information is stored on chain out of that kyc and KYB there are three flags that you can very easily read for a status jurisdiction and sanctions in one line of code at the same time Kinto is the first chain en forcing account instruction at the chain level this means that every single user and developer has a Quinto a smart contract wallet that happens to be a multi- by default every single transaction on Kinto is going to be an encoded user operation that will go through our entry point so if you have always wanted to learn a little bit more about the smart contracts about the uh future of EIP 4337 and account destruction kindo is the perfect place to experiment because there is literally no other way to transact I know that can be kind of a scary right multi seek and this smart contract aspect going directly through the entry point how does all of that work well do not worry because thanks to our Kinto wallet SDK that I will be covering as well you're going to be able to interact with that very easy multi- and a smart contact wallet system directly from your web application and we have a react example that will give you all of the details about that final point for both users and developer the ux of Kinto is extremely easy and a streamline we use TurnKey Pass Key signers so your face or your uh fingerprint can become Aigner in that smart contract wallet and literally the key to your only chain experience if all of that doesn't give you the oh my God I really need to develop on Kinto feeling well I have something else for you and it's $10,000 worth of reasons if you happen to be the best application overall on Kinto you will get $55,000 this application will have everything a little bit of a Kinto smart contract API a little bit of the Kinto wallet SDK that I just mention and we'll do in a perfectly executed and design application this team is probably ready to to put this project out there and have it you know receive thousands of users from the Kinto ecosystem it's okay if you only want to take a look at the Smart contract API for the best interactions with the Kinto ID the Kinto wallet Factory the kyc viewer and many other of our smart contracts that allow you to get an Insight on all of these features that I mentioned about Kinto the first place will get $1,500 and the second place $11,000 you don't want to touch the smart contract but you have a great idea for a web application protocol of I don't know the next big financial application on the Chain well the kto wallet SDK track is exactly for you the best kto wallet SDK application will get $1,500 second best will get $1,000 so a total of five prices for five different teams um will be given as part of this hackathon now that I convince you let's talk a little bit more about Kino all right so what is Kinto well Kinto is the first L2 on the arbitrum Nitro stack settling on ethereum Main um we like to say that we are what Bas is to optimism Kinto is to arbitrum in the sense that um even though the nro stack was designed originally to build orbits l3s that were settling an arbitrum we actually run parallel to arbitrum one and arbitrum NOA and we settle on Main net our mission at is extremely easy to explain very hard to achieve we are here to create a safe space a lasting piece of the ecosystem for developers Defi and trafy to engage on and we do so by focusing on two aspects the security because nothing matters if you're going to be scammed or robbed out of your hard-earned money and most importantly almost usability we want for people to forget that they are even using blockchain technology for that we have focused on having an extremely streamlined onboarding process an extremely easy to understand signature process using your face or your fingerprint through Pass keys and TurnKey um if you look at how the interaction Works signing with that multi that is extremely secure but also extremely easy becomes a core part of how Kinto interacts not only that but for developers we are putting out there a number of different ways to interact with the chain so even though we are still enforcing that account destruction you in the deex uh side of the of the chain are able to operate like you would on any evm chain so security and usability for both developers and users alike into is design for developers and it does not matter if you are veteran or just starting we are still very much permissionless and decentralized you're going to start your KYB and kyc process right now go through it and start the veloping without any interaction from any centralized environment into as I mentioned before it's fully evbm compatible everything that you know about uh a smart contract development about evm chains applies to Kinto and when you develop on Kinto you are getting that safe environment that I mentioned before you are going to get free kyc and AML free fraud monitoring Free Hack monitoring free kyt and you're going to be able to access to all of that information thanks to the Kinto ID API and others that would allow you to while preserving the privacy of the users get access to these critical information to make compliant application there are a few differences that are worth mentioning that separate Kinto from other L CHS difference number one EAS are actually disabled on Kinto uh that is true for every single user however you will see that for developers we have a special treat for you so you can still use EAS to inter interact and manage your contracts but by default everything has to go through number two account exraction every single user requires a smart contract wallet and send their transactions as encoded user operations uh to our 4 through 37 compatible entry point number three all users need to valid Kinto ID soulbound nft as part of the onboarding process when you create your wallet you get also this Kinto ID is our passport of the chain and the Kinto ID will allow us to know if that account uh that wallet has gone through the kyc process and more importantly if that kto ID is actually valid meaning that um you know you are not engaged in money laundering or a fraud or a hack God forbid uh since you actually got that wallet created this H ID is updated daily and it expires daily actually so unless the green light is reiven to every single K ID on the netw workk but actors cannot interact um with the with the chain fourth and last one uh the kyc and the compliance rules are actually enforced at the G level that means that uh if you try to send applications sorry send transactions and any type of interaction into the into the chain uh we are not only checking at the Smart contract level we are also enforcing those with modification at the get level that guarantee that those uh operations are reverted in case that your kid is not valid Etc all right so let's now take a look at how everything works from a user perspective so the first time that you arrive into Kinto you're going to have to select or uh an application that uses Kinto you're going to have to select a kyc provider synaps plat or onfido this is really important because again we want to be credibly neutral and maybe you have a preference on jurisdiction maybe you have already used uh these uh KY or KYB provider as part of your bank or your centralized exchange and you trust them already um with your data this will by the way expedite the process for obvious reasons once that the user uh has gone through that kyc or that KYB process uh that kyc or KYB provider will aore and check that personal information this is really important the personal information will never leave that kyc or KYB provider without the user signing that information to those compliant applications that require to have or store that information for either uh a moment in time or for long time story after a successful kyc or KYB process has been completed our kingto identity note receives a call back this call back uh is triggered without any pii that will be stored on the network at all um however uh once that we know that the user is okay to enter uh Kinto we will prompt them to create thanks to our partnership with TurnKey a pasy aaski is essentially an initial signer for the Kinto wallet that is triggered to your Biometrics or to your devices in some way again could be that uh is your face on your phone your fingerprint on your laptop or that you are storing a pasy TI to your device in a cloud service of some sort pasis are here to stay they're going to substitute for completely usern and passwords and Kinto is at the Forefront of the adoption of pys thanks to that turkey agreement that I mentioned finally once that you have created that original signer right uh it's essentially an EA that has only one purpose which is signing signing what signing their kto wallet transactions but uh is that first original signer tied to your Biometrics that will receive the so bound nftd that is the G to ID finally once that you have that original signer zero of your wallet that kto ID soulbound nft that indicates that you have passed your kyc and that has some information like the jurisdiction and your uh sanctions status you are now able to create your Kinto smart account that is deployed automatically uh by the chain the user will be also asked to add further signers like your Hardware wallet or your metamask uh in as part of that signing structure with up to three signers per k into a smart account so let's talk a little bit about the wallet before we go any further this wallet is a smart account wallet compliant with EIP 4337 is multi by default and it will require at least one signature that signature zero that I mentioned before or depending on the policy you have one out of two one out of three two out of two three out of three depending on what are you uh choosing as part of your configuration and of your or of your policy see uh and this wallet is what kind of goes together with the kyc KYB system the IML the frost checking and the compliance checks thanks to our contracts uh the kto ID and the kyc vi word that I will cover um later on you will be able to access all of that uh compliant information however not to the pii that will require a third API that we will release later in the year this memory wallet has this pybay signatures but not only as I mentioned before for you can add any type of wallet your rabby wallet your coinbase wallet your you know anything you want your Hardware wallet of course as part of those signatures but the first signer is always a very easy to use very easy to log in very easy to interact with but very safe bky Bas signature uh you have as well something that is quite amazing and is you don't no longer need to worry about the storing your 24 warts and if you have a boat accident or your dog decide to eat your 24 warts you have lost your funds forever because you uh have that kyc done in the Kinto ecosystem you can re kyc or re KYB in a 7day long save process to recover that wallet and finally once more that easy and straightforward ux that we were mentioning at the beginning I invite you all in fact if you are participating in the hackathon you are either uh on the process of doing onboarding or you just completed it probably all right let's go directly to the developer guide so everything that I'm covering in this webinar is also on written form on our online documentation so you can go right now to dogs. Kinto doxyz and every single step that I'm going to follow for both the smart contracts API the Kinto wallet SDK uh and how to use the developer portal for Kinto it's all there a step by step with plenty of images so if you prefer that format feel free to pause the video right now and jump on the website by now you probably have already your kyc or your KYB and you have created a Kinto wallet if that is not the case that is absolutely all right you can go to en. Kinto doxyz onboarding and go through that Kinto uh kyc process in about five or 10 minutes it won't take um any longer once that you have that Kinto wallet ready come back here and visit en. in. xyc /d developers the first thing that you will do uh when you try to set up your development account is to pick uh developer EA this deployer address is essentially a way to bypass uh the creation of contracts through user operations we don't want you to have to encode the creation of a contract through a user operation and send it to the entry point we want you to have the regular evm experience and for that just copy and paste the address that you want to use you obviously have that uh private key somewhere else but copy the public address click on set your account sign the transaction with one or more signers depending on your wallet configuration and if everything goes smoothly you will be able to see the transaction setting your deployer EA that will give you access to the developer portal the developer portal will show you your wallet of course your deployer address that you will be able to change by clicking on the change deployer button and we also fund it directly from your Kinto wallet that uh uh Set deployer uh eoa that you just Reg registered of course uh if you run out of funds on that deployer EA you can continuously uh fund it through the fund deployer button uh and that will take either ethereum or wrapped ethereum directly from from from your wallet and use it in order uh to fund this uh EA that will you probably will use to develop contracts sorry to deploy contracts to uh manage some of the functions internally for you know operations of those of those contracts uh obviously in order to do any of of these you will require some ethereum or some rrap ethereum on your wallet and you can do so by following the guide that is also on our documentation for regular deposit as any other user Bo you will also see in the developer portal the list of your application you see here that I have created my first application Victor's test counter however for you this will be empty obviously and you will have to click on create a new app I will be going into the details on how to create an application in a second however I think it's worth it to talk a little bit about what are kin applications and how do they work why do they exist so very quickly uh Kinto apps are ERC 721s nfts that uh contain essentially all the app metadata required for your applications to function and to be identified in the kingon network these nfts the Kinto apps are owned by Kinto wallet so basically your Kinto wallet your personal Kinto wallet will be the owner of one or more applications that you develop during this haathon and hopefully uh for years to come this uh application and its full control actually can be transferred to any other Kinto wallet and of course can be burned if that application is no longer in use the application includes information like the name of the application and if the application has more than one contract actually you can list all of those contracts and you have to list as part of this uh creation process all of the contracts that are part of the application and it also includ something extremely important and is a list of EAS that can directly access the application without using that enforced account struction this is very useful for setup for configuration and for maintainance operation of your contracts and applications last but not least uh the sponsor pay Master policy information also goes here as part of EIP 4337 account destruction we are able to offer to the final users uh gasless experience so essentially you charge your users however you please but uh they don't pay for gas you do uh through the developer portal and in fact uh we will see later how to top up uh these uh contracts in order for you to be able to pay for your users uh gas this way you can take again a fee out of the out of the users but they don't have to worry about if they have or not enough gas in the right currency to make those transactions happen so for all of these reasons uh we are kind of creating this concept of the Kinto app which is just a collection of contract a collection of vas that can access and the sponsor pay Master policy the first thing that you want to make sure that you do is uh in your you know uh n file somewhere make sure that you have the Kinto RPC URL RPC dokto rc.
com and of course the private key of the deployer EA that you set up in the preview step once that you do this you can pick any contract in this case I'm picking uh the counter contract out of our uh main repo but any contract would do and just deploy it as you would do absolutely anywhere else for create I'm using Foundry in in this case and deploy that contract once that you get that address uh of this first contract deployed on ginto by the way if you happen to try this without having set up as deployer EA you will get an error telling that EAS cannot interact directly into Kinto or cannot deploy contracts on Kinto this is why you have to set it up as a deployer ea long story short pick up your counter address and let's go back to the developer portal when you click on new application you will see this screen where you're going to be able to put the name of your application and you will be asked to have the main contract address this is either the first one or the most important uh contract of your application in our case our first application will only have one contract so we will put our counter address directly uh where you have this kind of placeholder the ZX your counter address we will leave empty the list of app contracts however we want to add directly an EA that can directly call that contract until we have uh you know other ways for users to do user operations instead of that so basically in in here you can list the EAS that you require for management of your application to access directly into this because remember all other users will do so to their Kinto wallets and user operation on the right side of this screen you can see the app sponsorship limits in here you will be able to set up essentially two things rate limits this is how many transaction can a specific address be done over time so in here we have that for every 60 seconds every user can make 10 requests this could be a lot or not enough for your use case for now I recommend you that you leave it as is finally you can uh also decide how much gas uh they can spend given uh number of uh of seconds so in this case for 24 hours we don't want them to spend more than 0.01 eth uh per each one of those wallets that are going to be interacting with your contract this is really important uh that you set up uh kind of accordingly to the use case that you expect from your users for this sample application you are absolutely fine leaving this with the default value once that you click on create app now you will have this new uh lining here and you can enter at any time by clicking on the name of the application and edit the contracts or the EAS that you are using but most importantly you will be able as well to top the pay Master this is the last button on the right uh on the sponsor balance I recommend that you add a little bit of that ethereum that you had on the funer EA or on your wallet make sure to top up the pay master so you can start paying for transactions of users in this case the first user of your application is going to be you we have created an application now we need a way to interact with it and the best way and probably the first way that you are going to want to do this is through the Kinto web wallet SDK for that I want to talk a little bit about this uh SDK and then we will see an example on how is used directly on our react sample the in wallet um API is just an uh npm uh package so you can add it to your project directly with npm install intoo uh- web. SDK if you want to import this functionality you are going to uh import the function create kto SDK from the kto web SDK package and you're going to take the main address remember uh when we created in the developer portal we were asked to select the main contract address in this case we only had one because it's just a counter but if you had more than one you will need to have the main address as the main input for the create Kinto SDK uh app address and get that Kinto SDK object once that we have that Kinto SDK object the next thing that you want to do is call to the connect uh function the connect function will return the promise and and uh once that you have that promise it will give you the account information and we will cover a little bit on what that account information is uh later on and of course you can see the documentation online to see all of the fields that are included in this accoun form if anything happens during this process of connection you will get an error uh with details of that uh issue sending transactions with the kto wallet SDK couldn't be easier uh what you're going to do is you're going to have your recipient address in this case is also going to be the counter you're going to have the value that you want to send with that operation most operations probably will have a zero unless you are transferring any uh uh type of eth right as part of that and of course you will have the data uh in this case if you're calling let's say the increment function of a counter you would do directly on your console right Forge cast call data of the increment function and get that exod decimal code that you need um for whatever uh comes in here you can you will see that this actions is an array because one of the many advantages of user operations and of interacting with the entry point through account instraction is that you can send more than one user operation uh as part of that so once that you have created all of your transactions um all of your sorry user operations that are part of your transaction you can call to kto sdk. send transaction and you will get either a hash or an error sometimes uh it may be that your user has not get created uh Kinto wallet if that is the case you will be able to prompt them with a popup to create a new account than to Kinto SDK create new wallet let's take a look at the react SDK example this example uses the web wallet SDK and it's probably the best template for you to get started with your hackathon project what you want to do first is clone your repository uh that is going to be in react DK sample the links to these are in these slides and of course as well on the uh description of this video enter the folder with CD react as the example and uh make sure to install all the dependencies with yourn install the next thing that you're going to need is to make sure that https and an SSL certificate work properly in your local environment for that you want to install MKT it's very easy if you do so in Mac with Brew install if you are on a Linux distribution you probably want to do something like Pudo AP but make sure to do the right choice uh for your operative system system MKT install and MK def. XYZ with the parameters that you see on the screen will create two files a BM and a Dash key.
PM both for the public and the private part of your SSL certificate once you have those two you will need to make sure that they are properly referred to in the package.json I will cover that in a second make sure as well that you edit your Etc host with this line basically mapping uh your Local Host IP to dev. Kinto XYZ and click on yarn start as I mentioned the process of creating the certificate will create those two files go to your package.json find the line with the scripts start and make sure that the PM and the dash ke PM are properly uh uh referred to in the SSL search file and on the key file Fields last but not least go to your ap. TSX and make sure that your counter address is both your main contract and of course the counter address in those two lines 40 and 41 uh once more if your application has more than uh one contract this obviously could be different for this example this is exactly the same address if everything went all right now you go to def.
kin. xyc uh on p301 you will be able to see um the address of the application that you're about to connect with and you will be able to click on login sign up once that you login sign up uh you will go through the login process the regular noral uh login for users uh at Kinto doxyz and you will be able to see now the app the wallet that you have connected and the app key the up key probably will be empty on your first attempt that is because it hasn't been set up yet and I have to introduce to you the last concept that is important on Kinto apps development whenever you are connecting to an application or you want to interact with an application your Kinto wallet has the ability and the need to WID list those applications especially the first time that you are interacting uh with them you can WID list them in two ways either WID list them uh in general and then anyone uh signer or any one policy of signers can interact with that wallet uh with that application through the wallet sorry or uh you can select one signer that is enough to for you to interact with that application in this case when uh you click increase counter for the first time you will be able to select an app keer and basically I recommend you that you do this uh with your uh turny signer so basically with your face or with your um fingerprint and you can easily test uh locally as you go on Parton that so click on increase counter once more you will be prompted to confirm that transaction it maybe that also you select the app key for this application and finally you will be able to send that transaction and see your counter um increment we will see a little bit more detail about wi listing and wi listing with an app key uh when we go directly into the smart contract API which is exactly in the next section let's take a look now at the Kinto smart contract first of all is worth remembering that if you go to docs. kin. xyc we have our smart contract reference here we will point you to two different repositories the kintore repo and the account instruction repo in the Kore repository you will find every contract every test every Helper and even every migration that we have ever applied to to the chain there is a lot to learn from this code the contraction code contains a fork of EIP 4337 and a very small modification into the entry point that allow it to be consistent with our kto ID requirements for the hackathon probably you don't need this account extraction repository if you take a look as well at the list of contracts the kto ID the wallet Factory the wallet the sponsor pay Master they include a ton of information on how this contract work and even some tips on how to use them uh to the best of your abilities I recommend that you read the kin to ID that includes things like the flag system and the trade system basically jurisdictions are restored as a trade with the iso um flag of your country uh is kyc or is sanction safe um are flags that you can read directly bullan flags that you can read directly with the Kinto ID or the kyc viewer I recommend that you use that k kyc view talking about the kyc viewer a good place to start looking into it is our blog sport take full advantage of explorer. kin.
xyc grab from our documentation the address of our kyc viewer and go and check your own wallet are you an individual or a company are you kyc or not uh what is your country flag do you have this or that trade you can very easily with a few clicks from the blog Explorer get a lot of information and get familiar familar with plenty of this cont but the really important thing is how do we send user operations directly with code so let's take a look at that the first thing that you want to do is make sure that you create a Kinto wallet in this case we're going to use the interface I Kinto wallet um I'm taking Kinto wallet address from a variable or from an environment uh file and once that I have that I will also get the nons um the number of the operation that will be next for my wallet I will create an array of private keys I will create an array of user operation an array of targets that I want to whitelist remember that uh kind of Prior operation that we need to execute on the wallet itself and um the other thing that I will do is create an array of flags telling which contracts do I want to uh essentially WID list so I have targets containing the counter and flags containing one uh Boolean on that arve that says true I am going to create then my first user operation in order I will call this helper create user operation and I will go and make sure that I get the chain ID that I get the Kinto wallet that is the source of this user operation the next one is also my to wallet because in this case the widely stab method is part of the wallet itself so is the wallet sending a method against the wallet itself um in this case the value of the operation is zero no nothing is being transmitted the on and the private keys and finally I am going to encode with signature the white list app and those two uh arrays the addresses and the booleans uh for those flags finally I need to indicate the pay Master thanks to the helpers that are on this repository you can do directly at address pay master and it will recognize finally uh I want to increment the counter now that I have white listed right in this uh first operation again one of the video of account destruction I am sending several user operations inside the same transaction so my user Ops one right in that array it's going to be uh same thing look that in this case uh the reference right we we are going against the counter so obviously is uh the two is the kto wallet sorry the from is the kto wallet the two is the counter uh look that I've also increase the nons right I use nons in the first operation non plus one in the second operation and in this case I am of course encoding with signature the increment function I'm going to prepare the broadcast uh and finally I'm going to call the entry point. handle Ops with this array of user operations and of course the wallet signer key which is sending uh that to the handal Ops so as you see interacting and sending user operations require a little bit of code but once that you have done one all of them are going to be exactly the same extremely easy to do you have probably realized by now that getting it started on ginto is extremely easy however if you want to go into true depth on some of these smart contracts you will require the repositories and the documentation links that I have been mentioning all during this webinar make sure that you look at docs. Kinto doxyz make sure that if you want to get started quickly you follow our development setup guy uh as part of those documentations uh download our repositories and take a look Kinto core Kinto web SDK very specially the react SDK example that we put you there uh and almost ready to get started with your own application as I mentioned before it's the perfect template um for your hackathon project another thing that I would recommend you is that you come and join our Discord um both for the hackathon and long after that me and a lot of developers that are building Kinto share ideas uh for projects answer questions so if you have a question please come we are there to help you finally we take developers extremely seriously at at Kinto we know that it doesn't matter how safe how usable or how beautiful our design in the website is the reality is that the future of the network is in your hands and whatever is going to be the most exciting thing on Kinto hasn't been built yet and it could be that you are the one that are going to make it happen look we joke at Kinto that it literally takes a village to create an L2 and it is absolutely true there are so many moving pieces behind the scenes from our wonderful Partners have offchain labs and the Arbitron Foundation that are the core of our stack infrastructure Partners like nlii Caldera for our U Ras uh fa for our DB on the more web to stuff uh RPC nodes that cover the world globally no this anchor quick note the security aspect of it hyper native chain analysis iron blocks as the firewall kyc KYB and AML providers that are required for many of these compliant cases that you probably want to build as well on Kinto data availability decentralized sequencers block Scout uh for the Explorers bridging with socket and chain abstraction uh the bandler with Pim Lio on RAM directly through coinbase and things that turn key or dynamic for our wallet configurations onchain intelligence with my mlin API the reality is that all of that is there for you for the developer to be build the next big thing hope that you earn all of those prices that I announced at the beginning hope that you build something memorable but most of all I truly hope that you enjoy eth on line 2024 thank you for your time and see you soon
Automatic transcript — names and jargon may be misspelled.