🛠️ ZERϴ to Hero Workshop: Building on ZERϴ and Zerion API - ETHGlobal Brussels 2024
ETHGlobal·Wed, Oct 9, 2024, 12:00 AM
Join Abi Dharshan, Aleksei Bashlykov and Igor Sobolev from the Zerion team, for a workshop titled, "Building on ZERϴ and Zerion API." The ZERϴ Network by Zerion comes with zero fees. Using its own custom paymaster, it enables dapps to sponsor gas fees so that their users will not need to pay for transactions. Zerion Wallet users will be able to trade and mint from day one without any gas fees at all. Learn about the tech behind all of this in our workshop! This workshop took place during ETHGlobal Brussels, a 3-day hackathon held in Brussels, Belgium from July 12 to 14, 2024. ETHGlobal Brussels brought together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ---------------- Follow us: x.com/ethglobal Website: https://ethglobal.com Email us at: hello@ethglobal.com
Transcript
[Music] all right I'll start I'm going to talk on behalf of my CTO slides as well but uh hey guys I'm Abby this is eigor here he's our blockchain engineer um and I'm just going to give you a little bit of a rundown on uh you know why we here why we doing the eat Global hackaton Alex perfect um so that is Alex our CTO um Alex You Want To Get Right started yeah for sure uh did you just is the interest so far just a little bit of all right everyone not not very yeah I'm sorry for being a bit late uh so guys could do you know like about Zer already just like for me to know where to get started yeah just never heard okay perfect then I start I'll start from the start I guess so basically we started La back analyzing onchain data indexing all the stuff and the evm chains and we always tried to make sance of what's going on on CH for the users understanding their transactions understanding their positions portfolios ET Etc and then later we launch the wallet with the main premise to build the wallet that actually can tell you as a user like all the assets that you own on chain as well as to see all the actions that you've done in the past and unfortunately the competition at the time couldn't really display that data so we just believed that will bring the U of using the wallet to the next level so our companies since the very beginning have been focused a lot on bringing the best possible U to the end users that's how we ended up in the wallet space and now oh all right yes is it recorded again okay cool yeah and then we decided how do we keep improving the U because we believe we done pretty much everything we called on the interface level and that's why we decided that the next meaningful step for us will be to actually launch our own roll up because we truly believe that by controlling the settlement layer as well we will be able to unlock certain ux experiences that are just simply not possible otherwise and we just decided that our goal is going to be to make being on chain enjoyable and rewarding and for everyone involved in that journey and we identified three groups so the dub developers people who create stuff creators who produce content using DBS that other developers buil and of course the end users who benefit from using all of that and we want to make it enjoyable for all the involved parties to be there and we've thought a lot about like what are the biggest frictions in the space right now and we believe that the first issue that we want to tackle is the gas fees and there are like multiple reasons why we believe that's the time to do that I guess one gas fees are going down for the past couple of years or so especially with the proton shardan in ethereum and additional block space it's getting cheaper and cheaper to execute transactions so the actual net cost of a single transaction is going down so it's not even about the price itself but it's rather about the friction of paying for every click of the button that you need to perform in the wallet and we figure it out that since we have our users we know how to monetize them there's no reason for us to force them to pay this couple of cents for every button they press on the app and that's why the first problem that we are trying to solve by introducing zero is making it a zero gas experience for the an users which basically means for all the zero and wallet users who interact on the Zero roll up it's going to be a completely guess experience completely free experience and I guess the most exciting part that it's not requiring any changes on the DB side as well and I think eager later is going to explain a little bit more of like technicalities of how we were able to achieve that but I'll just briefly say that it's only possible thanks to the ZK stack developed by the natur apps team and ZK sync era is one currently and only production chain that runs on top of that stack and it's evm compatible which is amazing any DB built for any evm chain can be easily deployed uh and used there and they 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 of free transactions we also introduced the system that is designed to differentiate spam and malicious actors 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 accurate 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 guess and then you can of course still permissionless execute any transaction but supposedly if you're legit user and you're not trying to spam the network you 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 onchain so every address on the Chain will have an onchain score and bringing that onchain 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 ET ET 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 let 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 don't 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 pnl if the wallet has it is derived from our API so under the hood we have a B2B product and we've never done this before this data is expensive it's you if you've used you know any other data provider you've seen how expensive it can canb and you know costs similar to AWS in like web 2 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 script 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 def5 position 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. i/i after if you want to you know Dive Dive deeper into it yourself but as you can see um we have uh very simple readme 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 folio um value distribution by chain and changes um over time um for our CEO's wallet for a Guinea'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 St locked or borrowed so he's not done any like other um def uh transaction 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 endpoint similar to this if the possibilities for you guys can include you know NFD collections if you want to have like a nice ux that's like you know listing people's nfds by multiple chains and similar to what you see in zerion 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 1 in or 0x they call themselves as Dex aggregators but we're almost like a meta aggregator cuz 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 sponsored this transaction and and 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 stack chains which is called bootloader uh it calls our pay Master smart contract which is checking if the signature from onchain DNA Services U valid 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 docs 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 the differences uh [Music] also exit full screen mode also we have bridge. z. Network which allows you to bridge ethereum from seites net as zero is currently L2 rollup foro 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 simple Explorer provided by ZK as well um and also very important part for interacting with the zero network is that uh We've recently added uh developer testet mode uh in our wallet uh you will have to in able that me 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 I like the simple like example that we have is just like maintain 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 it so here we show that it's a me transaction that we've received thousand docs 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 this 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 gas lless 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 hackathon that involves like wallet data or onchain data you could use it for and for the gasless chain right I think what we're looking for is we've 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 C'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 NFD 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 gasless component so like what would a user want like think of like a simple onboarding app you want to onboard your grand mod 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 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 cuz I think a lot of people would be doing that um regardless um and all the documentation make sure you scan this QR code just take a quick photo this is pretty much everything that Igor 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 a 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 be kind of like moving around the space and you know talking to all of you individually um yeah that's pretty much it thanks [Music]
Automatic transcript — names and jargon may be misspelled.