Workshop Room 2 - ETHGlobal Brussels
ETHGlobal·Wed, Oct 9, 2024, 12:00 AM
Transcript
also have native account obstruction which means that they don't have EAS uh every wallet is a smart contract which opens up plenty of cool ux opportunities that we as a company planning to leverage uh thanks to the possibilities of the stack and final thing I want to mention before we dive into more technical stuff is the onchain DNA and the reason it's important because usually when you see free trans transactions for everyone people start thinking about spam and that's historically been a big problem in the space I don't know if some of you remember binance marchain that was like super cheap like the cheapest chain at the time and it was like full of spam it didn't have any or like hardly any meaningful activity but it was like so much advertisements so much spammers and it was just impossible to use and that's why we believe that to complement our offering a free transactions we also introduced the system that is designed to differentiate spam and malicious AC from legit users and we believe that having all the onchain data analyzed and index in our system and that as I started said in the beginning something that we've been doing for years we will be able pretty accurately to identify malicious actors and not sponsor transactions for them while still keeping the chain free for everyone else having said that of course we are not planning to Tor anyone so even if our system doesn't like you for whatever reason you can still transact but in that case you will just need to use the standard flow where you pay for your own guas and then you can of course still permissionless execute any transaction but supposedly if you're a legit user and you're not trying to spam the network you will benefit from actually truly free transactions out there and the final bit and the most exciting one that we're going to bring that on chain so every address on the Chain will have an onchain score and bringing that on chain means that any other contract will be able to query that contract to also check whether we consider the address to be spammy or not and then different D Builders can also potentially leverage that in their system maybe providing different perks depending on that score etc etc and of course the longer term plan is to make the whole system pretty much open so that it's not us who decides how the rules of the system work but it's rather an open source project that everyone can contribute to and hopefully that would make the whole chain experience a better place because it will be reinforcing good users and sponsoring their transactions while making it quite expensive for spammers to use the chain so this is how it all looks together and I guess it gets quite technical at this point so I'll just L eager to talk about the technical things cool yeah just so we avoid switching laptops I'll first talk about uh before we go into the technicalities of zero Network um what we're doing so this is going to be his demo we'll do that later but uh what we're offering here for hackers um a lot of you might not know but under the hood we have a rest API called the Zion API that we built so if any of you uses wallets like rainbow wallet like Unis swap even like you know you've connected your wallet to wallet connect before all of the data that you see in Rainbow so like the transaction history the token prices you know the kind of like NL if the wallet has it is derived from our API so under the hood we have a B2B product and uh we've never done this before this data is expensive it's if you've used you know any other data provider you've seen how expensive it can be and you know costs similar to AWS and like web2 world but for web 3 world so what we're doing here is we're giving hackers up to $5,000 in free API credits and most products that use our API this is like a annual infrastructure cost for them um I'll give you a quick demo with like a local python uh on how this looks like in your terminal uh but before I do that just like simple details it's accessible across most networks most evm networks and Solana is coming soon so we'll actually have Solana transactions and you know D5 positions as well um and uh pretty much uh as I'll show you in the schema in a second um you can just go to zion. iapi after if you want to you know Dive Dive deeper into it yourself but as you can see um we have uh very simple read me documentation and our schema pretty much is split into like you know wallets where you can see like if you want to get a wallets portfolio which is what we'll be doing uh for the demo um if this loads um it's quite easy for you um to get any details you want uh from the portfolio including like you know what's the changes over time what kind of positions you have in your wallet and split by multiple chains so I'll not go too deep into the schema here what I'll rather do is uh go right into the code so I've just written a simple python script um using my Dev key um and what I've done here is pretty much try to Output like within the terminal a table that shows you know the portfolio um value distribution by chain and changes um over time um for our CEO's wallet for of gu's wallet um and uh let me try to run this here so I just show you how it works um literally just calling the function again and yeah as you can see like this is the latest value in his wallet he doesn't have anything St stake locked or borrowed so he's not done any like other um def uh transactions but he has like a total value of you know around $86,000 as of right now split across multiple chains so all this data can be useful for you if you want to build like a wallet app if you want to build a social app really if you want to build anything that has context of the users uh onchain you know data and transactions and what I've done here as you can see is only the um wallets portfolio um Endo similar to this if the possibilities for you guys can include you know nftd collections if you want to have like a nice ux that's like you know listing people's in fds by multiple chains and similar to what you see in zeron or metamask or any other wallets you could do that as well and finally we actually have another endpoint that a lot of people don't know about but that's really the swap aggregator so this is I'd say like not too unique a lot of people have swap aggregators but what we do is we're an aggregator of aggregators so if you look at one in or ZX they call themselves as Dex aggregators but we're almost like a meta aggregator CU we aggregate them um so you can call you know up to like pretty much any um decks and meta Decks that we support um within one call um so yeah take a look I'll be in my booth uh that's the big Booth with the red flashy uh sign so it's hard to miss um and uh let me know if you have any questions later I'll give it over to uh eigor for his part of the demo do you need USBC okay so I'll try to quickly explain how our pay Master uh Works how do we enable free transactions on our Network so this is the scheme and uh currently the part that is responsible for sponsoring the transactions uh is offchain so for those who use our wallet uh we just check if this user like a legit user and can we sponsor this transaction and uh provide a special signature like back for to our wallet and uh in case the transaction is going to be sponsored the transaction is sent like on chain as a special type of transaction which is like Z case TX specific and after that um the execution goes to the main smart contract on zik stch chains which is called boot loader uh it calls our pay Master smart contract which is checking if the signature from onchain DNA servic is U Avid and if it is uh it just pays for like pays fees for the user and the execution of the transaction continues as a as is as normal transaction so I also wanted to do a quick overview of our dogs page so the most important thing I guess is like Network information where you can find uh everything like all urls rpcs chain ID and everything that you need uh there is also like quick like short instructions on like how to deploy smart contract to zero Network and what's the differences uh [Music] also exit full screen mode also we have have bridge. z. Network which allows you to bridge ethereum from citus net as zero is currently L2 rollup forol test net you will need that like Builders will need that because in order to deploy smart contracts you will still need to have ether and uh explore. zero.
network is like like simple Explorer provided by ZK St as well um and also very important part for interacting with the zero network is that uh we recently added uh developer testet mode uh in our wallet uh you will have to enable that in yeah to make experience better uh for interactions on zero Network and uh yeah let me show you example of how it works so I'm using like completely new wallet without anything uh I've checked I've I've chosen the zero test net uh in chain selector I've switched to test net mode uh now I just going to connect the wallet uh yes it's connected and I like the simple like example that we have is just like meaning several ec20 tokens and you can see that Network fee is free because our wallet is eligible for this free transaction we just send it yeah so here we show that it's a me transaction that we've received thousand doc tokens and uh in yeah in like several seconds it should appear in portfolio yeah so it's here um yeah do we want to show anything else okay do you need your laptop for that I just going to complete the slides yeah um yeah so I guess like now some of you must be asking this is cool but like what can I do with this you know why gasless or why API how does it all fit together I'll just give you some examples of like I guess requests to build so you have an idea of what you could do so on the API earlier I told you any consumer app literally anything that you're doing in the heon that involves like wallet data or onchain data you could use it for and for the gasless ch right I think what we're looking for is we just launched our test net it's the first test net that's live on elastic chain on zk's elastic chain um set up think of like super chain with optimism but it's 's variant and we have a few daps that are going live so think of like dex's like dodo or 1 in we have like you know nftd marketplaces we have social apps but what we're really looking for is like unique use cases that can take benefit of like this spam like Cil um sort of onchain DNA component and the gas component so like what would a user want like think of like a simple onboarding app you want to onboard your grand mode or like crypto they don't need any you know gas fees they could now do something unique or interesting that would be cool or think of something you know like that's a social app maybe something that's like a you know tracker for a gaming tournament that like needs you know people to like upload their scores in real time and it's not really a Spam use case but it's something that involves like you know gasless component to it else it would be really expensive that's what we're looking for around that and if you want if if you want to like you know work together with some of the partners we have going live I can share that list with you guys as well later so you can kind of like maybe incorporate other hackathon bounties and Farm multiple bounties on top because I think a lot of people would be doing that um regardless um and all the documentation make sure you scan this QR code or just take a quick photo this is pretty much everything that eigor has explained earlier um and the last part that uh I wanted to detail here is that it's really easy especially if you find a Dap that's currently live on ZK sync or any of the other ZK stack chains to clone that and pretty much you know have it live and ready to use on a zero so that's something to save you some time instead of building it up from scratch you can also just look at what exists out there maybe you can do something to improve it a little bit and make it a novel use case um yeah that's generally what we're looking for if you guys have any questions like I said earlier um find the three of us around uh we'll be kind of like moving around the space and you know talking to all of you individually um yeah that's pretty much it [Applause] thanks e e the [Music] yep hello everybody uh thank you so much for coming appreciate uh you guys I hope you guys are enjoying the uh week or the week get ready for the weekend uh my name is Kevin Jones I'm a devil engineer working for Edge and node uh so I work on the graph protocol I'm also in the build Guild I support scaffold eth uh we're going to be talking about uh specifically the graph and how you can build a subgraph uh and we're going to talk a little bit about how you can query it and some of the tools um and you know developer tools available to you uh again my name is Kevin um first we're going to cover like what and why the graph exists today and then we're going to look at actual like configuration files how they look on the graph what the architecture looks like and we're going to try to do a demo too so um so first of all like why do we need data indexing um this is kind of a common thing people don't really quite understand the purpose of something like the graph um so if we think about like ethereum transactions um you know we have users that are making transactions to specific functions uh if you're a good smart contract developer you probably have events that are being emitted right on those transactions um and you know that's all great for like realtime uh events you can kind of like parse that stuff pretty easily in the UI something that happens it can trigger an event um but really when it comes to like large amounts of like data structure and changing of this of the data structure of a particular dap um it can get a little crazy especially uh as the user base increases on that dap and so if we look at like an example of like the crypto punks here we have all of the current uh owners of all the punks and as these kind of switch hands or you know are sold or whatever put up for sale um all this data that's coming in through the events of an nft um really uh that's what the graph aims to solve is to try to like store this data in an easy queriable way um the original idea aidea for adap was to uh essentially um write your user interface in like HTML JavaScript CSS and then use the blockchain for both incentivization for wrs but also for reading uh but when it comes down to it the the Json RPC for most blockchains is not really incentivized for reads right you pay some gas to write to the blockchain but there is no um really good interface for reading large amounts of data from the blockchain so that's another issue uh we also o want to try to solve for like Providence as well with the graph so if you want to know exactly what happened to a specific Punk at a certain time in the history of the blockchain um it can be very difficult to do right you need to know exactly what block that that um transaction happened um and then you know so that's the graph kind of aims to create more of like a a way for you to go back in time and see all of the history of a particular uh uh smart contract's data structure we also saw something like this actually in the wild where someone was trying to get like all the nfts in a particular wallet and so if we you know if you're like trying to you know in this case they said okay how many nfts they have and then they went through and looped and created this kind of like large object and then like push those results and then this is great if you only have like 10 nfts or something in your wallet but if you have hundreds I mean I have at least 200 nfts in my wallet from like different events I've gone to and whatever um this could easily caused your application to have a really really slow response time so this is where the graph comes in um and by the way I'm just going to go quickly through these slides so we can get to the demo um but I'm going to be here to answer questions if you have them um so there's over 200 indexers on the network today there's over 90,000 delegators it's probably actually more than that that are actually delegating stake to the network um there's actually over this is also higher over 600 cure raters that are actually signaling for subgraphs and there's over 6,000 subgraphs um so these are subgraphs or apis that are deployed to the decentralized network uh that are providing blockchain data in a decentralized way uh and we serve anywhere between one one two billion queries per day in certain scenarios um and so the idea is like the blockchains uh that we support are kind of a sea of mess of transactions and there's a lot of data there that can really be utilized and so the main purpose of a subgraph is to create these like individual apis that we call subgraphs right these little buckets of data and so another really powerful thing about the graph is we utilize graphql um and as you saw that previous example that we're someone was doing some like JavaScript looping to you know create this array um you can really simplify any kind of query to the data structure by just making a simple graph ql query and so in this case we're quering all the nfts by owner for a specific uh address and we are actually just getting all of that data and the previous owners of all the nfts as well in just one single query using graphql so that's one of the huge powers of the graph so this is what we actually aim to do is to replace the read layer for a blockchain right so you're still using the blockchain for rates you're still paying your gas doing all that good stuff but as the event data comes off we have the graph sitting at indexing layer for indexing um there's three main config files to a subgraph it's the Manifest which is kind of like the yaml the highle configuration there's the schema which if you've ever worked with graphql uh you'll be familiar with the uh schema. graphql file but this is like how you want to actually store the data inside of the um uh the database and then there's the Handler which basically processes all the data right this is how we actually go through the data listen for the events and then put it into the database and this is all written in assembly script which is a subset of typescript um so you get the you know type safety but um it's not quite as powerful as typescript because you can't do some like Imports and stuff but for the most part it's uh compiles down into wasm that's where it differ a differ a little bit from typescript um and it allows you to do some really cool interesting data processing of the data as it comes off of the chain um so it looks kind of like something like this uh consumers uh can make a request through the network right by making a graphql query uh the graph node which is a rust implementation of um how the indexing works so it handles all the data processing and the query uh layer we'll go back to the postrest database that the indexers run and we'll do a SQL query and it will also like um you know optimize that query for performance and then it will send the response as graphql so the graph kind of sits again as this like middleware uh and then we look at something like this this is just a simplified version of what I just showed you or a more expanded version uh where you have your dap you still are doing your transactions to the blockchain to your smart contracts your smart contract emit emits events the graph node process those those using the WM module stores those into postgress and then just exposes those with graphql right uh really straightforward okay so one of the coolest things that uh we've done lately that I think is really awesome is we've added a um extension into scaffold eth who here has used scaffold eth before anyone all right I love that okay so scaffold eth is great because it has a full stack experience right so it's got um nextjs with a full typescripts typescript support and um coding and then it also has hard hat or Foundry so and it has the uh the this extension system that is going to being added and the very first extension added was a subgraph support so you can run npx create-- e at latest with the- e flag subgraph and it will spin up the monor repo for you the full stack with scaffold e and the graph running inside of Docker with an example subgraph with an example smart contract like literally just like a great boiler part boiler Point starting point so I would definitely recommend you guys check that out uh let see how much time I have cool got 10 minutes uh we also have a telegram chat for support we we are also in the Discord so um if you can't find us at the booth for some reason because it's late you can join this telegram chat um I would say this is probably the best way to get a hold of us but we also have Discord we're there to support you um but you can also stop by the booth okay okay let's do a demo uh so we're are going to I'm going to try to actually do two demos I don't know if it's going to happen but we're going to we're going to try it uh the first one I want to do is I actually want to run um the subgraph package and show you how quickly you can set it up so uh we can do npx create create d e at latest d e subgraph right it's exactly what I showed you earlier that's going to basically uh run this script that says hey what do you want to name your project if you haven't installed the package you need to install it so let's just call it uh we'll just call it demo it's going to ask you what chain you want to use you can use hardout or Foundry so we're going to use let's use hard hat do you want to install the packages yes so then this is going to basically scaffold out a full stack dap for you with nextjs uh in this case I chose hard hat if you chose Foundry what Foundry it's going to create an empty git project it's also going to use the subgraph extension so there's going to be an additional repo for the subgraph and inside of there is a full working subgraph so we'll give that one second while that's doing that I want to show off the graph uh what we have on the gra.com so there's two main uh areas that you'll probably spend most of your time the first part is the Explorer where we have all of the existing subgraphs so there is a bounty for the best use of an existing subgraph and then there's a bounty for the best new subgraph so if you want to use an existing subgraph in your app that's great you can come here search for it like let's say you want Unis swap what right here at the top we can click that and see the V3 subgraph and we can start getting the data we want from there and if we come down to the bottom there's this really cool new feature where it will show you exactly how to query it so this will give you the curl this will give you react this will give you next ch j s and node nodejs that's really really awesome that's actually a new feature um and you can query the the network in your dap just by putting that that boilerplate code in the next place you'll probably spend a lot of time is is the studio and that's if you want to create a subgraph so we're going to try to do that in a sec too but let's see how far we get okay our our daps uh scaffolded it's called demo right so let's go we're going to start up our chain so everything in scaffold eth is like yarn commands which make it really easy for you and this is all in the documentation so don't feel like you need to memorize these but I'm just going to show you how quick it is so yarn chain to start up our blockchain yarn start to spin up our front end uh we're going to go into the demo folder again we're going to do yarn deploy to actually deploy um the smart contract that comes with the demo that's going to take it push it to hard hat you see that there and then this last one we're going to do yarn run node now uh the the subgraph extension requires Docker because we're going to run everything in Docker so what happens here oh I got to that's not good let's see if we can shut down these containers real quick the demo gods are mad at me today okay let's try this there we go okay so um the the graph again is a kind of like that what we're doing here is we're like virtualizing an indexer stack so we're running ipfs for all of our um manifest stuff like that we're running graph node for the processing the the rust implementation and we're running postest to store that data so it's kind of like a virtual indexer right it's like basically you're like bypassing having to use the studio and so now we have a you know it's working when it says downloading latest blocks from ethereum and now we can basically come over here and deploy our subgraph so local create creates a subgraph and local ship will send that so again this is all in the documentation on the readme so um you can basically find it there if you need a help just come talk to me after I'll point you to where it is but um we're going to deploy the subgraph locally and then we've deployed it so we chose a version basically for the subgraph because you need to version the subgraph uh but if we look at scaffold e now so scaffold eth is again it's a nextjs application and it um works on Port 3000 hopefully it loads here okay so here we go we got scaffold e and what you'll see is um scaffold e comes with this kind of like very basic contract it's called a greeter contract and you'll see here that we have the um it's been deployed to hard hat it has this greeting and then it has a reader for a counter and it has a way to set that greeting so scaffold eth is this kind of cool tool where you can like basically use this burner wallet function you have this burner wallet that's available to you and then you can come here and change the greeting basically so I went and got some gas here from the faucet and then now I can basically make a change to this greeting so it's very simple smart contract we'll just change it real quick we'll say hey what's up like that that's up and then we'll say um send and we'll say I don't know Brussels and send and hello I could type today typ there okay so I just sent a bunch of messages right I basically sent these events right I changed my event like three times basically or I changed my my variable three times so I should have three events so if we go here to this um when I did the deploy it gave me this graph iql uh window so we can go there and open it up real quick and what we'll see is uh this Explorer section here where we can basically explore all of the entities uh inside of the configuration um and so we we care about greetings we can get the first five 10 greetings their ID the value stuff like that and then hit play and then we'll get that data back oh we didn't actually get the greeting so let's grab that too so then we'll see that we're able to make one simple graphql query to get all the data that we need um in our application there's also a tab on the uh scaffold e here called subgraph that you can see here at the bottom that it shows you exactly uh the events that come back and then we do this kind of cool stuff with the address and oh here here are those commands too yarn run node local create local ship and then if you need to clean up all your data you can run uh clean up I just want to show the config files really quick so you can kind of get a feel for like how the um scaffold or how the um subgraph configs look cuz I I kind of briefly touched on them what they how they work but I want to show them in detail so if we go to the in this case we have a packages folder with a subgraph here's the subgraph folder that you basically use when you use the extension and if you come here uh you go to uh the yaml file is here the subgraph yaml it basically is kind of like the highle config file it tells exactly what network that you are creating a subgraph for it tells you like um where to get the schema which is like the how you want to store the data in the graph it also has the address for the Handler the mapping uh and it also has the handlers listed here and then the abis for the contract so it's kind of like this highlevel um you know way to point everything in your subgraph to the proper locations um and so if we go to this SRC folder we'll find those two files that it's referencing so the first one is the schema which is like the data types so in this case this this contract that I deployed and tested with has a greeting and then it has someone that actually sends those greetings right so it technically has two what we call entities and so what you'll notice here is this is actually a more advanced subgraph because it's linking the senders to the greetings and so you'll see here that we're referencing sender as sender and we have all the greetings in this kind of like virtual array so what's really cool is uh graph node will determine that if someone sent a greeting it will link those together with a relational like database Link in the back end that you don't need to worry about so that when you query you'll be able to get all the historical data for that so it's very Advanced the stuff you can do with graphql and then the Handler is this part which is probably a little more confusing um I probably won't go through this completely but this is how the data is actually being processed uh and stored so uh again it's all assembly script and it's very you know it has Type safety so you can import and kind of work with the data as it comes off you import the schema and you can basically do things like um load which is to like see if that data already exists in the database and then you can do kind of like if statements if it doesn't exist create it uh you can do some like mathematical calculations obviously you can do a lot of stuff with assembly script uh and then at the very end you can like save that data so all this data is stuff that's coming off of the events um I know almost over but um I'm almost done so there is this uh right here where the event comes in and then this case it's called the greeting change and we just get all the data we care off of the event parameters right so parameters and then we also get stuff off of the block Tim stamp as well so there's a lot of cool stuff you can do with this um and lastly just real quick if you don't want to use the uh the subgraph extension of uh and you want to create a subgraph you can do that just by clicking here and name it whatever you want so we can say test uh testing testing one two three I've done this too many times um and it will give you all the steps to create a subgraph right here so everything you need to know is also here if you don't want to do the full stack thing and you just want to create a subgraph for any of the supported chains you can do that there cool thank you guys yeah I'll start please oh yeah no worries than yeah e e this should I start Okay so you guys uh know about pit or should I give you a small introduction for that okay you can talk in between it's not a like I'm teaching you can talk in between there's nothing to see here is my voice a voice audible okay so we are a pull Oracle it's very different from other oracles out there which are push Oracle the benefits are is you can retrieve the data anytime you want the other post orles send the data like in 30 minutes 15 minutes so they're not data is not updated so if you're building any high frequency app or doing anything it's better to use P because get faster data you have more price feeds and we support all the chains that you can name even don't use any other chain please like any weird chains so how we are different we have we take the data from first party data providers not aggregators or coin gecko coin Des something like that really the data where data come from like qcb Capital CMS you don't care about that I know but I have to say that and we support almost 60 plus evm chains so either you're building on XYZ chain or chain I don't care we have the data there and you can ask the question anytime don't wait for AMA uh just so that you know what you're getting data from and push they sens the data every 30 minutes or whatever you then get the data from Smart contract whereas you request the data before you want to update it now coming to the code part because it and I'll show you how to integrate pit it takes only 5 minutes you don't have to stake XYZ token to some contract to start using pth here we have three bounties one to start if you want to use price data on your like on a chain or like any daap you have to use it on chain we have a method of using off chain as well but we want you guys to use onchain that's the first criteria okay second we have random number method we call it entropy pit entropy it's similar to vrf but way better than that okay and third is an open Bounty you can create any tutorial or make or make any improvements to our SDK if you feel like okay this method is if you add this method it will great for people we'll give you Bounty for that we want to know how people like P what's a developing experience look like any question till now I've not you have not seen code or anything so that's why uh yeah I'll just start with this this is how a normal main function looks like for ERC 721 everybody is worse of that okay now to use P you need three things one the chain which chains you are building on second what data what price data you need you need e price BTC price or gold price I don't know why but if you need it that's second thing and third is Hermes that's something different so three things price feed contract address of that chain and the Hermes data point what is Hermes home is an option service you fetch the data and update it I can see some confused fa faces right now about homies yes so I I knew that this will happen so this is we have a pitnet that's sensed to the Wormhole this is uh the hermus and this is the contract that you will build here okay we have a contract on every chain out there okay so this the contract you build we have pit deployed on every chain out there now if you want to read data from some Oracle how do it go read price feed data whatever and you put the price feed ID am I right that's how you do it in this case if you read like that you'll get an old data which you don't want for your dap so it's a pull Oracle I told you it's not a push Oracle so you have to pull it so from homies you will pull the data and you will update it on chain and consume it that's how you get the latest data Hermes is a service which you can see here from where you will pull the data I'll show you with a code how simple it is so something you use from aasp yes we have a homies SDK it's a off service that is running from different companies out there you don't have to implement home is it's a normal SDK from which you will Fest the data one line of code that's it uh now with the code I'll show you how to do that so we have if you go to like uh Workshop I have not open it sorry is it visible so this is the same contract that we were using for the maining an nft it's example I took so if you see here uh uh for the minting I want e USD price right now okay and if you see there's another argument called price update on the second argument this is the price update you fish from homies so we have a Hermes Swagger file which is linked which looks like this uh just for testing you can use this and run it or like in your dab also you just tell which price feed I want and you'll fet an update data you pass it in your contract here and that's it when you pass it you fetch the price like this and these you don't need that other thing so we have all the examples in pet examples for mat uh repository so that's how you fetch it this is the main method you need to click a photo for if you want so why why is that an array is that because you can fetch 10 to 20 prices in one call so you don't have to worry about it so yep for something that you don't uh you can't create a new price feed right now no it's it's by governance the Dow decide what's the next price can be there so I'll just help you to navigate The Docks if you want to find this is how docks looks like that's how you go uh go to Price feeds if you see here we have all the uh contract addresses on can on the left you can see go to there I pretty sure you all be building on evm these are all the chains that we support and you don't need separate addresses for different price feeds so you just need one address where p is there you take all of this you have support all these chains okay you take uh like I want to do do it on arbitrum okay so when you see the code here okay it's gone wow no it's here that uh address you will copy it and you will put it there and a Constructor in your contract this is the pit where the pit contract is implemented now you need price feed IDs so we have a page which is already in the the eth global website these are all the price feed IDs so give me a random price Fe at any crypto price if you want any give me a random gold you search it here it's GLD I think I mean yeah GLD something like e gold or US Gold Equity copy this okay and uh in that same code if you see uh the it's USB price like I'm hardcoded USB but you can change it to gold price here pass that bites which I copy it from the that page pass it there the this method will we do okay if you see it's a payable method why it's a payable method every time you update the price you have to pay One V the smallest denominator on any chain if it's something else on other chain that's what you pay one way so you're pulling the data you're updating on chain and you're using it so if she pulls a data and within a minute you want to consume the data you don't have to update it because it's already updated it's I think it's not clear no why the reason is if you see this um we the what does Hermes do is we are getting data from Wormhole and then you're fetching from Hermes that data is getting verified so contract already has the data so what it does it verifies the data so she can't put up pull up malicious data that's how we do verification so always get correct data which is there and you can fetch data anytime you want so that's way how po orle works so we need to put a check in there let's back to let's say that I updated already and it's already updated so that method update price feeds already have that check so if you if you're already updating it so if it the data is already there it won't update it so we have an API reference uh I am helping you to uh like navigate The Docks so that you get everything if you go there uh API reference page evm and you can see all the prices that contract supports so if you see the get price I will definit I'm pretty sure everybody will face this issue the get price will give you the latest data like uh there's an example execute the query there's a S price error coming why because this price is not being updated okay so every price you update it will get stale after 60 seconds that's how we keep the freshness on the Chain okay so but now you update the price and you try to fetch it within 60 seconds you will get the price it will not throw this error does that mean the Fe is zero then for let's say that he updated it yes so is my Fe zero yes yes okay but that means that my contract needs to have oh it it can take from message or sender the eoa and if you if you don't care about the latest price you can use the get price and save method so it will always return you something will that help me with my issue with the EUR yes so I should use get price yes you can use that and uh you can fetch and like this I want data not older than 4 seconds so a lot of Perpetual dexes they don't want data very old so they can use this I don't want seconds older than 5 Seconds you can put the age here that can happen EMA price I'm not sure if you guys want to use it's like exponentially moved average price similar methods and these are like uh update fees you can get on your chain what's update fees it's one right now for every chain but you can try if you want to so in a like if you see Hermes we have SDK also for Hermes typescript python both but it's a normal curl command I don't think you will need an SDK for that but we are there it's there so if you if you use this API uh I'm going to try it out you can add so many price feeds in one call so in the same contract if you want to fetch five price feeds you don't have to update five times you can use update one time you get like I'll show you suppose these are five different price feets I'm not doing it uh one hex encoding and then execute take this this this is update data that you will use it as an argument in the contract okay the difference here for you guys as new developers who is using pth you have used oracles before it's easier to use an oracle that there out there because you can directly fetch it you don't have to do all this thing but to get started you have to put uh some token somewhere you have used those kind of oracles we don't need to do everything is permissionless you don't need any human being to intervene in between or any of our community members that's one thing second it's one way for update third you are getting latest prices that is something different so if you see all the oracles are moving towards pull orle because they can't expand the reason we could expand to Every Chain out there it's only one price feed ID for all the chains that's also remember if you're using btcusd on five chains you have to hardcode those BTC USD price feed on every chain different IDs it's one ID so when you see all the price feed IDs here this is ID that we use on all evm chains Solana stocket whatever you call so that's one good thing about thatat us one update yes but I get different right yeah two IDs inside put that in Hermes you get the update data or via SDK and push it to the contract you pay two way because two price so should should I show how that would be yes yes how yeah so uh if you when you get the price of price object it has price decimals confidence interval as well last publish time I'll show you how like from Hermes if you want use offchain prices you don't want to use onchain prices you can use Hermes to fetch the prices and the price object looks like this price confidence interval exponential which is the decimals you need and the publish time last publish time okay so I need to the negative number to a positive number we have a method if you uh we have a helper method sorry this is common for me to yes this is the convert print to X USD you can uh we have helper methods in our SDK you can use that and uh since I have 2 minutes I'll just explain how entropy Works uh this is a second bounty we have for ramom number it's quite different from any random number that you have used there so if you're want to use random number for gaming or something the only difference here is uh how do you use a ramom number you cetch the ramom number that's it but it's a two commit hash so if I have a random number you have a random number you have a random number the random number that entropy will give you is a hash of two so it's like I can't change my random number because hash would get changed you can't change your random number hash would change so if you want to use entropy you will call this fetch entropy random number and you'll pass your random number okay any random you want to put that you'll pass that you get the fees which is whatever there and you check the fees and you see you get a sequence number from that request with call back you'll get a sequence number which will store on the Chain after that there's a entropy call back which will be done by the pth decentralized uh service which generates that random number from your and it will uh do a call back entropy call back and with a random number which you can consume that's how entropy Works uh that's the only fees you have to pay you don't have to link some tokens or something like like that that's another entropy this is more safer because you can see how random numbers are generated it's a two commit it's it's based on you if you don't change a random number you'll get the actual random number I have to pack I have to pack a lot of things in 20 minutes that's why I have to rush it I will be available just outside of this for any AMA I know for me also as a Dev I took a lot of time to explain how things are happening and I'm happy to help on this okay have we can come you yes and I'll be putting some links on the eth global website my personal telegram if I you can not see me here you can ping me [Applause] there e so we're going to get started so we're Ino what we call the universe confidential Computing Network today all the layer one layer twos have one thing in common is that they're all transparent now we believe that in order to get Mass adoption we actually need a minimum of confidentiality so just a couple examples when you use crypto today as your bank account everyone knows exactly how much money you have especially when you use for payroll all the employees within the company also knows how much they're making and this is a known bad practice we have already you know in web 2 second Enterprises and you know institutions are still having a hard time entering this space they have compliance reasons they also have Trade Secrets it just doesn't make sense for them to build on top of a transparent database and lastly there are just a lot of use cases that wouldn't make sense without any hidden information so think of the car games private voting or you know blanked auctions a lot of folks today you know focus on solving the throughput problem or the cost problem of blockchains we believe that there's a lot of new use cases that can be unlocked with just confidentiality alone so this is why we called the you know public and private blockchain use cases and to do this we leverage a cryptography called fully homomorphic encryption so maybe by show of hand who has heard of this term or knows what this is okay about half of the people here uh so it's very different from ZK what F does is one thing and one thing really well which is computation on top of encrypted data so imagine if you were to encrypt some integers you can still add the V multiply on top of it without having to decrypt so this is really the magic of FH for folks who are non- technical in case you're non technical imagine you can encrypt this cat picture you can still modify each pixels by adding dividing multiplying and by the time you decrypt now you have a filter right so this is almost sounds like magic it's really a cryptography that allows you to compute on top of hidden data now why is this interesting in the crypto space so you know typical Legacy privacy solutions that we think about you know in crypto is typically ZK uh what makes FH really stand out is the composability aspect so why does composability matter in crypto blockchains are multiplayer systems you know if you want to build defi or gaming you need to be able to interact with each other's private State and so with FH you can store the encrypted data on chain but you can directly compute on top of it so the blockchain itself is the share private layer what happens with ZK is often times you have to store these private data offchain and so if everyone storing their product data off chain there's no composability unless you have a centralized Pro that can coord the states so when you apply FH into an evm called FH evm it's very straightforward so you have your typical solidity all you have is a encrypted type called EU so in the first line of code here just an example this is a erc20 you have a mapping of address to EU so you can have a hidden balance and when you do a erc20 transfer what you do is is you add a encrypted amount to someone's encrypted balance so it's very straightforward you do a tf. add and tf. sub uh it just reads and writes like solidity and then lastly yeah we also offer onch Randomness that are quite useful for C games uh in a hidden information games so what are some of the benefits so for one it doesn't require any uh Hardware uh security enclaves te it doesn't require you to learn any complex languages how to write circuits uh also Al it doesn't require any centralized op coordination that you know all lot the ZK based Solutions require and so let's talk about use cases right like what can you build with this so if we take a step back you know a lot of people think what we do is privacy but privacy is really just a subset of things you can build with confidentiality so let's take gaming for example today all the crypto games are not as challenging because everything is transparent and and you know public so if everyone has information there's no fun a lot of the fun games that we have in web 2 require some hidden information so think of the car games like poker some of the bluffing games uh things that you have to you know uh guess if the enemy is more powerful or less powerful right all that requires a minimum of confidentiality else this is basically no fun no challenge right um second in in terms of defi there are just a lot of New Primitives that you can think of so you can build know dark poles mind auctions PR amm you can even think of Noel Primitives around like you know under ceriz lending um just because you can hide Center information on the Enterprise uh I mentioned payroll earlier so payroll is a very obvious uh thing you could build uh you can just hide the amount that you pay your employees in a very simple manner uh you can also do prct cap tables treasury uh or even predictions right so imagine if we all submit the hidden price of Bitcoin we can still calculate the average price without having to decrypts using FHA so last year we actually built a fully onchain ma game using Ino so in this game you could be a doctor killer detective it's a bluffing game and it's very simple you generate the RO on chain and so the role here within the struct is just a EU 8 so very straightforward right so if you're zero you could be the killer if you're one you could be the doctor if you're two could be the the detective we also bring confidentiality to existing blockchains so this is where you know if you want to build let's say a poker game on base what you could do is you can build the game logic on base where you can raise you can fold you can call just use Ino as a layer to generate and hide the cards so the idea is this we want to meet Builders uh you know halfway like what if you want to build on existing chains that has existing liquidity or for user base uh you don't have to build on inle this is where you can use ino for specific features another example is imagine if you were to build a some kind of RPG game on ethereum what if you just handle the battle mechanics on inle so you can trigger the battle on ethereum you can have all the player stats that are hidden right your attack Power Defense speed all these stats could be hidden to add additional fun and then using the a Randomness you can also use that as a multipliers right right so this is actually just a really good example of how you can R transform a game by adding layers of complexity that just does not exist today in crypto this is particularly an interesting um use case that's also quite novel so today when we think of DS they're basically so bound tokens so on the on the on the right side you can see you know typically what you do is you kyc with someone like binance they would you know uh take a look at your identity and then issue you a sobom token that says are you over 18 are you based in Europe uh is your credit score over 700 it's quite inconvenient because this is static like what if this information changes over time also everything is public what if you don't want to reveal everything so this is a concept that we came up with called Dynamic did it the idea is what if you can store someone's credit score in encrypted matter directly on chain or someone's age right your age could just be your date of birth converted into time stamp but encrypted so you store this on chain and then you can expose specific functions view functions uh for Cent insights so just quickly the way this looks is very straightforward what you do with FH is not only operations you can also do Compares so imagine if you were to do a comparison of the Hidden quit score with 700 what you get in return is inal to bullan that you can decrypt and so basically you can reveal insights without revealing the actual information so now back to this right imagine if you have specific information stored on chain just specific queries Right View functions that maybe for Casino dab I just want you to know I'm already 18 I don't want you to know that you know what my credit score is right so it's almost like selective um selective selectively revealing information that that makes sense and so if you think about this this is actually the web two experience that we already have today with Google off if you're using Google off and you connect to let's say an application you can give them access to your calendar maybe your contact but maybe not your Google drive right so this is an interesting I say use case as well where over time you could update someone's credit score that can change over time and then the the the Insight can change in a dynamic matter right so just as an example imagine you have let's say uh a money market on polygon and you just want to wh list users who have a good credit score so what you could do is you could ping this did layer that returns you the specific Insight uh and then you can wi list the user so we are compatible with existing ethereum tooling um this is why folks have been having a lot easier time know getting started uh just use you know solidity if metam Mas hard had remix things that you're already familiar with we support a fairly wide range of operations today so from additions divisions multiplications but also a lot of comparison so it's really up to you to you know Unleash Your creativity think about novel experiences and dabs that you can build so maybe for a private amm you need to you know use some multiplication divisions maybe for the did layer you need to do comparisons right so because of this wider range of supports you can really recreate a lot the Logics that you have in games and Defi and just to take a pause basically if you think about what we do here is recreating the concept of almost like this private states that we have in web 2 in web 2 if you were to build something like eBay you have a centralized server everyone submits their bid the server is not going to reveal everyone's bid right because everyone has to bid in secretly now in crypto because everything transparent you can't have that experience so the only way to protect information is through encryption so there's no private state in blockchain it's basically encrypted States now with FH because you can compute on top of these encrypted States you get to build more complex logic that basically you normally do in web 2 with this you know s server idea right uh so a lot of the things that you see here is basically uh interesting in a way that you know you can bring in a lot of web2 experiences and use cases to web 3 using these operations so to get started all you have to do is import uh this Library uh so it's a FH Library uh if you are familiar with remix uh the simple way to get started is to use inkles remix uh pretty straightforward our current version does have a little bit uh of a uh version issue so you have to use 0.
820 for now uh but yeah one more thing here is when you build using confidential information one thing you have to understand that there's no IFL statements the reason why is imagine if you were to execute eile statements on some kind of logic that path would actually reveal what the hdden information was right so the way to go around this is this multiplexor function called SEO so here's just a very simple example of a priv voting when you cast a encrypted Choice which could be0 or one the first thing you do is you compare if this encrypted choice is equal to one so you get a Eble which is encrypted buan what you do is you pass in this encrypted Choice into a SEO which is a multiplexer so if you're familiar with things like Javas script A CX is basically like a tary function it Returns the first argument if it's true second argument if it's false so in this case if the choice was equal to one you would return the encrypted vote count if it's false you would encrypt return zero but zero is also encrypted now on this third line it's the reverse you return zero if it's true and then includ the Von if it's false so one of these two arguments would be zero and then the other one would be the actual V count and you you add both of them to the respective tally so this is how you can go around this know if else problem uh in encrypted values is using uh CX essentially there are two forms of decryptions so this is quite important uh so the first decryption tf. decrypt we decrypt and reveal the plain text to the entire network so this only makes sense if you want to re reveal something and and not be afraid that this information would cause know consequences so for example in a poker game at the end of the round when you want want to reveal everyone's hand you want to use TFG decrypt right now the second function is a reencrypt so what is a reencrypt reencrypt allows you to query your own let's say your own balance in a way that doesn't leak information so the way this works in practice is on your client side you generate a temporary private key that goes with a temporary public key and then when you pass into the view function you pass into this public key so that when the NPC Network decrypts you will do partial decryption and reencrypt that value using your public key and so all these values will be sent back to your browser and using that temporary private key when you decrypt you can reconstruct the pl text so this is a way so that only you can see the hidden information and not not anyone else right so this is good for let's say in poker if you want to look at your hands without revealing to everyone else or let's say for erc20 balance you just want to view your balance uh this is also a a great way to use this function uh one more thing as you can see there's a signature a signature here is just a EIP 712 it's just to prove that you are you uh so not someone else is trying to De your your balance basically so let's go over some of the tooling here so there is a JavaScript tooling called fhb MJS so what you see here uh this is called a saex a cipher Tex is the way you hide data in FHA it's composed of the actual data with some noise uh some noise padding and some data padding so let's say you want to transfer 10 tokens right in a confidential manner what you do is you encrypt the integer 10 using this library and then when you pass in to the solidity contract you pass in as a you know call data uh in the form of dtes you have to cast this into a eent 8 so if you see uh below here with the hidden score example so you have to pass in as a as a you know byes data and then cast that into EU 8 uh type and so today we support EU 8 1632 and EB and we'll support 64 and 128 uh very shortly including e address so yeah so let's talk about the bount so we have 10K in bounties there are two tracks one is gaming the other one is open Innovation so we've hosted um about four high clones already and I'll say gaming has been one of the more popular track for most people because for one it's easier to build if you can think of some kind of you know mini games Hidden logic you can easily recreate this within 24 hours it's also you know typically you know more more fun to to build defi there definitely a lot interesting things you could build it's a little bit harder uh just to give you an example if you build something like a private amm some of the concepts you might have to think about is around differential privacy so let me give you an example imagine you want to do a confidential swap if someone swaps before you and then you swap and that person swaps right after you technically that person can guess how much you have swapped out right but there are ways you could uh you there are techniques you could do to basically uh prevent information leakage including know uh differential privacy but typically these topics are a little bit more complex but nonetheless I think there are quite a bit of interesting things you can also explore and then in terms of INF you can also think of that did layer example that I gave earlier uh you can combine that with the money market so imagine you have a Mod market that only LS out if you if you have a good credit score right so this is where there are rooms for sort of Novel Primitives ways that you can think about composing def different def5 Primitives including gaming and then we also have a list of ideas here on this notion page so yeah if you are short of ideas feel free to check out this page uh we also have a booth there uh with all members so we're always happy to provide feedback come talk to us we're very passionate about you know exploring novel your ideas you can also join our Discord so we have a Dev chat here for any know technical support and telegram group so we do have a test night so yeah feel free to get some test night tokens and then get started um yeah just leave it for a second for people take pictures and then lastly yes we have our documentation here there there is a arcade page uh with a few demos so some of them include you know simple mini games like the mafia game Wordle uh simple hangman slot machine so just to for people to try out the novel experiences that inko can offer and that's it thank [Applause] you e e we got one we got one okay sweet okay see so hey everyone I am greg. eth with enss labs and today we're going to be talking about ens identity in your apps so quick overview we're going to be talking about what is ens why is it important what are the different types of ens names how does it work and then lastly some resources for the hackathon this weekend so first of all what is ens in a single sentence it's a decentralized permissionless naming protocol that lives on ethereum and scales to the entire internet the really high level overview is that we turn complex hex addresses into human readable names so you might be familiar with DNS which turns IP addresses into normal web domains like this number to google.com um the problem in crypto is even worse and so we're turning these long hex addresses into simple readable names like Nick the goal is that anywhere you read or write an address you should be able to use an ens name and so this is in the context of reading on the left hand side you can see uh ether scan a live Ledger seeing that luke. sent something to me Greg sc.
which is clearly a lot more clear than me Greg SC D sending something to o x554 f and so on um and then in the writing context this is metamask um me sending ether to Greg scr instead of having to copy and paste an address really just again human readable names and this works in two different ways so there is forward resolution which is going from a name to an address so for example what you saw in metamask of typing in nick. and getting this long address and then there's also reverse resolution which is I as the owner of say Ox B8 in this case um I claim that I want to be known across different apps as nick. and that means when I sign into different apps it can kind of recognize me as that and it becomes this portable web 3 identity and this is what really takes enss just from a simple web 3 username to really a web 3 profile and a again a portable identity so all of these are different daps not built by en but that recognize my name as part of my identity because again it is a portable web 3 identity um and just to really hone in on the idea of of a profile versus a name most people think it's just name. eth and then some eth address for Main ethereum and call it a day but really it's important to highlight that there's a lot of other metadata attached to a name as well you know I have a description a location and an address for different types of chains as well so it's just important to realize that it's really an ens profile um even though we call it an ens name very often another representation of this is just when I sign into different apps across web 3 a lot of them will recognize me as my ens name again it is this portable web 3 identity so this is Snapshot and Macho again two apps not built by ens so we understand what it is at the high level and we're going to keep going a little bit deeper why is it important so I sto this slide from our uh designer the other day uh because I think it's important even for developers to understand what the goal of ens is you know at the surface it looks like we just sell these names but really it's a ux business um our role is to help make comp and scary interactions feel better across the internet this is ethereum right here you know the ethereum logo that we all know and love and the enss logo is literally meant to be a wrapper around ethereum it is to improve the ux of ethereum and the greater crypto ecosystem so now into some misconceptions um there are a lot of different types of vs names and most people think it's just doth but that is not true um there is one ens native TLD and that isth which has been most of what I've been saying so far far but you can also use almost any DNS TLD in ens as well so a com domain XYZ domain and so on these all work as ens names but there are some differences so do e is really the the Top Dog in decentralization for unchain domains it lives on Main net ethereum it is fully decentralized controlled by ins Dow and there is an annual fee to make sure that the namespace stays healthy whereas on the DNS side a lot of these things are not true it's not entirely decentralized it doesn't live on ethereum necessarily and there's no protocol fee so it's just a matter of tradeoffs but the point here is thats respects existing internet infrastructure and is not just limited Toth in this closed system we really try and bridge the gap between uh all of the internet and the flexible registration options I can I can dive into a little bit later but basically DNS names can be used for free uh in the enss ecosystem whereas do eth names at least second level E names cannot so both of these type of names can be used in a number of different ways namely subdomains and issuing something like sub. name.
eth under just name. eth and these names can be offchain uh which includes on layer twos so this we'll get into more how it works but again uh in these offchain or layer 2 names it's just a flexible way of issuing names that again have no protocol fee gives developers infinite flexibility into how they want to issue these different names and again issue basically identity to their users across their apps and it is powered by ccip read or EIP 3668 which I have another slide on in a bit just to give you some context of really who who uses this or where you may have seen it in the wild so far um it's used by coinbase Unis swap poop and a lot more uh to a total of 5 million plus names and so it's getting well adopted and just increasing over time so now how does ens work this is the more dense part so the inss registry is just a smart contract on ethereum and at a very simplified level it stores names side by-side resolvers so you see here is my name and my resolver is Ox 4976 so on this is a smart contract that tells different applications how to resolve my name how to resolve different data associated with my en profile um cb. ID here this is the coinbase example and they use their own resolver and again team nick. eth um which has its own resolver as well multiple names can use the same resolver and most do use the same resolver but the resolver spec is an open standard that anybody can build their own and it's how you do a lot of this flexible um interesting stuff with ens subnames so diving into each one of these and really what it looks like first we have the resolver that I use for greg. this is the public resolver which is just what we call the default resolver and basically in that you can store a object of addresses and an object of text records among other things and again I just want to highlight this is a simplification of it it's not actually storing like the string eth side by side in address but good enough for demonstration purposes and so this means I can store the address for any blockchain um in my ens name which a lot of people think is just for ethereum and so that's not true you can see here I store an e address a base address and a Bitcoin address um and the base vers eth address is important to note because account abstraction doesn't guarant that you have the same address on every chain and so ens is flexible enough to allow you to set a specific address per chain that you want to use when resolving your name and text records are a similar thinking of just an arbitrary data store for key value pairs so there's an avatar text record there's a description text record these are kind of standard and shown across many apps but also you can put ABC as a key and uh XYZ as a value and you can use that as a developer to do any sort of interesting thing that you'd like now getting into offchain resolvers so offchain resolvers are interesting because when you go to resolve something for a name so if I go to resolve an eth address for cb.
ID or the Stars to indicate any subdomain under cb. ID um from the smart contract perspective you actually get an error and this error is ccip read um and then the star is wild card resolution so I'll explain both of these steps basically Wild Card resolution is an ens spec that defines how to find the resolver for a subdomain that might not exist on chain so for example you can go into the coinbase wallet app today and register name. cb. and when I say register that's just like adding a record in coinbase's database but it becomes instantly accessible across all of web 3 so you can use this in metamask as soon as it's created in coinbase wallet even though it's not on chain and the way this works is uh metamask would look for resolver of name. cb.
that wouldn't exist and then it looks for the resolver of cb. ID and that does exist on chain then it would resolve name. cb. through the resolver of cb. ID and this is wildcard resolution the ability to resolve subdomains under a parent name and then ccip read is the ability to fetch offchain data securely from a smart contract and so basically once it finds the resolver of CB to ID in that recursive process it will reach out to the Gateway URL that coinbase has specified which is basically just an API and it will return a response and then the client so metamask in this case will verify that response and return the answer which is an e address or a Bitcoin address or anything like that so these two things in combination make it possible to issue free names to any user on n and this is a lot of the Integrations we're seeing these days because it really allows developers the ultimate flexibility to issue names for for free to all their users and then lastly let's take a look at the layer two example so there's a name team Nick D E and then there are subdomains under that the subdomains don't exist on mainten ethereum and so when metamask goes to resolve something so let's use name.
team neck. as an example it won't exist and it will find the resolver of team neck. eth and end up at the same error because these layer 2 resolvers um are powered by something called the evm gateway and that's a library that we used or that we built um that allows you to verify layer 2 state from a layer two from a layer one smart contract and so what's actually happening here is that they both use ccip read so they both revert with that offchain L lookup um and the difference between cb. ID and team nick. e is that cb.
ID reads from an offchain database or really any offchain data source and then it has a signature verification or really any arbitrary verification in in the resolve smart contract whereas the evm Gateway allows you to minimize the trust required in this process so instead of reading from a database it reads from a layer 2 RPC and then the state of that layer 2 is verified on the layer one contract to make trustless layer 2 subdomains and so these are kind of two different approaches that teams are taking nowadays um an evm Gateway is a newer one that I think we'd like to push so that is um two kind of like in-depth approaches to building in subnames and different types of names these are this is a link to a noce doc that has resources uh and links and contact info and code Snippets and all that stuff um if you're building this weekend on any of the things I've talked about or integrating any other sort of inss implementation to your app um should have info for you and we also have a booth to help I'll leave this up here for a second cool and then if you're using those resources we have 10K in prizes for the best enss Integrations so this is for nothing specific there's not um any super specific track it's just generic best use cases of ens and this is because we think of enss as Bas layer infrastructure you know if you're building a really good application that has a need for usernames which most do um Implement enss in a really creative and a natural way and that is eligible for a prize or if you're really interested in building ens specific infrastructure like maybe certain Gateway tooling or certain smart contracts then that alone can qualify as well so we're keeping the gate open um any interesting Integrations or implementations ofs are eligible for prizes but that is what I have for you guys and I'm happy to take any questions this uh State root yeah so the state root verification you you mentioned uh so I presume it has to be L2 which is anchored on ethereum Main net right yes so the evm Gateway is a few moving pieces there's a contract on layer one main net ethereum and there is a ccip read Gateway which is basically an API and then there's a contract on the layer two that the Gateway is is reading from basically and uh the flow is that the layer one smart contract will revert with a ccip read lookup that will hit the Gateway with certain uh data that you're requesting so a specific storage slot that you want to read from the layer two and then that will give it back to the client on layer one and there's a call back function as part of ccip read that can basically verify if the storage slot returned from the RPC has been uh kind of like committed to main net by the native layer 2 Bridge or the layer 2 like State Route um and if that checks out if it works then it will return the valid response otherwise it will fail and so in this case it's trust minimized because the Gateway cannot lie about the response from layer 2 it can't return in valid State otherwise the contract will not verify the data um and but it's still not fully trustless because the Gateway operator can just turn off the Gateway so it's a different tradeoff from coinbase and team Nick in the examples that I showed but uh further along the path of like a trustless layer two name so it's like all l2s do they use same Patricia Tre as onl one is this what made it possible the same what strategies sorry uh so the state tro is it always a Patricia 3 like the same format of three that we have on L one yeah there are different implement ations for different layer tws especially like ZK vers op stack vers arbitrum and all these other things um we have the library called the evm gateway which currently supports op stack chains so uh base op Manet Zora so on and arbitrum as well and maybe one others and then some of the ZK stuff is a bit more complex and and still in the works but generally they're not all identical uh but they have some overlapping like characteristics that'll make it possible nice very nice work thank you thanks um we have time for one more question I think if anybody has you gave an example of cb. ID and you mentioned that they have their own resolver uh the resolver address different so does cb. ID need to be renewed uh like pay make a payment and renew like we do for domains no so CB ID is kind of a combination of like using DNS and ens and using offchain names and so as long as they have the domain the DNS domain cb. ID they don't have to pay any fees to ens at all and they issued effectively 4 million names for free got it thanks yeah um cool I think we're out of [Applause] time e uh to a larger ecosystem a few specific characteristics about cell is we are evm compatible we are layer one but as of Sunday we're officially an L2 that's deployed our test net is deployed uh so feel free to check that out if you are interested um and also we are specifically built uh for ease of use so we're specifically built for a non- crypto native audience and that is one of our goals and a lot of how our blockchain is created and a lot of our architecture and features about it is for this um so one of that is we're focused we're mobile focused uh so our apps really cater towards mobile specifically Android and Additionally you can pay uh gas with tokens so not just our native cell but also other erc20 compatible tokens like usdc usdt um e others as well and fun fact we're also carbon negative so we're big Believers of ultra green money so feel free to read into that a bit um we have a pretty large blockchain ecosystem and all of these apps um and deps are all part of the cello EOS system all aligned at growing growing the pie and bringing a new digital economy for all but yes this is our little slide for cell and cell 2 which was very recent so now we're officially in L2 launching and I want to introduce the dingo L2 test net um so yeah our L2 test net is available you guys might be the first ever to actually deploy and build things on it and hack on it so first ever to do that on an L1 that trans I to an L2 so we're making history here guys very exciting stuff um but wanted to just dive into a little bit of our bounties so one of the first ones is mini pay that I'll go into diving a bit but we have three bounties for this one and then our second one is fee abstraction which we'll also be diving into later and we have two bounties here I really wanted to take this moment to introduce mini because this is one of uh a super super large opportunity that all of you have an early insight to and can be some of the early Builders getting to actually build and Deploy on Mini pay um a bit of background minay is one of the fastest growing uh web 3 consumer wallets right now in the space it is a digital stable coin wallet that's natively integrated into the Opera Mini browser so it's focused on stable coins it's also super affordable fast transactions and it's specifically designed for easy web 3 access so people who are using it don't even really know that it's on on a blockchain um and most of our users are particularly in Africa and different African regions um so that's the majority of it but why what does this mean for devs why should you build on Mini pay uh what this means when you deploy your dap onto mini and use our use this wallet is you have an access to 100 million daily active users that are natively always coming to Opera the Opera browser so these specific users can have access to your app so you have a giant distribution channel right off the bat which is pretty rare for web 3 apps and web 3 DBS and general um also seamless user access because the users are already integrated into the Opera Mini browser it's really easy for them to onboard into your app and that really removes the typical hurdles like logging into metamask kind of sucks sometimes guys I know um and reduced customer acquisition costs having a built-in audience you can just deploy compared to traditional web through channels and fun fact we have about 10K new I think 10 to 20K new users um each day that's pretty much how we've been steadily growing uh so that can be for your dap as well so it's a huge opportunity and we're really excited uh to have you all here to begin begin being part of this yeah 3 million strong we have three plus million wallets and we just launched uh like so this is pretty cool we're growing at a super fast rate definitely check it out um do we have time for this okay yeah wanted to also talk about Pockets this is a little bit if you want it this is on Mini pay so this is an example of something that was able to be created uh and it's a super super simple way to do swapping so see here if you want to you have all these different assets and you want to swap them like usct you can go we and now so that's like an example of like things you can do on Mini pay and so we really focus on this like seamless integration like account abstraction um and just making it really really simple for non- Crypton native audiences to use cool there you go okay we're going to dive a little bit into more of the technical details so if you want to go ahead and get started building on Mini pay we have harpal here who'll be talking through some of these actual Logistics GM everyone harpal are from the de team so uh if you want to build apps on minip um you want to build on the test net right and you want um like your app to show up in the minay wallet so this is how apps usually show up on the mini wallet but since since you are a developer you don't have your apps inside the wallet what we have done is we have an extra app here at the bottom where you can paste your web daps URL so you're not building mobile apps uh you actually building web app but mobile optimize you go to the S tester app in the explore section and you put in your web URL and it will open that app inside your uh mini pay wallet this will give you an idea of how the user will be using the app um when they use your app when it's actually launched in the Discover section we also have a minip code Library this is frequently used code snippet that people ask for you know how do I do this how do I do XYZ you can go to this link you'll be able to um you know just uh copy paste all the code Snippets this helps with velocity code velocity uh you don't want to waste your time you know just within uh very basic things during a hackathon um some ideas in use cases you can build personal finance apps you can build gift cards you coupon apps you can build stable Co yield apps you can build building apps so for example many people use minay as a merchant where they are receiving tokens from the buyers they don't have a dashboard or an app where they can see their earnings monthly earnings daily earnings and also give out receipts um and yeah following the idea of merchants you can build apps that make the life easier of merchants you can also build micro work marketplaces where people can get paid um in their minay wallet fee abstraction uh this is the about the second Bounty that we have uh fee abstraction is is um so basically if you see at the screenshot do you notice anything different from uh other explorers I will I will give you 10 seconds if anybody wants to guess there is no transaction fee no there is a transaction fee cool the transaction fee is in usdc so this is not something which is available on any other chain if you go to Salos scan you might come across transactions where the transaction fee is paid in usdc usdt and this is not happening using smart accounts or pay masters nothing like that your users are still using EA wallets you don't have to set up any pay Master you don't have to use any external Services you just add an extra field to your transaction and it will be able to use uh usdc or other stable coins that we have as gas fees um so these are some most popular tokens that are available for people to use as gas fees um and the it's super simple uh this is the normal ethereum transaction object all you have to do is just X add an extra field called fee currency and you just specify the address of the fee currency and that's about it now you just send the transaction to the RPC node and the uh user will use their stable coin tokens to pay for gas um one disclaimer I have here is that you should use wagm and VM Library if you're using any other Library the fee currency field sort of gets ignored and the transaction is sent using the cell token as gas fee we have a guide as well in dog so feel free to check that out if you search for fee abstraction or fee currency you will land on this guide and you'll be able to see all the instructions on how to go about it so yeah let's do a demo now um where's the terminal so I have a demo here uh which is already running so yeah here um okay cool I actually had it running I have to do so uh minay app uh you know if you're building dabs on your uh laptop you want to share your Local Host with your phone right so for this you can use tools like enro there's also cloudfare tunnels right now I'm using enro as an example here uh you start a tunnel which will be able to share your Local Host so if I show you what's on my uh so if I go to Local Host this is okay uh let's just open it up the mini mini app so this is the mini app uh this is the app that you install on your phone in your Android device it shows up like this and the first thing that you might want to do is go to your profile here and you know enable developer settings um so to do that you can go to the about you can tap on the version number for 10 times and you'll be a developer um when you go into developer settings you can enable test net this is uh how you can you know uh run your DBS inside the minip wallet with the test net enabled so when the wallet connects it connects to the cell test net and not the main net now if I go to site tester uh you come here and you just paste the link of your daap here head go so this is a disclaimer from enro whenever you open it up for the first time you'll get this you can click on visit site up okay just going to restart it again this make sure this is running on Local Host so this is what the app looks like on the uh desktop and if I start up enro now engro at HTTP and the port number at which your app is running so 3,000 um this is running on 3,000 so we put in 3,000 here as well to open the tunnel we copy this link here and we paste it here and it go inside I think it's slow because of the Wi-Fi basically what I wanted to demo is that when you click on this send one usdc button you send a transaction where you're sending usdc to a wallet and when you do that transaction okay so it work um let me just refresh it here when you send a transaction you will be sending a transaction which uses usdc as cash fee so when you click the button confirm the transaction um and you send it and you check it on chain you will see that the act the transaction actually used us usdc as gas fee um so that was the part that I wanted to demo let's move ahead um so these are all the hackathon resources uh this is one link that you'll probably want to keep an eye on uh you can scan this QR code all the hackathon resources related to fee abstraction mini pay everything is available here um yeah I will I will let everybody scan it and these are the faucets so we as mentioned earlier we have L2 testnet as well so we have different faucet for the L2 testnet we also have we you usually want to go with the first link which is faucet. c.
org for the main test net uh faucet if you want to experiment with L2 you're welcomed go to the second faucet link here and if you want usdc um test net tokens then go to faucet. circle.com again to reiterate the bounties are uh best mobile app on minay first place is 3,5 usdc second place is 2,500 usdc and third place is 1500 usdc and if you are using fee abstraction in a novel way uh first place is 1500 usdc and second place is 1,000 usdc these are other you know protocols and projects here at e Global as well which support the cello ecosystem or the cello blockchain uh feel free to stack bounties uh you know you want to build um and like stack bounties here when you're at a hackathon so to give you a headb here to give you a head start start uh just use these protocols in your project you know to be eligible for their bounties as well and if you face any problems using cello on these protocols feel free to reach out to us come to our booth and we will be happy to help you figure it out this is our team um all of these faces you can reach out to these faces anytime you want come to our booth as well we'll be available um if we are not available at the booth you can use partner cell channel in E Global Discord ask questions there and we will be happy to reply you there there um yeah let's see if this work yeah this worked so if I click here on send usdc it says waiting for user confirmation this is how the UI looks like and when I say uh send we have to actually just use our phone uh blck pattern and it's now sending the transaction on chain and if we now go to the address um let's see don't think I have it here yeah I think I have too many tabs open which is the problem yeah so this is the address which is the address inside the Min wallet we see a transaction 28 seconds ago you go here we can see the UF Fe currency is usdc here so you can use usdc cusd usdt these are heavily used tokens in other ecosystem as well this allows you to your users to come in bring their tokens to the cell ecosystem and not worry about going through a centralized exchange for buying the gas token right they can just start using their assets from day Zero so yeah that's it thank you do we have time you have time for questions right yeah if anybody wants to ask questions sure how could I integrate take the mic yeah there yeah so how can I integrate uh any of these functionalities in a mobile app because we are trying to build a mobile mobile app yeah if you're building a mobile app uh it's pretty simple you just use uh any web3 existing Library like vag me VM ether JS I wouldn't recommend using ether's JS use wagm or VM so you can also use fee abstraction uh but if you're not using a fee abstraction then you can use ethers as well um if you're building a mobile app and not a mobile app as you might be using react native or something like that we are in fact utilizing flutter dark flutter okay yeah yeah sure then you can use any Library you want if you want to use fee abstraction specifically then use vag me or VM okay and if if the library that you use for flutter development um allows you to have custom fields in the transaction object then go for it just add the extra field that I mentioned the fee currency field that is the only thing that is important for sending a transaction using fee abstraction okay thank you yeah yep there's one more question there oh it's over okay cool yeah you can come to the PO you can come outside sorry sure I mean right now it supports Opera but we can definitely talk to other browsers e good all right hello thank you all for coming all right good to go yeah all right everyone my name is Carl fluke um and today I want to talk about um base and our product smart wallet um so the agenda today uh is I want to give a quick highlight to just what is account abstraction in general and what is 4337 so most of the time when I get questions about smart wallet or account abstraction in general it comes down to some of this introduction points so I always like to to do a one-onone on that and then I want to talk about smart wallet which was a upgrade to our coinbase wallet to a V4 that now has a pass key wallet built in and then lastly what updates to base are very relevant to this that happened um two or three days ago um so first when I say account abstraction here I am following the ethereum definition which is um account abstraction is a way to solve these problems and they have like a list of six of them but they're just truly talking about EA um that seed phrases are hard uh and all the intricacies around that uh to solve the problems of that by allowing more users flexible um security and better user experience um so I'm talking essentially when I say account abstraction I'm talking about an actual smart contract wallet um and switching signature validation to not only being an eoa but other types of keys um so why are we doing this is that I'm sure all of us today have gone through this top row is you go to a Dap uh it says connect your wallet you may have one or not if you don't go find one then you connect to wallet you have to have gas to be able to do something and then you can interact um and with our smart wallet um we can skip all those steps and directly create uh a pass key based wallet in that D and Skip all of this redirects two or three times okay so to talk high level of 4 through 37 actually I want to pull does how many people in here know what a bundler does okay and what about a pay master all right good okay then I'm glad I'm going over this all right so in 4337 world you don't have transactions you have user operations um there's only like four fields that are different and I'll show a quick version of that um next you have a bundler which its main job is to take a group of user operations and batch them into a single transaction and then it Loops through them and does all the uh all the user operations in that batch you have an entry point which this is shared across all smart contract wallets um that's probably Le important in here um after that you have the actual smart contract um contract account um and that is what you deploy and what stores your funds and what has Logic for additional Security checks or if um it should approve a transaction or not uh and I'm skipping over aggregators and I'm going to pay masters so pay Master is a way that you can add a signature to have another contract pay for your transaction they could pay for it only for the gas fee or they could pay for the entire transaction and so I'm going to go into all of these a little bit um but first like why are we doing this is it can create a simpler ux um one of the main things I like is multi call so in user operations you can do multiple in a single transaction so like when I go to a defy app and I want to do a liquidity position I have to go to token a and appr proven amount a token B and appr proven amount and then do my liquidity position so I'm doing three separate transactions and waiting for all three of them to complete with multi call you can actually Stack Up user operations and it's one user signature um so the ux for that can be drastically better um as I mentioned you can simplify gas so it doesn't have to be the native token it could be an erc20 um you can upgrade that smart contract for your users if you're using a contract proxy um you as a developer if you're using a smart contract like um smart wallet or safe or other they more or less will handle this for you so just know that some upgrades are built in um and then there's Block Level Security checks um essentially for the actual flow you'll see that there's a user operation you have a list of these they go into a bundler men pool that bundler submits a group of of user Ops it Loops through a validation phase and it Loops through an execution phase the pay Master is completely optional if the pay Master is involved then during the execution Loop it'll pull gas or the fee out of the pay master all right so that's high level the flow of 4337 there is a lot of complexity added there and so we'll talk a little bit about like why is that better so on the left left um your guys's left side yes um this is a normal 1559 transaction it has Max fee PRI uh Max priority fee per gas so on the right here the only addition that we also have is there's a verification gas limit a pre verification guas both of these are used for the bundler um there is an init code so that is the the code that deploys your smart wallet and there's pay master and data so this is the the uh field that you add to say hey this pay master is going to pay for my transaction so those that's the additional complexity on a user op versus a um transaction okay and the bundler so what does the bundler do um it collects the list of user operations um it validates them so it does non checks it does Gas payment does simulation it sees how much gas this user op is going to cost uh it then also in the bundle makes sure that all these user Ops can play nice to each other so there's no dependent user operations on top of each other um also does some fancy things with like uh deployment factories and stuff like that uh and then lastly it has like a reputation system to avoid poisoning of bad user Ops all right I'm going fast here just so that uh we can talk about smart wall and see the demo all right so pay master um pay Master is completely optional so before you actually send your user up to um the bundler you can add a pay Master field to pay for the gas or the whole transaction and so some of these policies the main reason is like cover new users or to have a subscription service to where like maybe when I when I enter into a dow five of my votes a month are for free and that's just part of like the Dow's business model um of making it easier for new users to vote is that we'll cover the gas for your votes because you you paid for like joining um so some examples of this are you can do a certain number of user operations you could do like a total cost per time frame um you can use thec 20s uh you could also do stuff completely offchain um so this is something that um I've seen on base a few times is people doing like a subscription service where it's $20 a month and they just pay for your gas um and they give you other benefits on chain um so it's a it's a cool mix of doing an offchain and onchain use case Okay so smart wallet so coinbase um we've had a Chrome extension and a mobile app for a few years now um we've released a V4 of the SDK a month or so ago um and in that it includes a pass key wallet um so this is meant to drastically improve onboarding and kind of show uh we wrapped all that complexity of 4337 into you as a developer can do the same transaction flow you're used to if you want to do user Ops you can um but let's see that in action this look that looks fine okay so this is a demo app I'm a firsttime user I have a normal connect flow and as you can see here I'm given a popup to where I'm already signed in so let me sign out real quick one more time so I do not have a wallet yet so you can this works with your own flow if you have EAS and you want to support EAS but if you want a pass key wallet I can just hit create smart wallet here um this is making a pass key so I can choose to trust Apple keychain with my pass key I can choose to do Chrome profile with my pass key I can also do like UV Keys um or I can just use this device and keep it completely non-custodial um so that's one of my favorite parts of um pass Keys is that you truly do have a non-custodial option and if you want to pass them device to device there's like a QR code flow um but for sake of ease you can use uh Google or Apple um I think Microsoft has a flow to an edge um but then I do my normal Biometrics that people are used to and that saves my pass key and now I actually have a working wallet and so with this wallet now um we won't show the block Explorer essentially I can mint transactions and some differences here in smart wallet are that you'll see that I have a sponsored by base here so I have a pay master um there's a new spec in the smart wallet that when you initialize wagm or VM you can say hey here's my pay Master URL here's the name I want to give it um so if I want this to be like Moshi cam or Unis swap or whatever app um you can specify who is actually paying for my fees um the other big thing I want to call out here is that there is payment methods I'm not going to run through this because it I have to do tofa and stuff because I'm in a different country um but I can pay with my coinbase retail balance so that's the other big benefit is that if I'm a current coinbase user I've never set up a wallet or done stuff on chain I can actually use my balance in my retail account directly on chain um and I can go through kind of De docs on that that make it make more sense but uh as I sign this is a pass key so it's just Biometrics if you're on like iPhone it'll be face ID um which a lot of people like um a lot of people have been playing with like the Apple VR and that you can you have face ID in that um here's my transaction I'm going to view it on block Explorer so just standard I got an ft I didn't pay any gas um the other thing I'll call out that if you're not used to 4337 is that that wallet didn't actually exist until um until I made that first transaction uh so just a little different okay so super high level that's smart wallet so as I showed pass Keys um cross device people are familiar with them you can now like log into PlayStation Xbox in your bank with pass keys so the normal user can use pass keys and it's not like setting something new and confusing um the my favorite part of this upgrade is that it truly is wallet V3 switched to wallet V4 um so it's already pretty wide out there it is a global wallet so it's not embedded it's not tied to one domain or one website it is a popup that's tied to keys. coinbase.com um it is also cross chain so it's not only on base it's on um six to eight chains I'll double check when we when I pull up the docks um and then I talked about magic spend so right now magic spend is only connect to coinbase and then you have a series of what assets you have on Exchange um our goal and what we're actively working on is also using your existing coinbase payment methods where you could do this as well so if you have an existing Bank or um credit card or debit card tied to your coinbase account you could actually just use that directly from within the the smart smart wallet interface um so upgrade instructions you literally just need to upgrade um to version 4 the SDK I would recommend the newest HP fix um and then I have a few different quick starts put down here um probably the simplest one is Wilson's here um to where it's very Bare Bones um and I'll pull it up in a second um there's a slight more complicated scaffold e or uh sorry build on chain build on chain apps has examples of mft and a couple other flows and then scaffold eth if you're trying to a hackathon project I've always liked scaffold e um there's also like a scaffold hyphen base version out there um that has a couple other niceties in there okay um I'm doing all right on time I'm going to talk about the base stuff and then I'm going to show some code um so the base faour update went live um local time it was like 6:00 a.
m. on Wednesday or Tuesday um time zones are hard um but the the biggest feature that it helped for smart wallets is that it includes a pre-compile for the web offin pass Keys essentially um so it switched the gas overhead from a smart account from in this example 318k to 117 and that was doing just a simple eth transfer so it used to be before this update that it was like smart wallets the transaction fees were prohibitive and it made it a little more expensive and now they're much more in line um so I'm super excited that finally came out um next there's like a a broadly compression Improvement so data availability cost it actually is like 10 to 20% in main net which I'm surprise so gas fees are even less uh and then we made the L1 data fee um drop are more accurate so that when you do estimations it's better and then lastly something else that Bas is doing is we're increasing our Target gas per block um we're doing this not necessarily tied to a um a hard Fork but like every four weeks or so we up that and that just further increases um or reduces gas costs okay so actual smart wallet I want to show some some code examples so I I talked about a couple templates if you go to smart wallet. which is kind of small here um I can show a QR code here in a second actually let me do that if that works um this website is kind of like has a whole bunch of code examples um it shows you how to get started it shows you uh two different um templates uh it's a great starting point I'll give that a second okay cool so some of these examples so we have a sign in with ethereum batch transactions is one of my favorite Parts um so just using wag me this walks through that essentially there is a check called use capabilities and if you have a capabilities called Atomic batch then if you send it a array of transactions so in this example it has a API for um saf Min to an address and then when you use wag me to write contracts you can actually just give it an array now to say hey I now want to call uh safe Min on two different nfts and I can do that in one signature rather than multiple um so this is super simple example um if you're doing a defy this would be approv token one proof token two actually do your liquidity or anything that involves like a a flow of um transactions you can do as user Ops and have multiple so for ux I think that's like a a major Improvement um pay Master this is another one that this example is a little more complicated but pay masters um this is an example that shows you can literally program it to be whatever you want it to be um so if I essentially just look at this one if you want to see it it it checks that you are using coinbase smart contract or smart wallet and then it's it's checking if you're calling a specific function on a specific uh a specific contract so like if I only want to approve the mint B uh the mint function on my f rather than like all the functions like transfer then um you can do that and you can do fancier things okay um then I got like two minutes left so thanks for coming does anybody have questions [Applause] any there might be a mic maybe not go ahead so earlier you said you can just choose if you want to pay through crypto or through regular funds through your coinbase retail funds yes coinbase ret yeah um so if you already have a coinbase account um magic spend um there's like this other capability called auxiliary funds so essentially we're just overloading the pay Master to where the pay Master can do more than pay for gas it can pay for the entire transaction so what we're doing in that um magic spend pay Master is we're just holding that balance on your coinbase account and then doing the transaction or paying for the transaction for you and so that's one of them of if I'm only a retail user it skips the whole like getting gas and even just paying for the nft you can do it directly from your retail balance yeah what's up I think I my question in my own for and understanding what you're on gastion ta um yes so the when you actually do the the function it does break them out so it does tell you hey here's the network fee uh and this one I don't think has an additional fee otherwise it would have another line at the top here or it may just not be big enough yeah I think this one's just because it's free all right I think we're good on time thank you all for coming greatly appreciate it [Applause] than e e B yeah one sec yeah [Music] okay um ready yeah okay uh hi everyone um I'm Robin um de at a veale um today I'm going to be talking to you about um how to build a rollup with a veale um but before that I'm just going to go quickly um to you know let you know about what a veil exactly is so that we get some context about what we actually doing here um essentially right what are the challenges uh we facing today in the rollup space um there's you know multiple rollups out there rollups are essentially trying to scale execution but um at a point after execution da or data availability becomes the major bottleneck for web 3 rollups and l2s um and because you need block space which is not which is quite expensive on ethereum even with blobs right now postp 4844 um we need excess block space in order to cater to this rollup Centric road map that ethereum has so um rollups need da to scale um there's a ux fragmentation with the number of R LS that's popping out every day and we need a framework for unifying all of these uh different rollups right so um so like I said ethereum rollups have like taken uh Center Stage right how many rollups are you using every single day uh on a monthly basis or maybe on a weekly basis or on a yearly basis right it's at least I could say at least more than three maybe or maybe four or five and this is going to keep on growing um I mean in the next couple of years in the next couple of months and aail da is uh this ZK or validity proof uh driven da layer that is um verifiable and secure and allows you to spin up cheap reliable and secure rollups um for your use case um and with you know the number of rollups that's being uh coming up there's going to be fragmentation and that's why we have a veil Nexus that's trying to unify these rollups through Prof agregation um and asynchronous composability among these different rollups and uh by bringing together ecosystems of of different chains together we want to also uh you know be be sure to bootstrap enough cryptoeconomic security not only cryptographic Security on our Network um because obviously if we are uh we are connecting through Nexus uh cryptographically all these ecosystems together but the problem is there is also a cryptographic thing that we need to be uh thinking about and that means uh aail Fusion kind of allows you uh to provide that additive cryptoeconomic security which I'll go into soon right so essentially like the permissionless unification layer for web 3 ail da aail Nexus and aail fusion um so what is Avail da exactly it is the you know validity proof based da layer for the Next Generation trust minimized uh applications so you can basically spin up a rollup on aail using aail da right and um I don't know how many of you know what da exactly means but to just give you a quick brief on that right uh on a monolithic chain for example right for example ethereum if you just take ethereum as it is it does the execution it does the consensus and ordering and data availability um uh of of that chain itself right so you get a bunch of transactions right and you execute it right uh and how do you execute this right you execute this with this data that is there so um if anyone wants to verify if the execution was done correctly you need that data and this is what data availability means so on a Model ethic chain this is a given because every full node who is executing these transactions and every validator who is verifying these transactions will have to anyway run a full node and hence data availability was not much of a conversation before but as we move to this rollup Centric road map as we start moving into this modular uh ecosystem that we have uh where we're decoupling execution right basically rollups are basically decoupling execution from the main chain because you have different kind of VMS like ZK VM zkm you can have an uh evm or a Solana VM or a move based VM whatever you want right and you when you're offloading uh your decoupling execution here you can also in the same way decouple um data availability from the main ethereum chain so that uh you can one uh make it more verifiable and secure you can use a light light client based uh sampling as well as easy verifiability and also it's cheap right um so a is this modular based layer provides raw block space for chains uh it has a robust validated Slayer Set uh uh and basically the main thing that you want to uh understand is here that just imagine a veil da or a veil as a a place for you to publish transactions without interpreting it so aail does not interpret the transactions that you or the data that you put into a veil you can put any raw data it does not matter what it is uh a veil does not uh you know interpret it in any way you can your application can interpret it however it wants to based on your application's logic and that is the magic of it right um so that that means a veil is compatible with all different all of the uh you know uh VMS out there like it is uh agnostic it is chain agnostic it's ecosystem agnostic it's neutral it's credibly neutral um and yeah so aail D clian is it's another superpow that we have uh basically it leverages the kcg polinomial commitments in the block headers to do um data availability sampling which basically means like clients uh on a like for example in ethereum or in the general context like clients just pull headers block headers from the full node but it is not able to verify if the transactions itself or the block itself is valid right it trusts the full node there right and the difference here in Avail is the like clients don't have to trust the full node because they themselves can verify using this uh technique called as data sampling which I'm not going to go deeper into at this point but uh definitely if you want to you can reach out to me later and I can uh let like go a bit more deeper into that but essentially it does this thing called as data availability sampling which uh allows you to trustless like your live client can uh trustly verify that this block is valid and verif uh and without you know even downloading the entire block hence making it light um so it's based on the substrate architecture um and yeah we have a P2P light CLI Network that means uh each light cine communicates with each other and we are also we are also able to reconstruct the state of the block uh because of the P2P lightline Network um I'm not going to go more into this um then we have aail Nexus so aail Nexus is this unification uh uh or coordination Hub that we have for different rollups so like imagine we have thousands of rollups that's coming up like like just look at this image that you see here on my right and uh you see that for all of these chains that are in this ecosystem if we want to connect or communicate with each of them you still you need to have a bridge like each line over here is basically a bridge right and this is just for like what seven chains imagine there's like hundreds of chains you need to have a 1 is to n connection to from your chain to another chain to be able to communicate with them and that is a problem so what does Nexus allow you to do it basically gives you this uh one unifying coordination layer uh using proof aggregation to kind of coordinate among these different layers and uh verify the execution of the state transition function proofs of these uh different layers uh of these different chains um which you can use for basically uh enabling asynchronous composability and uh stuff like that um yeah so mostly for the hackathon perspective um for you like aail da would be uh what you would be uh using aail Nexus is still uh in product like it's still being uh developed and would we're targeting like maybe 2024 or late or 2025 as well um yeah so aail Fusion is essentially a unifying layer needs unified security and um because we now like I said if we are unifying all of these ecosystems together we need to have cryptoeconomic security guarantees as well which is what Fusion allows by allowing you to like stake Bitcoin ether and any other rollup token that you want onto the Avail consensus layer so that you can uh you know contribute to the security of the chain itself right um yeah so that's pretty much uh I'm what I'm going to go into today uh in terms of like explaining about aail so what I want to also go into is um just uh try to show you around the Explorer just give me a second all right yeah so this is one of this is a developer focused explorer that we have so in this uh basically you are able to check out the you know the transactions events that's happening in the network uh you'll be able to see like you know when a balance transfer has happened uh when a data availability uh um when someone has sent data to the aail network and basically you see the data hash over here um you can see who has sent it and if you want you can even go into the block here and uh you able to uh see what all uh you know exens have been uh executed here right so uh this is at explorer. a.so um which you can also try out one thing that is really cool here is that when you go to the developer section here you can actually try out the different extrinsics extrinsics are basically functions uh that you have to uh that you can use to kind of interact with the Avail node right um You can you can consider this as like you know um interactions that they doing with the AV Veil node or uh to basically do some particular functions um for example if I go here if I go to data availability extrinsic I can now create an application key so what an application key is is basically like avails block space uh like when you're sending a data you can create your own app ID for your address right and what what that does is essentially you can send data to that particular appid app ID just saying that okay for this particular app ID I'm sending XYZ data so what it helps you to do is later on when you want to filter data or or like you want to retrieve data back from the Block you don't have to download the entire block you can just filter based on the app ID of your application so if your app application ID is is three all you have to do is uh you know query based on app ID3 and is just that data from the entire ve block so uh this is also possible with a light client so when you're running the light client you can uh if you like in the config file there's a option where you can put in the app ID number and if you do that your light client will only sample or like fetch data of your particular application so now you can uh just run a light client you don't even have to run a full node you can just run a light client fetch that data and then maybe you want to store it somewhere or you want to do something with that data you can do that so it's uh pretty cool um now for example I can also uh submit data right so this is uh so you can do this programmatically like with a I'll show you how to do that so but this is just from the UI perspective so if I want to send the data ABCD um I can send that at like uh submit transaction now right now this is at app id0 as you can see so app id0 is like the a default app ID so in this all all the extrinsics are possible but for any other app ID greater than zero uh you can only do data data submissions right so if you want to do a balance transfer for example you have to do it on zero app ID zero because that is where uh all of the exchange are enabled but for anything greater than uh zero you can only do data submissions so right now I'm doing a data submission at zero which you can also do um because I haven't created an app ID but if you if you want I can show that also um and let me just so yeah so you'll need a wallet like sub wallet or Talisman or poker.
JS uh to use uh this Explorer because this is based on substrate and you can see something going on over here and there like a 20 second block block time here me check okay I think it should have been submitted uh what is my 5gw okay it should be somewhere here yeah so this is this is the data I submitted here and uh you can kind of check it against [Music] here and yeah so the data I've submitted is this right and you can find it over here and you can basically decode it if you go over here right so you can basically use this Explorer to kind of do your developer operations here but if you want a more userfriendly one which is much more friendly like just so that you can maybe just put in a transaction hash and see what's happening you can use a Subs scan uh Explorer um which is probably here so this is at aail hyen touring. Subs scan. so so this is our secondary uh block Explorer it's taking some time to load um but yeah basically this is uh the more user friendly version but it's not very developer friendly like you can't like put in the extens 6 and you know test stuff out that is for the other explorer that I just showed you but over here like you can just put in the uh transaction hash you can look at the extrinsics here uh you can look at all of this data here like you know all of that is cool um but now what I wanted to show is um apart from all of this there's uh the how do you program this right how do you interact with the AIL Network directly with like JavaScript for example so we have support for JavaScript rust and go so um for example the the one which I did now submit data I submitted some data right now um how does that look like in code would be uh here so like if you go to our GitHub at Avail project SL ail uh you will go to Avail JS examples node examples source and and you see data submission so what does this even look like um yeah so essentially what you're doing here is you're initializing the JS SDK uh you are picking some stuff from the config but essentially what you're doing here is you initializing the API um and you are getting the Account Details so you're getting the key ring um and the app ID right so like I spoke about the app ID right here so you can program it to be like whatever app app ID wanted to be um but essentially over here it's asking if the in the config the app ID if it's zero just keep it at zero or else uh you know use whatever app ID you configured right so basically you need to have an app ID the no all of that set up what is the data that you're going to send and what what you're going to do here is now you're going to use the API you're going to call the transaction uh uh and then you're going to call the data availability extens so in the UI how it looked was uh let me pull up that UI I don't really know where it is wait um yeah so in this UI when I went to exens X I called uh data availability here and submit do submit data so this is data availity submit data and on code like in JS how it would look like is data api. tx. dat availability.
submit data and then you're inputting the data in then you're signing and sending it with the Account Details the options which would be like the app ID the no all of that and then you're getting a result back and you do whatever you want to do with the result there's some example for uh transaction handling and all of that but essentially this is what you're doing right and then this is how you can also uh get back whatever data that you have sent basically you go to the block uh you uh check you go through the extrinsics that's there and uh you find the transaction and get uh retrieve the data so yeah uh so this is how it would work on a JavaScript perspective uh for you and there's multiple different uh examples like if you want to do a just a balance transfer for example uh there's an example for that right so you can just go through this repo and uh you know let me know if you have any doubts and now for the hackathon like right so what do you need to do so we have got a multiple bounties here um let me check yeah I think we've got multiple bounties to yeah all right yeah so in terms of bounties what we have is one best use of polygon cdk Orit AIT or St stacker SDK with a vda so um this is these are basically just Frameworks where you can spin up a rollup so you don't have to basically interact with the whe directly you just have to spin up a rollup already so polygon and arbit already have their own tracks for cdk and orbit now we already have an integration with them and you just have to spin up our version of it um and you'll still been you'll be eligible for their prices and our prices as well which is pretty cool um and you can build any use case that you want um stacker SDK is if you want to build like custom application specific chains that is like maybe like shortterm micro rollups maybe like if it is like for example game right if it is a game maybe you want the game to maybe live only for the duration of the game maybe that rollup should only live for the duration of the game and then after the game ends maybe the rollup can be discarded away if that is the case that you want to do Stacker could be something that you can look into because it is easy to spin up and easy to discard it is like an eal uh epimeral rollup basically um so maybe look into that if you want I can help you get connected with the team there are some team stacker members here who are also like they're good partners with aail and uh they also use aail da underneath so all of these things use Avail da underneath um as well and then also now if you have any use case that has uh maybe not spinning up a roll up but you want to publish some data to Avail like I just showed you like submit data to Avail and you want to retrieve it and do something with that uh you can you can be eligible for the build with a veale uh track um and yeah you can do what uh you know specific application you want to build with it also if you are more of a smart contract developer right you don't really want to spin up a roll up or you want you don't want to interact with a veale much but you want to build some solidity smart contract for example we've already deployed an OP stack test net rollup for you where you can just deploy your Sol smart contract and and so you can just deploy your dab on that and eligible for some prices there um and then another one is like best score tooling project so like if you have any ideas on how to improve the veils toolings uh for example like you know a DA cost calculator like what would it cost like just a front end dashboard that would be like um sending 1 MB of data to Avil would cost this much 1 MB of data to ethereum would cost this much maybe to maybe igen or Celestia would cost you know XY Z amount right um so something like that would also be pretty cool to see um um even validator operations that you can see here right uh in substrate essentially like the uh when when a validator stes their tokens the rewards are not you'll need to manually claim it so maybe you can create um a script maybe uh or a dashboard for people to like claim it on a weekly or a daily basis something like that some tools that can maybe just help the ecosystem as a whole so these are some tools that you can do um how much time do we have I think we have time but so I'll just quickly move on to like um how to like spin up an arbitrum orbit chain just to give you a quick uh overview of that so basically it's pretty simple actually we've actually documented all in the docks here um basically you'll need a Docker and with the docker you just uh just pull uh pull the node and the uh you know the the requirement prerequisites from here you kind of change the EnV so what you'll need to do is once you've downloaded uh the requirements here and build um you can you have to modify the EnV file so what that would look like is um so on the EnV file you need to basically uh yeah so on the EMV file okay this is not zooming yeah okay so on the uh EnV file you need to mention the rollup Creator address which is already mentioned on the doc here so this address you need to paste over here which I've already done and then you need to put in your devet private key uh which is uh spare one which I've put in so it doesn't really matter what you do with it at this point um but yeah um so you have to put that and then all you have to do is go into the script folder and modify the config file so what that would look like is um if you go to config.sys So based on your machine so if you have an AMD machine amd64 architecture machine you need to put the was some model rout as this and if it is ANM architecture machine you have to put this and just put in this config essentially and it would look basically as this and pretty much you just run deploy your smart contracts are deployed with hard hat uh you'll get an output similar to this right um this probably will take some time which is why I'm not running it uh live with you right now it will probably take maybe 5 minutes uh 10 minutes sometimes to just compile and run because it's being deployed on AR sepolia and depends on the network conditions over there so I don't want to you know risk Wasing dime on it um but yeah essentially this is what it's doing it's deploying these contract rollups over there and uh you will get some information so as you see here in this image here right um you'll need to uh keep these contract addresses safe right over here once the contracts are deployed you need to keep the contract uh addresses safe you need to keep keep the block number safe because eventually in The Next Step uh when when you're doing the orbit setup script here so you get cloning the setup script uh get into that folder uh just change the node config so how that node config will look like is it would be looking like this so basically in this line uh let me I see if I can word wrap it okay yeah so basically in uh this part what you need to change is you need to change your chain ID based on the config that you had initially put in so like uh when you had initially put [Music] in yeah somewhere over here you you must have put in your chain ID right so you need to configure it based on that you need to change that you need to also add in some of the other important information that is defined uh it should be defined somewhere here let me check no not this okay anyway so I think there was a change of the docs but anyway uh if you actually go through ah yes sorry my bad so yeah in that config file you need to change the these things based on the contract addresses and all of the information that you have based on your deployed smart contracts and B like you know basically you need to change the chain ID the name the initial chain owner so these are uh this would be an address um again this would be this would also be uh the private key and the address uh the seed phrase of your Avail wallet you need to put in your app ID so you need to create your own app ID for this you you can create it programmatically if you want which is again an example that is already provided Ed or uh you can also uh yeah or you can also go to a website like this that we have created so all you have to do is uh sign in with your wallet uh and you can just uh click any wallet give some name for your uh so you can give a name so like I can give it a name like testing 1 2 3 um so I'm going to create an app ID for my uh particular um wallet here so I'm just going to create a IID oh okay my bad I I HED two transactions at once that's why it's happening but it should work and then uh what would happen is you'll get an app ID here which you would replace in your uh config in this right so the app ID would be coming down somewhere yeah somewhere around here um which you'll need to configure so all of the details that you need to configure is um on this documentation itself so it has already listed the parameters you need to uh change and then you just Docker compose up and uh it runs so like this is basically the chain running at this point on Docker um you'll have the uh you know the URL that you need the the end points that you need to interact with the network will also be uh there uh which you can use so that's pretty much it uh I know we're short on time so that's why I didn't want to like get into the actual impation and just went through the Docks but we have a booth here if you want to you know if you have any problems in executing this just let me know and um I'll be here to help um also yeah we have um a polygon cdk docs also it is not officially on the docs but you can use this document as well um I've added it uh on the resources page of our prizes thing so there's a hackathon Dev on boarding cheat sheet uh where you can like find all of these documentations already listed out so that you know it's easy for you to do it if there's any questions I can take it if there's time okay yeah there's any questions um this kind of like configuration let me kind of build my own like Fork Avail and support other like rollups or any workor if I want to use a v to support any other rollups which is not currently supported is it possible and if yes how thank you um so okay yeah so you can build So So currently ail supports um op stack orbit cdk I think we support Madara and uh I think we're working on an adapter with zyn as well so if there is any other rollup stack that you want to integrate with uh you'll have to build an adapter for that particular stack right um you could build that uh for the hackathon maybe but I don't know how complex it would be to build for just maybe one day or two days of a hackathon it takes it takes pretty much some time so it's more complex um but yeah I mean if you want to attempt at it you can uh you just have to build an adapter you can look at the ref of our already existing adapters and see what's possible yeah thank you e e okay I I try to be quick so hi everyone um I'm Daniel from the circuits team um and I want to give you a quick presentation about our newly released SDK and what you can do with it so um let me give you a quick introduction about what circuits is um circuits is a social money uh what do we mean by that um social in circuits every person gets their own personal currency so whenever you sign up you get your own ec20 token and um yeah here's Ellis with her blue token here is Bob with his green token and Charlie with his red token so um how are these talken minets or um how how do they come to be um so every person can mint exactly one Circle per hour um this ensures that there is a fair issuance uh no matter when you enter the protocol so there shouldn't a foro for that case so um yeah this is how it works 1 hour of time is exactly one Circle um and there's a catch because if you can just sign up create your own currency um a botnet can do the exact same thing and you you have a whole lot of counter fied money so um transferring circuits is limited to trusted entities it means if you want to transfer your circuits to someone um and this person doesn't previously trust you um the transfer will not work so what you need to do first is um to establish a TR trust relation so here in this case our uh green Smiley reaches out to the red Smiley and um says okay I'm trusting you and only then the red Smiley can send to the green Smiley and all are happy so um same thing with blue and green um blue reaches out to green and says hey I trust you and then green is allowed to send their own tokens to to Blue so um what happens if you want to transfer your tokens to someone who doesn't trust you um this is also possible whilea so-called transitive transfer in this case um I think we want to send from red to blue um yes so uh the first step would be red wants to send to Blue but blue doesn't accept Red's tokens so what happens in the background is that a component called the Pathfinder will do token swaps for you so first um red sends to green and gets some green tokens that blue in turn accepts and then um red can send to to blue wire the green uh green Smiley um so really quick demo time um see if that works as well we have a small example application for the SDK um please excuse oh the design maybe I should quit that yes H that doesn't seem too work how do I get it to the screen maybe I changed the settings sorry this is huge yeah okay so let's try it again so here's a small um example application that's also linked in the uh documentation and what you can do with it is um you can sign up at circles um and basically perform all the basic actions like giving somebody trust receiving trust sending circles um and we just start by by by setting up an account here so we call this account Lis account um click the register human button M ask us to sign the transaction um and we do the same here for our pop account okay and what that returns is our address of our registered Avatar and just to see that these people don't have trust connections right now we can put it into our data Explorer app and um yeah watch this account so this account is on itself right now it already has their own token but it cannot transfer this token anywhere so um what we need to do next is to give this account some trust so we have here our second account and um can interact with it and say okay from this account we add a trust relation to the other account let's do that and now if I explore that again in our data application we should be able to see that Ellis got a new trust relation so um this a one-sided trust relation now so that means that um Bob can send to Ellis or Ellis can send to Bob let's see uh just let's try that so here in this case let's say the red browser trusted the blue browser that means from here we should now be able to send some circles let's send 10 of them and should also be able to see that in the So-Cal transaction visualizer which has a list of recently executed transactions maybe I have to reload that okay I think the sort order is not that nice but okay um we we have to just relation here now so that means um The Trusted entity can send to to someone else but this is still a very limited scenario um let's imagine I'm in a different city nobody trusts me there uh I found a shop that accept circles and I want to pay there um how can I do that so for cases like this we have this component called the Pinder and um let's check out what our path from from here to let's say some Rand random shop we an organization called Circus Coop let's let's say we want to create from send from our newly created Avatar to this shop um well uh here the [Music] mistake come AO completion okay that didn't work yep it should auto complete so now now it should work so um this didn't yield any result so because there is no trust connection between the two of them um let's add a more established account in the mix let's let's just use my account for that purpose um and I I can oh sorry uh let's let's trust our newly created account for my established account which will enable it to access a huger a larger PA of of the network I need to check some address that sorry okay let's try that again this time it works so now by adding trust from my established account to the new account um it should be able to access the rest of the graph which we should be able to see here in our trust graph visualizer let's use this address again and we now see it's connected to me I trust this account and that means that I'm accepting um this accounts circles now so when we now try again to calculate the route from um this account to our shop we should be able to send a much bigger amount than zero oh yeah and we can see um um this is our newly created account it's the sender or the source and I'm I be became an intermediary so what happens is this person's tokens are swapped for my tokens and my tokens are accepted by the shop and um this way we can facilitate transfers between entities that are not directly trusted um so I think that's it for the demo um I'd like to point you to um our SDK documentation um we have a small section about how it works you can read about the issuance of the personal currency in more detail here um there there are some really nice parts to it for which I don't have time to explain right now there's also a concept of group currencies um which is necessary because since we have so many personal currencies it's difficult to integrate that with existing protocols like market makers dexes or whatnot um and for this case you can wrap personal currencies into a group currency and treat them as one which makes integration with existing protocols much easier um yeah then we have a quick overview about the circuit stack so the base layer is um definitely the contracts but there's also some comparing infrastructure like the Pathfinder and an indexer so if you're interested in that um here you can find the links and then we have an SDK uh finally with um three example applications so there's one very simple swell kit application that's the one you have seen here the one that's has this great design um and there's also a fully featured W kit example application that you can use as a starting point it's linked here it's called Secret Garden and for the react devs um of you we also have a small react playground app which you can check out and just start modifying it um yeah other than that our documentation provides a comprehensive guide um which you can really just go through and copy and paste to your project um each step has a full example at the end for SP and react so it should be easy to get you started um and that's it from my side let's go back to the presentation and I quickly share the QR code for the docs here um and um yeah thank thank you very much after that I will hand over to um my colleague Gabrielle who will tell you about AI agents and maybe a little bit about how they can be integrated with um circuits so we have one Bounty uh for the best integration of the circus SDK uh a bounty for the AI agents about he will talk and um a combined Bounty and thank you very much let's go to [Applause] gabria not looking very good oh awesome thank you uh hello guys I think I have 10 minutes or
Automatic transcript — names and jargon may be misspelled.