Jordi Baylina | Scaling Ethereum Token Transfers with Hermez zkRollup
Taipei Ethereum Meetup·Sat, Oct 9, 2021, 12:00 AM
Speaker
Jordi Baylina, Technical Lead at Hermez Network, will explain the cryptographic primitives of the Hermez zkRollup and will walk the attendees through the process of using the Hermez Network Layer 2 solution to scale Ethereum token transfers. Speaker Introduction Jordi Baylina is a telecommunications engineer, blockchain developer, and co-founder of the White Hat Group. Jordi is the founder of Giveth, DAppNode, and founder and Technical Lead of iden3 and Hermez Network. Website: https://hermez.io/ Moderator Introduction Yahsin Huang Yahsin Huang is a community builder in the blockchain space. Her focus has been exploring how the democratization of digital tools empowers individuals. She is the operations manager at HashCloak. Website: https://yahsin.me/
Transcript
yeah um so yeah so i i think some of the people have joined um very excited to have jordy with us today um we're excited to have this online event for the taipei syria meetup group um so cece has helped me set up the video conference thing is everything checked okay okay cool um yeah so i'm excited to introduce jordy the speaker of today's event he's the founder and technical lead of hermes network he's the founder of identity he's also the creator of circom the zero knowledge circuit programming language um yeah so please welcome thank you very much it's a pleasure to be here yeah um do you do you have i have a i have a presentation if you want but if you want to do any other format like more query and answer just let me know i'm a little bit prepared for everything flexible if you have slides you it would be cool yeah i can let me share let me share a little bit of the slideshow let me stop some okay well let's start i just want to talk about uh layer two roll-ups and a little bit how it works especially hermes is the one that we just put in production last week and it's fully running in mainnet so everybody can can contest it and try to explain a little bit how how it works uh please interrupt me whenever you want just if you have questions for everything as i told you i'm quite flexible yeah so roll-ups why roll-ups are quite layer to solution well the the answer is very easy you know right now gas costs gas cost of ethereum are very very very expensive they're doing a transaction in ethereum depending on the time of the day but it can cost normal transaction can cost you more than ten dollars or twenty dollars just a regular transaction if it's a token even more and if it's and if it's uh some smart contract like uni swap or something like that can cost you really a lot of money why that happened well that that happened is because the number of transactions that ethereum can do uh is limited actually the limit is the gas limit but uh the gas leak so its transaction consumes some gas so at the end is the number of transactions are limited in ethereum and i would say in any it's limited in any decentralized uh blockchain of course if you send right things then it's you can scale uh faster but if you really want to keep the uh the network the centralized then all the all the all the blockchains they have their own limit bitcoin for example is around three transactions per second or something like that ethereum is maybe 10 times more 30 seconds but still limited and when this capacity is fulfilled then it's a matter of whoever pays more the one that that whoever is willing to pay more is the one that's that has priority so then like the gas cost so that the the fee of the transactions increase uh a lot and this is a limitation because uh this blockchain is when you really want to build a project that's not a test or it's not uh for a very small set of people you want to build you want to bring for example cryptocurrencies to every person in the world or even to every person in a in a country or in for a real project then this becomes that this becomes a problem it becomes a huge problem so we need to have uh something like that keeps the properties of a decentralized blockchain and about that scale that have a huge through so with layer two solutions uh we can uh increase that in one or two orders of magnitude easily okay actually with the current with the current blockchain okay so here i put some some numbers for example is uh with a rollup we can do around 2000 transactions per second full capacity and if we compare that with visa it's more or less what these are this is doing right now in a normal user usage they have a capacity of much more but daily peak is four thousand transactions per second so here is very much uh uh layer two so roll ups with the current state of the blockchain uh with the current state of the art it's possible to reach these these these numbers and there is margin to grow and to to to have that even improve these results uh much more because it's a new technology and there is a lot a lot of new things that can be done here okay so more or less how how why this happens mainly what it does the the what it does the layer two solution like a roll up but it does it puts a lot of transactions let's say for example uh 2000 transactions and they uh pack them in a single trans in a single ethereum transaction okay so at the end is uh if we can do in this case is a huge transactions but in this case we in each transaction we can pack uh around 2000 transactions per batch and we can put around 15 of those transactions per block and this is where these around two thousand transactions per second cancer of course this would be uh ethereum only doing this okay so this is but this is uh if you compare the 30 transactions per second with two thousand transactions per second this is uh [Music] two orders of magnitude more that what currently ethereum can can can handle okay so player two solution and layer two mainly a larva whatsoever well a roll up is like a like a another blockchain imagine a separate blockchain in each blockchain like any other blockchain you have a database of accounts and balances this account has holds this balance this account holds these balances and controls this balance so we have a state which is is the summary of all the current accounts of the current balances of the cons that we have mainly what we do is we milk a tree we make a lights this in a state route okay and then in each batch so in each transaction that we are processing actually we are taking many transactions this case in the case of the picture is three but it can be up to 2000 transactions and we compute a new state these transactions mainly is transfer one one uh transfer one ether from this account to these companies the kind of transactions that we are processing we protect blue process 2000 transactions and we create a new state and every time in every batch we process uh uh as much as 2000 transactions per second so we are keeping these we are keeping these uh unchained okay and why this is why this works okay because if we have if we put 2000 transactions per second and we use for example a normal uh smart contract to process those transactions it would cost much much much more than just doing the normal transactions in ethereum why they can be packed why they can be rolled up how could they be summarized in a single transaction well here is a new technology that's called uh zika snarks okay especially and the important part here for scalability is this s this s stands for succinct what does it mean it means that with this technology we can have a deterministic program that maybe it can takes a long time okay it can it can take a long a long time to compute okay imagine that uh it's a deterministic so you put an input you message that a program that computes uh i don't know one million hashes okay this will take a lot of time okay you put it in the computer and maybe it takes like one day just computing that okay and if i give you the result and you want to check that this result is valid uh uh what you would do well in the normal cases what you would do is just uh compute again this one million hashes you just take this hash and you compete one million times and then you see that okay that's correct you the result that you gave me is valid but with this technology the the approver that would do the first i can compute this uh one million hashes of course i do it but besides computing these minimum hashes i also compute the proof that this computation is valid so i can give you the result of this competition i can give you this proof and you don't have to run again the full uh process for one day you just verify this verify this proof which it takes milliseconds and then you have the warranty that this computation is valid okay so this is what's the the the snarks about and there's succeedness means that means that you can verify your computation much faster than just having to run the computation again okay so this idea is took it in the in the rollup so right now the computation in the case of our roll-up is the verification of these transactions so in the in the roll-up we are taking the last the last state we are computing and verifying all the transactions we are verifying that all the signatures are valid that each transaction have enough phones to be transferred from one side to uh uh from one side to the other so on all these computations are computed by an operator a coordinator in this case uh they compute this proof which is expensive computationally is expensive but then every then anybody can take this this this proof and verify that this is that this is valid so here when uh when we are computing a batch the operator is doing that it's taking 2 000 transactions it's computing this we call it circuit this deterministic program we are computing these um this zika snark this this proof that it's something that's this proof proves that these transactions are correct that they have the valid signature that they they all the that they have that the fee is is that the balances are removed from each uh sender are increased in each uh uh receiver so that everything is valid okay so we can and we compute this proof and then we do uh we do uh uh and we send this proof to the blockchain in this case this is a smart contract and the smart contract just verifies these uh proofs and because this verification is very very fast and it's very cheap in gas costs in gas terms it's much cheaper than just running the full process of verifying all these transactions that's why we can pack all these transactions and this is the basic this is the basics of uh of a layer two solution of a roll-up solution it's not this is this solves i would say most of the problem because we are you know we are we are the trick here is that one operator computes this proof which is expensive but they're remaining in this case is the blockchain the the smart contract if you're on the ethereum blockchain just verifies that this proof is is is valid but there is another part that's important for the rollups and this is that availability uh the thing is that okay there is an attack there is an attack here that the operator can just get their own transactions but they don't publish those transactions then they can create a new state which is a valid state it's a valid state but then nobody else knows how this state was generated how this state was compute and then the the roll-up would stop so it's important that in some way uh all the information that you need to build this estate if you want all the transactions that we are processing they need to be available they need to be available in the uh they need to be available somewhere okay and here is where um the difference between zika volaps and zk balivio in the case of zika relapse like hms what we do is we store this information in the same blockchain so in the transaction actually in the in the transaction data all these transactions a summary of these transactions uh is included in each transaction so all the information is unchained there are other solutions like validiums that what they do is they put these trans this uh information maybe in a federated and federated network of servers or even now uh somewhere else okay but the the nice the cool thing of c cable ups is that they can put it uh they can put it on chain here let me just mention because there is another kind of roll-ups that's optimistic roll-ups that i won't i just want to point out the difference between a c cable up an optimistic collapse is that optimistic volatile they don't compute this uh proof okay they just put the new state of the chain uh or j okay and they assume that's valid and then they have a gaming system where the people can where people can challenge and they can challenge and of course the operator need to put some collateral in there and if the challenge goes wrong then they lose the money and there is this gaming gaming system that's why uh in general optimistic relapse they take a lot to finalize transactions because you need to be sure that there has been no challenging system so and this may take uh maybe a week or even more okay here's four optimistic roll-offs i wonder yeah it's i would say i think it's better than pessimistic relapse actually uh that's uh optimistic because it's like i'm not sure if i'm gonna if i need to wipe for a week because jody just mentioned oh yeah i have a question yeah um do you submit the zk proof with the badge together or you submit separately we do it together in the case of hermes we do it together there are different techniques to doing that in the case of hermes we do it uh together uh so it's just a single it's just a single transaction that have all the information if you want i can try to you can see my screen right yes yes i can show you for example here is the i can show you for example a normal transaction of these okay so this is a forged batch okay here you have this this is the proof more or less and here we have our transactions here in this box there is no many transactions but here you can see all the transactions and this is well this is a normal this is a normal batch using brinkley we can see it also in in mainnet well maybe i can have either scan you hold to if you go to hermet network here is a main net and this is here is see here for example let's see if this transaction is uh but this is an l1 transaction let's see if we can see [Music] let's see this is one of those first batch okay so this is the main net but you see that more or less is this okay and here is a lot of transaction well here is not many transactions yet but here is you can see that all the data availability is also in in here so once they are published they are finalized instantly exactly exactly once it's mine once it's mined when it's once it's included in the block and ethereum you know that this state is valid it's okay you cannot you cannot revert it's uh you don't need to white and you don't need to have this collateral so this is for me this is the nice nice thing of zika uh of zika volaps that's this having this proof of course it's a little bit uh computationally costly but but that's a lot of value it solves many many of the difficulties because all these uh optimistic roll up when you're start thinking about all the all the things that can go wrong and all the all the edge uh all the all the vector attacks you know just send her somebody that wants to do a huge transfer and then he's trying to uh to buy the operators and it's a reason just coordination between operators and transaction centers it's like a lot of gaming there okay i'm not saying i'm not saying that optimistic relapse will not work uh i'm not an expert i have not been like deep in in the optimistic roll up but my my feeling is that uh having zk roll ups it makes no sense to go to optimistic if you can do it uh uh if you can do it with a z cable the case the problem was the case is that it's more difficult for example to do smart contracts and other things [Music] that you want to extend other things and that's why optimistic roll ups maybe are in advantage here in usability because they don't they are not they don't need to build this proof and so they have this advantage but if you are able to build the proof then it's much it's much better so it's uh but just an opinion hey it's uh if you talk with other people in the community well of course there is very important groups that are working in optimistic follow-up and who knows you know it's like we'll see yeah yeah i think that makes sense and pretty cool uh uh and i do continue yeah well i can't it's um but here we talk about that availability and more or less i think this is the most important thing about the about the roll-ups things that i wanted to mention is that uh hermes is uh decentralized system that means that because we see that in the roll-ups we need this uh this person that's the coordinator the one that's building the proofs okay so in most of the roll-ups uh this coordinator is centralized it's just a single person or a single entity that's just running this coordinator and that's it okay so this breaks a little bit the rules of this centralization because uh we are building the centralized system so in the case of hermes anybody can be a coordinator okay uh how it works well the idea is that there is an option uh where uh there is an option that is actually done in in a smart contract on chain and the idea is that you can beat four slots okay each slot is 40 blocks which is 10 minutes and during those 10 minutes you can forge as many batches as you can if you can forge 10 batches with 2 000 transaction each you will get all the fees for that so actually what you are doing is you are bidding you are uh building you are buying in some way these uh these slots okay so and anybody can buy it it's an open protocol anybody can buy those those those those slots okay so this is the way uh this is the mechanism we call this a proof of admission why because of all the hermes that all the hermes tokens that are collected from the bidding uh part of it is born part of it uh they go to it's reinvent converted to the users of the community and so thirty percent is born thirty percent is reverted to the community and thirty percent goes to the layer one to the layer one uh to just uh to layer one to ethereum mainly because uh roll ups there are layer two solutions and they're built on layer one and it's important to understand that we need very good layer 1 blockchains in order to run even better layer 2 solutions so it's important that there is this payback uh to the layer one solutions and this is why uh hermes includes this mechanism in the protocol just from the day zero and this is very much uh this is very much the i would say the main things there are some details of course uh here that are interesting uh for example we can talk about the unchained transactions so the thing one of the attacks here for example is that you send an l2 transaction and the coordinator just don't forge that transaction just just forgets about that transaction and your your uh your money your tokens are stuck inside the smart contract okay so this they could censor in some way so how we solve this censorship uh how we convert this in censorship resistance well the way to we do it in hermes is that you can always do another what we call a layer one transaction so we can send a transaction in layer one of course you will have to pay the gas but then the operator in the coordinator in the next batch will be forced to include that transaction these l1 transactions can be uh to create accounts in the roll-ups or to to deposit accounts to exit so to withdraw to withdraw accounts and to force force exits or to force transfers is the kind of transactions you can do another interesting thing in hermes roll up is that for example you don't need to so a new user do not have to [Music] they don't need to have ether uh and create a new account in the they don't need to do any layer one transactions to create to you start using an account in l2 they just create the account and then anybody can can send money to them and is the the coordinator who actually does this creation process inside the rollout actually is discretion so this is very interesting because for new for new users i expect that uh it's going to be people that they will never hold tokens in layer one they will just withdraw funds from an exchange in layer 2 they will use those uh they will use those tokens in the layer 2 and when they want to convert it back or just convert to other tokens they will send to the chain see the layer two so that's that's a cool thing of this uh of this roll up you you don't need player one you you can you can you can deposit and exit to layer one if you want but expect that i expect that most of the people in the future they would just use just normal layer layer tools we have also another interesting concept is atomic transactions atomic transactions actually uh allows you to send to transactions to the system that they need to that they must be forged together and this is very cool for example for doing kind of decentralized exchange um the idea is that okay i send you rapid bitcoins in uh exchange of ethereum so i do a uh transfer of bitcoins from e3 from account to account b and uh transfer of ethereum from account b to a and these those two transactions are linked in a way that either both are forged on the non are forged and this is already included in the current protocol so this will allow to do some interesting uh things in this in with the same flights just connecting with this and try to change and so on uh you also have another concept that's interesting is one thing it's called massive migrations this is a way of transferring massively transferring from one layer to solution to another layer two solution with a single layer one uh transfer okay and this is already it's already possible with the current implementation of uh roll up and yeah and many things that can be built on top of that instant payments is one of the things that we want to build very soon and yeah it's like a lot of things a lot of things to a lot of things to do and i would stop here because i don't know if there are many questions if not i can talk whatever you want but so like i think it's interesting if there is questions about uh anthony is from open the d5 protocol um and then you want to ask a few questions yeah i actually have a question uh so so the coordinator role you described is this something similar to uh how sequential works in optimistic grow up that they can provide you instant finality and then later submit the proof you could no no it's not exactly it's more than that it's um we wouldn't in a uh in a zika roll-up you don't actually you you you don't need as much at least a sequencer because uh you know the the transactions are final very very fast you know it's at the moment that they are forged in the block uh you know that they are final so here uh the the roll up coordinators they work very much like like a miner in a normal blockchain they just choose the transactions that are in the pool and they just include there and they do not so there is no consensus so there is no consensus of which transactions are included which not just the coordinator just take the transactions and they put there very much like a normal miner they take the transactions of the polar they include them in in in the block and this is possible because uh there is no delay or there is or the delay is very um is very small compared with optimistic volatile you know uh in a normal you know actually for example um in right now in hermes we are forging one block every ten minutes at least if there is more transactions this can be increased maybe one block every one one one forge every block okay which is every 15 minutes every 15 seconds sorry right now computing uh proof uh huge proof of proof of 2000 transactions it takes about one minute or even less so we say that right now uh it's possible to achieve a finality of one minute right now maybe it's 11 minutes okay but it's like it's like the bitcoin finality is like we are around the bitcoin finality so this is not required the problem is when you have a weak and you need finality then it's going to start needing these uh sequencers and other another more complex things for for that you can run sequencers in the cable apps for doing more for going more to instant payments if you know if if it's not enough maybe to white 10 minutes and you want to have instant finality then you can do the same tricks and this is what's about this uh if you want and we call it layer three okay that you can run on top of of um for roll up of uh of aziki roll up on things but um no uh the gimbal apps are more simple uh the the the the the nature is much more simple just full of transactions you are getting the transactions coordinator just put it in the block and that's it so so it's similar to uh i can imagine all the l2 nodes as kind of like a different network and then i'll only be interacting with that network and but i can like i can look at those transactions on maybe a different explorer right but i will also only consider it like final when it's forged on l1 yeah it's like they need to be included in uh so in order to be final they need to be included in l1 so the batch match must be four so the coordinator needs to send this transaction to one and the moment that this is mined then the transaction is final here is let me show you for example uh let me show you for example we go to explorer dot well this is a test but let me just go to mainnet okay this is for example the last batch here there were two transactions you can go here jordy can you share the screens oh yeah yes yeah sorry sorry yeah i just um it's a batch explorer okay so you can go to a specific you can go to specific patch okay and you can see these transactions you can go to the transactions you see the transaction so it's very much like a normal uh like a normal like another like another blockchain you have all the transactions you have uh balances the accounts or anything everything that you have in a blockchain in this case you can have a multi-multi token so the account don't have many tokens and yeah you you can you can see that okay do you have questions from the experience is your foundation applied to ckp teams cc yeah i have a question about mass migration so you do not have the mass migration from l2 to l1 do you have mass migration from hermes to other raw apps implemented we have we have the part of the we have what's required uh from the source part so let me let me let me just okay i'm just gonna show you again yeah i'm just uh uh is this you see here the the mass migration here so here is uh when mass migration has two parts you know the source roll up the one that's sending massively um tokens to the destination roll up okay so we have everything that's required to do a migration to another roll up in the rms site as a hermes as a sender uh it said in other words if there is uh uh if if if there is another rollup that wants to receive funds from hermes right now it's possible they will have to implement some some uh something specific but they will be able to do these massive migrations do you have the the country interface or uh it's a contract interface yes the way uh the way to do it uh the way to do it uh i have another presentation have a full presentation oh how about massive migrations let me see if if i find it massive migrations okay well here is the idea is that the the main idea is that uh the destination roll up has an account can create an account in the hermes roll up okay so so the idea is that uh and then uh you have uh on the on chain you have all the information so you can extract all the information of all the transfers that this account received okay so this contract actually what it does it does a normal uh what this is for setting the the account so a smart contract can have the good thing is that the smart contract can have an account inside the hermes roll up okay so this is how to do it okay and [Music] it does the withdrawal and finally it doesn't migrate okay then the migrating what it takes this this information so it takes the information of the transfers that the that it that they received that this account received uh it gets the funds and then it redistributes it needs to process all this redistribution and this can be done like as a rollup you know it can be done you know with a circuit and changing the state the same way that we are changing the the state from a to b uh so these are state transition functions instead of processing uh instead of processing normal transfers okay yeah uh the the the destination roll up they have a state transition function this this uh circuit that actually what the does it process imports it process these massive migrations okay this is this information here you see in red uh l2 transactions is one batch okay so here well if you see here um actually is uh here you see um you get the the uh l1 l2 uh data hash map of uh uh of the id of the of a specific batch okay so this is a hash of all the transactions of a specific batch on the other uh the source okay so it takes all this hash which actually includes all the transactions okay and process a circuit in this case is a an import circuit okay which states each of these uh each of these transfers that they were made to this uh uh uh smart contract account in the layer one transaction and actually process uh so from the current state to a new state so actually it says who these uh tokens belongs to because there is only one layer one transaction that includes the aggregation of all the tokens of many uh layer two transactions and here you just redistribute it back you send them back to the each individual you you maybe you link it by serial address or you link it by whatever signature whatever you you want to process okay but the interesting thing is that you can take this um so this for each for each batch you have this information uh compressed in the hatch but we have all this information so we can process uh that you need together with uh the state also because uh the state routes include maybe uh the source so who's sending um the ethereum address or the inform important information that you need to link uh the fonts in the layer one and in the layer two okay but all this information is is there and in in the case of hermes this is done this is doable you can start importing uh massively transactions from the later one but you need to build if you want the destination so this this destination roll up you need to actually build here i do some this presentation i do some tricks how to build this uh this destination this destination roll up we are working on that and i hope we can have some full demo maybe running in internet for transferring having a roller blades like another hermes or harvest tool if you want and then doing this that's great cool but this is this is more it's something it's work uh future work but the cool thing is that hermes is prepared for for for for for that for these massive migrations i see any other questions from martin and maybe uh yeah so actually i got a couple questions uh i would say it's more maybe on the business side so i noticed that you selected uh like usdt uh instead of usdc as one of the tokens uh as a starting one and so just wondering on the like the thought there like why did the network choose the usbt instead no no no we we are using any erc20 tokens right now the current the current so that in mainnet right now uh we support uh usdt usdc die private bitcoin ethereum and hermes tokens we will add more tokens during this week uh maybe today if i have time but the idea is that the the smart contract uh will allow uh very soon that anybody can add uh the erc20 that they want so it should be open it should be decentralized right now we are controlling because we are somewhere we just launched in last week and we are just monitoring very much the the chain and we have still some some centralized pieces like this one we are uh custodial but we have this uh fine tuning and this is one of the things that we are finding but the idea is that very soon anybody will be able to add any erc20 but the network is uh uh the network is token neutral generally can be any token can be used usdt is uh it's an import partner in some way because uh while they choose to use they they choose to uh so usdt people they used to they choose to use uh hermes because they can save a lot of funds using hermes and it's a very it's very good for them they are spending like now like 20 million dollars every month for some crazy amount of money and and you can save like 90 of the uh of the fees just using a network like hermes so uh it's good and yeah we are glad to have a tether that use the system but it's not close to tether or it's not the only there is nothing special for tether to use a network you know uscc they can use it if they want [Music] die they can use it if they want i don't know any crazy any crazy token can use it i would say that the token needs to have value because here in the hermes network the fees are paid with the same token that you are using so if you are using you know status token and you will need to pay the fee with uh status okay and this is how it works uh but uh besides that you know you can it's not specific to any 20 to any token god it makes sense so basically it's a garden launch and right now uh you said right now it's a white listing process like for you to add because i i was referring to the uh to the blog post hermits network mainnet launch and in that post it was it was mentioned that only ets dt die and wptc and heads is available but sounds like you already like expanded that uh you know to others already right yeah it's look what it is is we have a parameter in the blockchain in the in the smart contract which is is the cost it's the cost of adding a token so for the token you need to pay some tokens the idea is that this cost uh to be zero or something close to zero okay and right now the cost is i don't know it's more it's infinite infinity it's more tokens that actually more more tokens that fairness there exists okay so it's a way of saying that only as we can we can but uh the idea is to go fully decentralized that means that uh the idea is to put this uh value to zero so that anybody can add a token and the smart contract has a mechanism that even us we will not be able to uh change this value this is when i'm saying that we want to go fully decent rights meaning uh that we want to have so zero governance so right now we have some parameters that are still fine-tunable this is one of those but the idea is to remove all these uh uh all these so that the governance that cannot touch anything so there is a fully decent rights uh protocol right now we are guaranteeing we are doing the warranty that the governance under they cannot get the funds under any circumstance so it's non-custodial right now so this is done from the day zero it's a matter of responsibility and the idea is not only that but that we cannot uh touch any of the any of the parameters of the system all the parameters are like for example you know the donation address okay we are i think that right now is still zero zero did we get the address from the foundation to uh to get deposited uh we are fine-tuning some of those parameters there is a minimum price another thing for going to said rights is that okay the bidding is makes the bidding mechanism that we make it makes a lot of sense when there is a lot of transactions but right now it's not profitable to forge uh batches now we are forging one batch of it a minute so we are spending a lot of money just forging those batch and most of the batches right now are if not empty close to empty because now we just started and we there is very few integrations yet and we are just we just opened the store right now and uh it's still very early days but the idea is that we at some point reach a break even and this break even this means that would be profitable to forge to forge blocks so that people will start betting and then is when the the real protocol will start becoming uh decentralized so that's why it's important to now start having volume to start having transactions so that the protocol gets the decentralized this is this is the this will work or work right now integrating having different applications to work with at the end having volumes even having going to different countries and people start using it if there is any any idea so the idea is that uh well with hermes uh the cost is one tenth uh of the gas cost of ethereum so the idea is that we expect that there's gonna be more demand in the upcoming weeks and months and days to reach this break-even situation even more so that there starts being external coordinators to start forging blocks and start dealing with the on the on the slots and yeah on all these parameters just uh removing ourselves as us as governance and having a governance less system fully decentralized this is the the goal for the whatever as soon as possible but maybe it's a year okay let's say yeah yeah uh kind of follow-up question since you mentioned incentive uh you know in the middle you're you're saying that the incentives are paid out uh with the token that is sending or transacting right and so i was the fees yeah so so there are two things here one is i was wondering whether this is a fixed fee for example fixed and usb terms or is it a percentage-wise uh fee so that's the first question and then kind of follow-up and related question would be if it's a fixed one uh uh what kind of arc i assume you need some sort of oracle uh to kind of keep track of it right and so what kind of oracle systems are you using yeah yeah here is the the most important thing here is that the coordinator is uh is free to choose the policy they want okay they can say okay i'm just for example say okay i'm i'm the coordinator and i'm going to include only the the transactions that at least are one dollar worth worth according to this price of according to this exchange price this exchange table but this is a specific coordinator can set a policy but another coordinator can can have uh another policy at the end coordinators are like miners you know they they they have a pool of transactions each transaction of course paying the fees in different in different tokens and they are free to choose which transactions they include or not in the in the in the batch and so each coordinator can uh set up their own uh policy if we talk about policies you know it's it's different uh for example policies where the network goes in full capacity or what the network would go does not go in full cap in full capacity when you are not in full capacity so you have uh like right now that you have uh many slots that are free then in general the the easiest policy is to set up a minimum price and the easiest way to say is okay let's set up this minimum price in dollars okay this is a way of of selling yeah you can say you can you can set up this medium price in bitcoins or in ethers if you want it but just you set up a minimum at the end of the new worthy price this is a good way when the network goes to full capacity then other things change you know in general it's okay then the coordinators have the incentive to uh include the transactions that have more fits like uh like ethereum right now ethereum right now in layer one ethereum they're running at full capacity so pays more it's simple that's how it works so here is it's not very different than that the thing is that here instead of miners we have coordinators and the coordinators are free to choose which policy which fee policy they want to include okay yeah make sense and and uh so what i'm thinking is typically people are minor when when they first started uh they probably wouldn't have like much sophisticated uh policies right they would just like run the default uh default one that you provide i'm seeing i am checking the github right now so right now there's this hermits note i'm i'm assuming this is kind of like the geth uh you know yeah uh yeah by default then uh like what kind of oracle do you use there well here what we are just getting the prices i think is in we are getting the but this is the coordinator actually the boot coordinator is getting the prices from gecko and they are published so that we are publishing a policy in this case that's uh that the policies okay the transactions needs to be one dollar worthy uh in fees uh according to the these prices that actually we are getting them from well this is this is just a specific policy but this is a policy of a specific coordinator other coordinators can have other policies got it makes sense uh any questions from vivian and han henghan and kevin martian yoma yoga okay because i asked them because they used to work for oh well they they some of them are still working with barry whitehead um yeah and some of them are still working very closely with the ethereum foundation research team and yeah um any other questions i'll just wait for a minute oh yeah uh actually let me follow up on the gecko one go ahead for coin gecko i actually i think i have experienced a couple of hiccups uh with regards their price fee before uh so is that the reason that you have a kind of a guarded launch right now because like coin gecko i think by default they uses uh the uni swap pair and they only use the east east pair if possible and so there are some special coins kind of kind of a reminder um if like in case you're not aware like there are some special special coins which are not paired to eat and some oftentimes they have issues with those kind of pairs right and you might get a very volatile and incorrect price fee uh that is easy to arm um but of course right now it's it's just starting uh right so so like one of the things i look um so myself i'm i'm an auditor right and so i'm looking at how how to mess up this thing and all of the ways will be like one of it and like coin gekko is not as reliable um like as i mentioned like you know for special cases uh that is not pairing with e that's one thing um there are sometimes uh how should i put it like token token updating or or yeah just say take it on gecko just as an example actually uh i think accurately the implementation actually uh the current implementation uh for each token but this is something that's specific to each operator right that's what i'm saying so and in some way operator each operator is free to choose whichever or a call they want actually in the current implementation uh it's you can choose to have a fixed price for example if you have a stable coin maybe you just take okay one that is one dollar and and i don't care the the whatever you can decide this policy i consider me as a when they want a dollar so if you are sending dice so you will have to pay at least one dice a fee i don't care if the die is 096 or 1.04 okay so it's the that you can so the operator can decide which price they want they can have a fixed price they can have uh uh they can get it from uh uh i think we have implemented also from uh i think it's a phoenix but it's like you can implement as any other oracles even you can you can have a i don't know an average or a median of many others so it's like this is very extensible and this is but if this is only just to be clear this is only for defining uh defining a policy defining a policy of a minimum fee in the case that you want a minimum free policy okay so you can have a policy that's uh uh i don't know it's like okay i'm gonna get uh i'm gonna get the i'm gonna forge all the transactions that i have uh as far as they have in north valley as far as as far as that there is value minimum value is not and and then i can get i can get the the values from everywhere else so they don't tell even to anybody just yet i collect all the all the transactions if they have value which is that i include them but there's another kind of policy that i can that i can put in there but this is something that's specific to the operator and each operator will choose which uh they will sit at the price it's like when you're an operator you are buying a slot and then you are like got like you are like a miner during that slot so during that slot you can do you can do what you want if you want to decide not to forge transactions then you can do it maybe you will lose a lot of money because you have to beat for that but you are free to do that the same way that the miner is free to do what they want with their block yeah that that that totally makes sense you seem to uh stress a lot on the freedom that the you know like the node operator can choose right the policy and so i am trying to dig that right now from the code uh i'm not seeing the con i i couldn't easily find like the con configuration for uh for that as if i'm if i'm an operator right right now and i assume this is hermits node and i've cloned it i want to run it to if i want to like um you know customize my policy do you know on top of your head like which uh how do i do that if not i can just like yeah it's in a configuration file in the configuration file you have different parameters there but you can define their minimum fee maximum fee you can define the all the these prices or this oracle system where you get this where do you get the braces from okay it's what you say you can you can put it there and yeah you can also manage how many smaller things is how many how many uh so how many when do you when do you forge a batch here is a more complex thing is uh when it's worth it to forge a batch so do then here there is always is uh this compromise between do i white for having more transactions before i start building the batch or it's better to build the batch now with the transactions that i have and maybe building another later on and and and here it's going to be you know running running operators uh it's going to be fun you know it's not an easy it's not going to be an easy job especially when we are talking about thousands uh of transactions okay it's because it's like well upside days to scale we are not we are talking multiplying by 10 or by 100 the number of transactions that that we are having right now so this also means multiplying by a lot the fees multiplying by a lot the the database that the the space of database that you need the transaction selector all the optimizations on the transaction selecting what are the right transactions this is it's going to be a i would say it's going to be a full science we are starting right now right now if you check the coordinator code is very i would say it's a very simple um it works it's a very simple idea but there is a lot of work to do there for optimization especially when uh a lot of transactions start uh being in the system yep makes sense i i just i just found the oracle part so it's in price uh yeah and you can you can see that you cannot yeah you should see that you can add very easily uh uh another oracle and you can you know you can personalize with different oracles and it's just um a cold place it's a place where kind of a template that you can put whatever you you you require and and yeah i expect that the coordinators especially when they become decentralized so that it's not going to be one single coordinator like now it's going to be like many coordinators running and competing with each other then it's when this uh fine tuning and this optimizations and you know these oracles and even connecting this uh connecting these uh uh coordinators with different exchanges and we it's very interesting yes running a good not real coordinator when you have a lot of societies it's going to be very interesting because here is a lot of science that can be created on top of on top of that another question yeah can you can you send multiple tokens in one batch or or only one one token yeah no in each batch you can send uh each in each batch we right now you can send 64 different tokens at most and most and and the coordinator need to specify their own um token receiver state exactly they risk they the all the fees are collected in layer 2 so uh the coordinator they need to specify which are their the accounts the layer two accounts that they want to receive each of the each of the tokens that are used inside about a block so in the block actually the limits of the block is actual release the big block is 1912 uh transactions of which uh of which 256 can be layer 1 transactions and yeah it's 32 levels [Music] so that's 2 to the 32 possible accounts this can be increased with new circuits up to 2 to the 48 number of accounts and yeah and 64 transactions 64 different tokens per batch which i think it's enough for most of the cases let's see you have multiple batches in each one block and so that means uh to each uh a batch is the maximum number that one star can verify right exactly i see okay so this can be this can be that this number is interesting because this can be increased at least i would say it can be doubled easily with the same chord without changing many things this could be doublet uh very easily and once we change the curve and we go to bls 381 and so on you can multiply that by 16 easily of course you need to compute the problem is that then you need a computing power to build the proof and this is the probably the biggest one of the one of the limitations uh that exists right now but right now it takes uh less than a minute to build a two thousand one nineteen twelve uh so one one thousand eight hundred and twelve uh transactions it takes less than a minute to build the proof with an import with a huge server that's a regular you said that bis 12 381 is uh is that used for a signature or instead for the uh snark protocol to verify that yeah yeah it's uh we verify this is for the snark protocol but the idea is that we are using the for internal for the accounts for the wall up accounts we're using uh baby jab jab corp which is a corvette running it's it's running inside the snark and then we're using uh edsa signatures of the uh of the these baby jab jab points these basic jab accounts oh i see that that makes sense to me inside the days not inside the state actually if you see what what what's going on inside the state of uh an account well you have the uh inside the develop account you have the the the ethereum account you have the baby jab jab account all of them in the in the same state it can be zero one of those okay because you don't have internal accounts or or or a smart contract account for example would not have a baby jab jab account so it can be zero each of those um we have the the balance itself you have the token so it's that much the balance of that token and the nons so that you can you can increase the transactions this is a state that we have for each rich leaf of the state it has this yeah it's uh interesting to me it because we uh in hubble ultimate zero we have a separate account tree to to store all the public keys but at all hermes you install the public inside the state uh yeah there are different approaches there uh i'm not sure which is the best we choose this one because i think this is very simple you know it just has uh one kind of account and this is what what it is but uh yeah you can how you can always it's yeah it's it's our goal it's like but saying that this is best and this is worse you know it's like we'll see we'll see in the future what's what's what's what's the best way to store the state but this works this works uh quite well yeah um so most of the people are engineers and researchers in this call and i wonder if they have follow-up questions where can they best reach you or where like where can they go to ask those questions yeah we have uh well we have a discord channel uh hermes discord if you look for that it's uh you can find it there so if you are in yeah yeah it's a one i don't know uh i will say i will send it to you right now uh just if you if you find if you find if you look for hermes discord uh yeah you should you should you should find it easily uh somewhere okay we are and if you are interested if you are very interested in the zero knowledge part and you are uh you you're working in circum or you're working in starch yes or some of the tooling there then i would recommend you go to the item three 3 telegram group it's a it's an interesting community there there is about 250 persons there and it's very nice people there so uh if you are really at a technical depth and you are you know working with silicone working with snarks you have dopes or things just uh go to this channel ask anything you need about that there it's very nice community there somebody somebody will answer your questions there so it's a very good place to to have we also i don't know just that twitter you know just uh uh we are very much in twitter with a lot of communications in twitter uh yeah that's mainly the the communication channel but discord is very easy yeah um yeah so i encourage everybody to join those channels um any updates or any interesting things that we can expect in the next coming two months or three months there are well yeah we are we just launched it last week next week we expect many many projects many exchanges just to join and to implement the hermes protocol uh we are working very close with them to just fine-tune them and working with all the apis and so that everything is is ready and i hope that in the upcoming days we can start announcing some applications and some some exchanges that are compatible with hermes um another interesting it's not i would say it's not 100 related with enemies but at some point yes is that we are now preparing uh uh full right so silcom it's fully has been fully revited in in in vast there is a new version of silcom that we are just testing right now and it's a much better brighton with more professional people right now then i wrote silicon and you know silicon was written in javascript it i think it's okay it works it's it's my baby but it's not i'm not i'm not i'm not you know i'm not a i'm not a compiler expert so silcom has been fully provided with a team of uh that are experts in compilers we have been working together for more than a year now and i hope we can present these we can open this project and we can present this project to the community in the upcoming weeks we are testing right now and this is gonna be i think it's gonna be very important because this will you know together hermes with uh silcom so hermes is very important because in some way put silicon in a level that's production ready in some way so when we throw these two things together i think it's going to be very important even for other projects that wants to build zk snarks based uh applications in a more mature way of course all of this is open source and yeah it's normal if you're in this space you you have to do things open sources options yes okay so thanks very much for your time and thanks very much for sharing um yeah we'll be having a few more events this month and i hope everybody can stay tuned and follow our our meetup.com page you know so twitter and we also have a telegram group so yeah so i'll see you thanks very much thank you very much it's a pleasure and very nice talk very nice
Automatic transcript — names and jargon may be misspelled.