EigenLayer Hackathon: Build Data-driven dApps with Brevis

EigenLayer Hackathon 2024 · May 2024 · 57:30

Junda Liu of the Brevis team explains why smart contracts struggle with historical onchain data and how a ZK coprocessor changes that. Using a trader loyalty program as a worked example, the workshop shows how costly it is to sum thousands of past trades in Solidity and how zero-knowledge proofs let contracts access any past data and run arbitrary computation without adding new trust assumptions. It covers the Brevis architecture, the coChain, developer ideas, and an honest look at proving overhead and machine learning.

Speakers

Topics

From EigenLayer Hackathon 2024, hosted by Encode.

Transcript

uh it's great to see everyone here thank you for joining us um once again we're in week three of lakon which is really exciting um so much content that you've all had access to and and hopefully giving you lots of ideas thinking ahead to your builds and what projects you you might like to work on so um yeah thank you for coming along getting the firstand kind of experience of course all the sessions are recorded So if you don't get anything first time around do not worry you can watch it back as many times as you like just to make sure um you've covered all the content properly but I think that's all the notices from me so I'm going to um stop taking up too

much time and I'm gonna hand over to Jinder from Le brevis team we're really excited for for the workshop today so uh yeah jinda thank you for joining us yeah thank you really happy you know to join the incode aatham I think you know in the opening session I had like one minute at most to introduce the project uh I hope I did a good enough job so people will get interested and you know of course today I will spend I would say 30 to 35 minutes to go through the both like why what exactly we're working on why we're doing this and also as a developer how bravis can enable completely new use

cases and you know uh the features uh D app previously couldn't have and hopefully and of course in the last of my talk I will go over some of the brainstorming ideas hopefully to give more developers some interesting perspective oh with this new capability now I can do so much more okay uh you know brevis is I lers uh first menet line partner uh if you check the um what's the the I layer AVS website uh I think now we are by the tvl we are number four last time I checked we are number two now I think it's

really competitive but but it's still very close um and you know if you click uh the intro uh the project it will say brevis is a smart ZK co-processor right I would say first uh unlike layer 2 rup uh people are not really familiar with this kind of uh relatively new term at least in uh crypto industry it's more like a borrow term from uh the hardware world like GPU the graphics Nvidia right the GPU is the most famous co-processor and you the the way we kind of describe it is oh what we are doing to the

blockchain to your smart contract is similar to what a GPU does for CPU you will see it's more obvious as as I go into my talk okay and now I just close it then switch to the to the talk the kind of take it a little bit back so we have been in in this field for really a long time and you know since the white paper of Bitcoin you know we have SE so so much improvement over all kinds of aspects right for the blockchain to be more I would say user friendly uh increased performance and

you know everything you can think about to really make it ready for Mass adoption but the there are still some fundamental limits we cannot easily overcome right because as long as you still rely on a decentralized distributed consensus the blockchain environment you know basically the onchain environment is very restricted and limited in what they can do and what data they can access this might sound a little bit you know high level what exactly I talking about I'll just give you a very concrete example so people I'll say most of people immediately get yes exactly that is an obvious problem is just we didn't

we pretend it's not right in the past think about a Trader loyalty program if you have ever used any of those centralized exchanges it's a must have feature must have feature since day one right if you I've never heard of any centralized exchanges that didn't have a Trader loyalty program basically it will give you some incentive like fee rebate like reward based on your say last 30-day trading volume which is you know makes perfect sense right if you think about this way all the platform want to kind of retain the Loyalty high value Traders but if you look at a DEX n of the Dex had it until last month when we

announced the partnership with unof why you say hey how how hard it can be if you think about on the high level what you need to do is you remember for every user right remember the past trading trades like say it could be 10,000 trades over 30 days and some over the trading volume and based on the volume the protocol might decide to give a different say VIP tiers right like gold platinum diamond and then give them some faey bit as an incentive excuse me but it turns out if you want to do that purely on

chair it's super I would say ridiculously expensive and you know basically takes push most projects say no we cannot afford this this four hours and at least $22,000 purely in gas fees is saying if you want to do this purely like completely within your smart contract written in solidity say I will remember all the trades and after that I will sum over 10,000 of them you will occupy a full 4H hour window of all ethereum blocks that that's how much gas you need to to pay and I would say the 20K Dollar in fees is is too optimistic it's it's way more than that so you say

why why why you have such expensive thing to do because remember within your so-called smart contract environment it doesn't even see any history right it it can only see what's available at that block so how do you prove something happened in the past you have to remember the the previous block you know basically the state route of course all the way H into the block header and then for 10,000 trades you have to calculate the 10,000 Merle proofs the good thing with blockchain right to give them credit uh you have to uh The Good The Benefit is every single piece of data

you can verify it the verify itself if you down if you try to do it say in go ethereum in the offchain environment is nothing I just run the hashes and all the way calculate the numerical route and you're done but doing that within your smart contract environment uh you can try right people did try not saying like people didn't try but there are many uh I would say Half Baked projects you can or or code examples you can find on GitHub they try to do this kind of things but of them give up because it's just you know the cost is prohibited expensive it's it's just not

sustainable and don't forget when you say hey I I want to know this piece of data within the underlying the evm right within their wor state every leaf node in the merco tree is stored with RP encoding which surprisingly or unsurprisingly is actually not very efficient if you see if you go into the detail of how they do the encoding there are many many zeros and basically it's never I would say in the first design the the the focus is more on uh canonically right basically they want to make sure there's never an ambiguity in decoding and they have to add more and more metadata into the the finalized

serialized format but the cost is whenever you try to decode a piece of data it's also very expensive and after say you you have done all this don't forget the number we want is a simple number say what's the past 30-day trading volume right a total sum it's a simple sum but as I hopefully I already convinced you do not even try to do this on midnight you can try to play with it a little bit but don't try to do it because the cost is just so prohib expensive that it doesn't make the whole thing make sense so now we seem to kind of Stu here right so if you say hey the

onchain environment how do I even support this kind of so useful use case right all the centralized exchanges had it not because they want to have it because they must have it to have this like the the the Loyalty user retainment but then if you say I I cannot because of the limitation from the onchain environment we cannot have this historical Access Data access or computation now what are we left with we are left with exactly I'm not saying that that the there's no amazing D app can be built but if you look at we are always joking your smart contract is very dumb why it doesn't

even have a database right think about someone come to you say hey I have this amazing idea to write a financial application but there is a catch there's no database I would say most people were laughing like what are you talking about this ridiculous but but in in this I would say web stre environment if you reflect and it is true right uh think about uniso even if you a big wheel has done like millions of trades on uniso every time you interact with their contract the contract doesn't know right the contract doesn't even care they will treat you exactly like a brand new user address right for the first time interact with unisoft so I think that's kind of why from braev perspec we say

hey it seems there's so obvious there's a there's a gap here again right the co processor is not trying to fill uh like the traditional Layer Two or row up which are more in the scaling game right basically say I what's your TPS my TPS is 10 times higher or something no we're not trying to compete in that track instead we're saying hey everybody is talking about the historical onchain data is a gold mine and it seem to as up until today it's just lying there no no one really can Leverage The Insight right yes there are like dun or some other data analytic platform that can give you very pretty

dashboard but if you think about that how can you turn those insights into action right so I think in the in the data analytic uh industry people talk a lot about so yeah you have big data you have fancy ml uh machine learning algorithm or Ai and you have some very powerful Insight but you do not stop there you have to turn your insight into action but I think that that's is still missing basically say even of course Unis swap has all this kind of dashboards for their Traders and you know the trading volume everything but how do they turn those inside basically how do you make the dashboard actionable right you know the result but then how do you

do that within your smart contract in a trust freeway right I think that that's kind of the whole ZK coprocessor trying to to enable so basically we are enabling a much more data rich and complex computation for un application within your smart contract before it can only deal with what's available within the same block at that transaction if you think about it it's a very very restricted and very very limited environment but now with the ZK uh Magic and the the projects like brevis the the onch application can literally access any piece of data it

wants and also wrong arbitrary computation so but that another part is people familiar with Oracle is hey don't we already have something very similar I think the key part here because it's all based on the Zero knowledge proofs we're not introduc ucing any new third party trust it's not like we have another committee you have to put additional Trust on those committee members are all behaving onest right so because the final uh correctness or or Integrity of the data is guaranteed by the underlying math and your code which is just like

any blockchain right you have the underlying math in there and then assuming your code has no bug the consensus is correct you do need to trust anything so I think that's kind of the high level takeaway from the ZK co-processor perspective how we can enable right and and then that's the uh try to convince everybody the blockchain environment or execution environment we have today is limited and we are confident it will be still limited as long as it's a truly decentralized and uh environment right because of the limited band ways and also the Global Communication overhead you can it can never be as performant or

as uh uh cheap as running on a single database server so that's why the ZK coprocessor can't feel this hugee Gap and enable completely new paradigm again we're not in in a scaling game right it's more like say we are enabling so much more new use cases it doesn't have to anything to do with scaling right it's more about suddenly waste access to the full historical onchain data and it doesn't have to be the same chain it can be any different chain right like say a new deck starts up um who knows base and it actually can say hey I want to attract the loyal users on ethereum Main net right so I think that that's all uh

because ZK coprocessor is inherently Omni chain it doesn't CH agnostic uh from a DF developer perspective you don't you don't worry about basically you said excuse me uh whatever the data you interest in and what kind of the computation you want to do over that and the bravest framework of course with bravis SDK you will write your own piece of code and the bravest underlying infrastructure will handle that yeah sorry okay some yeah I I got a bad code last week I little lost my voice two days ago good

things it was yesterday I couldn't even speak well you doing a great job so far so um yeah okay so I think I hopefully by now uh I I've already convinced you yes at least this makes sense right so basically we know the onchain execution is expensive is very limited but with the c processor Co processor without compromising the trust free property we can enable many new use case just like the unisoft uh you know trading Trader loyalty program I mentioned earlier and um up until now some people might be ask kind of have the question back up in

your mind say hey where is the I ler play right so bear with me right I would go through the the which indust or which Gap we try to fill and then I will go through if you want to benefit from brev system how you write y d app together with brevis and then I will talk more about you know how or why we actually work um with ier because uh when I when I already stop here people say hey don't you say you are not introducing any new committee but why you work with I I think that's always a fun question yeah so next I will go through how you as a

DF developer how you can benefit from the brav system right so on the high level you can view bravis as kind of a utility or toolbox that can generate Z proof of arbitrary computation on any data so here again right up until now I've been always using the historical unchain data as example but it doesn't have to stop there it's just like this is the I would say lwh handing fruit it it's so that it's like there's already so much information out there it just wait for people to be able to like uh develop insight and action on it but internally on our road map of course

we are looking at data that's beyond simple blockchain right it could be anything else that can be ZK proof and ZK verify and then within your onchain smart contract you can utilize this computation result just like the trading volume as a sounds like a simple sum right over 10,000 different trades and then within the smart contract because the the result the underlying data and both the underlying data and the computation results are Z verified so the smart contract can use it in the trust completely trust free way so as a developer there are simple three

steps right first R basically to tell us where are the data which are the data you're interested and the second step is do your computation say hey is it a simple sum or you want to do something fancier like calculate the mean or or whatever the it's more like towards the traditional data analytics or Big Data a data scientist work say hey what kind of insights I I can you know develop from this kind of data and even of course supporting uh primitive like udfs for machine learning use cases and the final step step three verify happens on CH and of course this part of the code is handled the actual ZK verification is

actually handled by the bravis core contract and later you will see within your own smart contract you only wait for a callback which actually is pretty uh straightforward so what are the today right you can access so all the you know for evm compatible chance the the story basically the the the storage slots transaction receipts and all the block information so basically it's everything available part of the chain part of the work state part of the block header is all there because we actually run the underlying infrastructure to uh make sure the consensus check out because it's POS we have to verify the the signature right

BLS signature for bacon chain and all the aggregate everything is correct and then block by block right every piece of data were hushed to the block header and as I mentioned earlier we support different you know uh blockchains and especially when the new partner come to us and say hey like I think trusta Labs came to us say they want to do some like uh similar to credit score B they want to calculate uh a score for different address based on its past activities and they want to run on linear and then we spin off the environment within the day they can do everything

online and this is the our go SDK and of course for people more familiar with typescript now we are also offering a typescript rapper over the the underly go code the the reason we choose go is mostly for the for the performance reason later on I will give you some data points because we also got this question a lot say hey uh did you use any of the ZK VM or ZK DSL solution and our current answer is always uh we tried and didn't work in our case so we have to kind of handcraft all the underlying ZK circuits with the most performant uh system we can find right

and as a developer the SDK the bravis SDK hides all the underlying ZK complexity right you don't need a a cryptographic PhD to to be able to write this code it's just more like a what are the data like here is the example for uni swap it just look at the log field right basically the trading volume like for every trade for every swap the amount will be in the event so basically in ethereum term it's in log right the log data and you just tell tell us hey what are the uh log you're interest in which are the fields and then the step two you write what are the

computation you want to do right because as as breast team we can never guess what you want to do as a developer you know oh for the trading volume I'm doing a sum right and we kind of recognize this pattern so uh our API is literally we add this like map reduce style data analytic uh you know apis so so you don't even need to write your own Loop to go over say 10,000 trades to to do the sum you can just write reset do sum and you're done right so I think that's the power we are giving the developers uh a high level API to express their intent basically

what they want to achieve instead of kind of tangle tangle with the underlying implementation details oh you have to be aware oh this is a loop and then even writing a loop you have to have a fixed all the underlying I would say ugliness of of the ZK is you know basically abstracted away within our SDK and finally within your code you will say hey what are the final result I want to Output right so here you output the final volume and the Block B these are the example right so basically for the trading volume you also want to uh make sure your address include uh your so the result include the user address so you

can do one to one mapping and now this is the final uh step on the blockchain this piece of the code called handle proof results will be uh implemented within your say solidity smart contract and this call will be called by the bravis core contract after we have we have verified okay the ZK proof is legit everything checks out this is the result we're passed basically whatever remember in previous slides your uh uh code will output some of the results right so here output uint

output address and we basically conat all the field together and passive as a circuit output in in this uh function callback and within your contract you will do some simple decoding and get the volume minimum block number is is the example and the user address and then next step is up to the developer to do what they want right basically with the Unis swap example they were just based on the uh the trading volume give the user a different tier and then based on the tier when next time the user does some trade they can get a fee discount I briefly mentioned you know

why we um choose to go this way yes there are similar projects kind of see the value you know what we are working on and even uh some of the projects maybe previously they didn't brand themselves as the co process now they they jump on Bor yeah we also a co-processor uh I think we as a bravis team we we are pride in that we are production ready we already launched the the pure Z and everything with a very reasonable cost control because we we try to squeeze every bit of performance from entire proving stack right uh honestly zero knowledge proven today is

still very expensive we have to use like uh specializ like Nvidia gpus very powerful ones many of them to to on the parallel computation so that it can be done within a reasonable reasonable time frame and all of those cost money and adding any of the uh additional layer of abstraction it could be DSL it could be VM right easily make it at least 50 or even 100 times slower so that that's basically something of the some of the costs we say hey if we want to be serious in production with and working with all the large scale uh Partners they they are not just doing a

hello hello world example right they like Unis came to us hey I have I have this big Trader that has done literally 10,000 trades can you do that right that's kind of U because of the underlying uh system performance that's that makes us to say yes we can handle this kind of the data scale so basically the scale and the cost efficiency is what makes brevis you know send out and in in the production ready and on all those kind of minute launch like be with trust labs and all the other D5 Partners that's why kind of we can't handle all this super complicated and large scale data set with a reasonable cost right yes you will say hey wouldn't

the the the big wheels on unisoft anyway willing to pay yes right our cost is at most uh $10 but they can which the proof they can claim back hundreds of thousands of dollars in fees right so they are more than willing to pay but but you know on the other side there are also other applications or use cases it could just be some airdrop some nft ownership thing that couldn't afford more than say $50 right so we actually talk with some of Partners in in the beginning and they say hey if if a proof cost 10 US 10 bucks uh but the whole reward is not that much how how no one

would do that right so that basically is not a sustainable business so that's actually come to a different uh perspective why we need igen layer uh there there are two basically two parts one pure ZK is still you know uh costly and there a second reason that uh many of the projects in the field don't don't like to talk about this uh pure ZK has its uh fundamental limit zero knowledge is very good at proving something exist something happened but it actually sucks to try to say something

didn't happen we had Partners came to us say hey can you prove this address or this user never say interacted or used tornado cash before intuitively you say hey that sounds like a very reasonable request but if you see how you in the pure ZK mode how you can do this uh it actually turns out to be very very expensive because again ZK cannot prove something didn't exist so they have to prove all the transaction from this address basically it's unbounded right it could be go to hundreds of thousands of even millions of transaction from

from this address all of them the interacted contract basically the the destination contract is not uh tornado cach smart contract address which is of course not scalable and you know basically no no other co-processor can handle this if it's a pure Z mode so that's why we work closely with igen layer team as one of the first midnight launch partner to Launch bravis Co coach chain you can think about is a hybrid mode right yes we will uh benefit from you know the IG layers ver the race taking commun and The Operators and the race stakers to

add the crypto economic incentives on the other side because we always have the final ZK as the the ZK proof right is always there ready to be submitted so we are not saying with this additional committee we get all the benefit but we are not introducing additional uh uh trust why because if all of them or I would say more than two thirds of them behave maliciously any person can submit a a zik proof to say hey I have the the mathematically correct proof that of

more than two3 of the committee members lied so they get the reward the SL token as reward so on the high level go back to the tornado cash example instead of saying this uh instead of trying to prove all the transaction this address has done with igen layers committee they can all agree say hey we all agree and they coign using IG leers's uh signature aggregation say we all agree this address didn't use tornado cach before uh the next question what if they Li for anyone watching this right so yes we do introduce roles like Waters or or

you call watchtowers or what is called monitors there are different names for them right and they will say hey if they could find that single transaction so now we turn an a fundamentally unbounded problem to a single transaction proof which is again at least today with single transaction proof you can literally do that within your browser right it takes about a minute or two so there are people can helping securing the network running the the monitoring uh code and say hey I disagree with the cosign result remember we we focus a lot and saying that with zco processor we are not compromising the trust free nature of

the blockchain right so basically even though we ask the committee members or the I leer operator to coign a result we don't have to put all our trust on them we can say even if more than two3 or whatever threshold of them behave Mal maliciously anyone can submit a ZK proof to prove them wrong and that proof becomes much simple and much easier instead of proving all transactions with we flip the coin you only need to prove that single transaction this user Has Done Right has interacted with tornado cach so I think that's the kind of the power I think

even up until now uh bravis code chain is still the only the first and only hybrid Z code processor leveraging the crypto economics for the efficiency and you know in the optimistic path uh it's also much lower cost right Bally with the cosign there's no uh ZK proving incurred and on the other side whenever a challenge ZK proof need to be you know generated The Watcher or the Challenger has all the incentive to do that right I would be willing to pay a minute of my laptop time to claim a slash token right that sounds a too good deal to be true

right I'm actually have to be competing with all the others try to submit my proof first right I think that's kind of also solve the one of the leading question in this domain say hey who is paying for the ZK proving cost because again it is still not cheap in general sense yeah I think that's basically kind of go over the whole what uh is a ZK code processor and what sets brevis uh different and how brevis work with IG layer and basically run this in hybrid mode as a DF developer you benefit from both one you benefit from the optimistic pass that Coan that has give you faster um result and a lower uh cost and also

on the other side you are not compromising on any of the trust free because there is always the Watchers looking at all the coign uh results from the ion layer operators and willing to submit the proof and claim the slash token whenever they can so basically the correctness is always guaranteed by the ZK part yeah I think if you are interested to learn more we have all this uh you know in much more details especially in the challenge flow time window on our website on docs. bra. network and next I think I will try to use a few minutes I'm not sure if you need still need good idea oh ideas in general but I'm just trying to uh tell like kind of give you

a new perspective now think about that before uh beat Dy beat all the other like um uh did or AA solutions they have been the unchange smart contract has always limited by the uh what what data is available right to your smart contract when it gets executed but now with uh ZK coprocessor we basically extend the data access Horizon time Horizon to uh Genesis right to block zero right you can literally ask if this address has some is since the

beginning right so questions like that and also you are no longer limited by the data available within your within the same chain right so we actually go Partners deploy tax on different chains they routinely run into this fragmented liquidity and user issue right so even say say some user already is a big liquidity provider on like polygon whatever binance BSA right and then uh when they spin a new Dex how they kind of give the those users a proper like recognition or reward incentive right before it it can only be done manually in a very centralized way B Bally within your

smart contract they have to have something only admin or only owner which looks really better I think now with with the ZK Co processor the new use cases have been enabled so that the the users can self claim basically they can say look here is my activities on another Chan or on another environment or even on different projects right if you want to attract big players from your competing uh projects you can sayy if you have done something on the other projects I will give you recognition and welcome to join us right all those things today can be done in a trust free way with the ZK proof right and of

course most of the money is do in so I might dig a little bit deeper into the uh I talk about the Unis partnership and also we are working with all the leading defi protocols uh their main point right of course the user loyalty is obvious everyone immediately get it but the other part is what they can do within the smart contract compared to you'll say traditional Financial uh systems is still very limited but now uh at least we're getting closer right so because with all this zik verified uh historical data and the historical uh the

computation based on historical data you can enable know more uh act Behavior tailored uh use cases it's more like we in general we just call data driven right you can look at if some LP has always been doing like uh be a a good helper basically leave the liquidity in the pool no matter what versus some other LPS who are doing just in time liquidity you know whenever they realize oh there's so much um uh volatility they will withdraw the liquidity which actually hurts the the protocol right but today they they do

not get you know the the good behaviors and the I wouldn't call bad but the the people who playing tricks they are treated the same there's no way to differentiate it between the behavior you want to encourage and at least give some the I wouldn't say punishment because lower the reward if someone like trying to game the system right but today uh because when you run the smart contract you you only know what's current right you don't even know what's past the 128 blocks you don't even see that so with data driven defi basically what we are enabling with you know uh the the protocols the Dex protocal they are they

can be much more um I would say particular about oh these are the behaviors we want to encourage and then you can actually implement this to give the proper reward or even you know uh reduce the reward if they they do not behave as encourag right so that that's kind of the new use cases we are really excited about again remember I mentioned earlier we are not looking at to oh let's double the TPS or reduce the that's not our main focus what what we are trying to say here is that look this a new paradigm by giving a trust free data access for the entire history of

any blockchain your smart contract today can finally be smart it's no longer dumb like without no anything else has ever happened now it's finally can and uh there is uh of course the trust lab we launched the partnership with trust Labs on the uh user Behavior analytics right basically based on what this address or the user has done they compute a reputation score right this gives more kind of opens a new it's just like how uh the credit score in modern society is so critical right it affects every piece of your of your landing and

you know uh everyone that over 18 knows you you have to be careful with your credit score otherwise you your life will be very miserable right but in in blockchain space I think it's still kind of a a new area many projects are very excited about that and try to find a new way uh if you think about that the the requirement is we need to do the the first step is of course the data part and then the second step is you could have your machine learning off fancy algorithm to compute a scorer just like trust LS working with us I think they call it uh Z I forgot the what's the marketing term for but there something to do with

machine learning uh uh ZK media score or ml media score and with that score think about all the landing protocol right you could have a lower collateral yeah it could still in in practic Practical term it still be over collateralized but the ratio could be significantly lower right for for like more reputable uh with good reputation with higher score and also for uh the the new projects try to onboard new users uh all of them will welcome real you know uh loyalty users instead of spots and this actually give them a very

easy way to say hey this address seem to be like either brand new all from its past Behavior it's all doing those like air job activities it doesn't look like a real user right is more like a uh profit seeking bot I think those kind of the use cases uh again enabled by uh ZK Co processor especially with brevit we have seen a very quick adoption because once you have this score you can easily extend to all the other project it's more like people can universally say hey this is the score and I don't need to trust uh some uh third party for this number because end to end it's generated

from verified unchain data and also the the final result is verified by the ZK proof yeah I think of course right I I and maybe you don't need new ideas or you have you already have your next billion dollar ideas ready you just need look for some like how you can actually working uh leverage in this underlying infrastructure right I think overall our uh documentation is pretty well written I remember at Denver there are two teams in like only within three days one did uh uh uh leveraging brevis did uh a cross chain Omni chain governance because you need to

prove my voting stake on chain a and use that on chain B and the other D something really fancy it's like uh uh option trading uh yeah let me it's actually for me even a little bit hard to they did option trading uh the trading algorithm is written in ZK circuit and the data instead of depending on Oracle they directly get from the onch you know uh the the the price right from the contract I that that's kind of the power with our SDK developer first only need to figure out what are the piece of data they want to access and what other computation they want to do and then integrate the

end to end brevis and of course now we have the partnership with I layer even if you say hey I'm just doing some air job it doesn't worth that much you can still benefit from the low cost brought by the the IG layer you know operator committee yeah okay I think that that's pretty much uh feel free to follow our Twitter and I think we have all kind of the regular channels and uh we're also going out to different heatons and I think just last week we work with I ler directly they call Infinity layers to give their developers another round of introduction yeah okay I think all for my talk I saw there are several

questions already Yes I uh um for everyone who's not here it's always nice to to ask them out loud so if you don't mind J that I'll read them out and then if you can uh do your best to answer that would be very helpful so we'll start with James who asks what is the easiest way to reason about how much it would cost to use brevis co-processor okay yeah that that's actually a very good question so um like I mentioned brevis has you can think about brevis had two more mode right one is a pure ZK it's like every single piece of data you pass in you say give me a ZK proof for that and that if you check my um slide

earlier uh in the in the production ready part this is the number right so it with um you we are looking at end to endend cost including the final onch verification is around5 to $10 uh of course it we are trying to do more underlying you know uh proof aggregation so it doesn't scale linearly it's not like say if you do 10,000 there will be 10 times more but on the high level um there are some fixed cost and then there's a how fast do you need this data because if you really need it say within 10 or 20 seconds we have to spin more underlying Hardware resources like gpus to generating the

proof uh I think for the if you say I only need one single uh say receipt uh Ann cost adoti is about uh a dollar yeah I think that's kind of it because there are some fixed dollar fixed cost there like when when we finally submit it onchain right we have to pay the unchain cost gas cost no matter what I'm not saying that if you do a thousand it will be a$ thousand doll right a thousand trans that's the number we we show here $1,000 only cost like double right $2 because we we aggregate on the line so that's a little bit tricky uh there's like you can think about it like what's the traditional linear ax plus b right

the B is there uh close to a dollar and then the the per transaction or per data point is uh I would say a couple of cents at most for each data point I think that's also the benefit uh we we didn't at least for now the existing uh VM or DSL Solutions are just not performant or or efficient enough so we we handcrafted on all the underlying Z circuits to gain the performance lead yeah and of course it translates to cost saving for the partners awesome thank you very much and then GA asks um about the dispute period

and whether it's similar to optimistic rollups uh let me go to that slide now yeah uh optimistic gr up because they do not imp pure Optimist optimistic sense there's no uh final judgment right because you have to depend on this long enough challenge window and your your your final defend is the window is long enough so Challengers will submit a challenge but in our case it's not right uh this actually depends on different uh application say for example I I mentioned

earlier this window is actually uh D app adjustable say you you are working as a I would give a different user a different uh NF based on their say number of transaction whatever and it's up to the developer to decide how bad it is if I get it wrong right if say I'm just giving it one more nft and it doesn't that could be then you can reduce the window to get more liveliness and of course remember if it's if ZK can prove the result is wrong you can it's up to the D app developer to decide do you revoke it or just say

leave it as it right so basically that's kind of the trade off we leave it as a choice to DF developers as a project we have the final uh underlying slashing uh window that's pretty large but it doesn't affect your you don't have to as a app you do not need to wait until the final because you can already use your own um you know uh timeline or or timer to say after say half an hour if it's good or even after one minute I'm okay to use the result right so the the thing here is that different projects uh say if it's a bridge it might be more cautious about right H how this another thing happen

has been proven but if something uh inherently doesn't carry too much value they can go with much shorter what we say here application spe specified window right and the underlying brevis is in days the challenge window is in days the code translation window is in days but it doesn't affect it doesn't mean the application need to wait the application can just say I don't even need to wait I I can you can set your application specified window to zero and it still works right because the under in the brav system will guarantee if there are some uh incorrect results it will be overwritten by the correct Z proof so I think that that's kind of a uh I remember last year when I was at

Paris uh in one of the layer to rup panel uh the optimistic and the uh ZK rups they are the final uh I would say conclusion seem to be they were they were Joint Forces right become a hybrid mode this is similar to what brav is doing so we have the optimistic pass and then we have the ZK as a as a kind of the your trust free guarantee the data is correct amazing thank you and then I guess looking at a time one final one um we'll go to sathia who asks what kind of uh machine learn sorry what kind of machine learning models can brevis

support and are there any quantization constraint strs yes so uh uh if you are interested you can look into more into uh our uh blog post and announcement with trust Labs I would say for now right many people talking about ZK ml but ZK already makes the problem like a million times harder and machine learning depends on which which you are talking about because now ai and ml is more like overloaded term everyone has their own definition uh for the simple udfs basically I would say a more advanced data analytics we can support

that it's it's never it's it's all about what the use cases are but if you say hey I want to run a large language model in there uh I think we we're not there yet so I think that's the I want to be very specific we don't we don't want to get like uh over promis something that's not ready yet because there are two fundamental issue right number one of course is the scale right remember with uh the existing computation you can think about every time you add ZK in the best case is still 100,000 or even a million times uh more expensive or slower or incur the underlying cost in there so if today the

problem requires nvidia's best gpus you times a million there that's just not not there yet the hope is with the the new you know zero knowledge proving algorithm and the framework coming out almost every month the we are keep reducing that 1 million overhead we we are looking at maybe 100,000 or even 10,000 in in a few years then that be more approachable right maybe in two years also you can run a simple like uh a smaller uh large language model but but today right now not yet and then the other part is for all those

fancy uh language models they have a a builtin how do you call it randomization right basically it's not like you ask the same question they will give you different answer every time but that actually counters the the whole ZK logic right remember thek needs everything to be precisely working repeatable so that you know every time you run the circuit it give you the same result and generate the proof but if you say hey for the same input the Black Box will generate different results different time that's I would say is still a a leading research question in the ZK Community how how do we even handle that um within

the team we have something really exciting uh to share hopefully in uh I think in one or two months it's still work in progress so so I don't want to SPO spoil the the surprise but but you know the the promise here is that one with the with the new thing hopefully in one or two months we'll we'll announce something that's very exciting to basically say yes we within this Frame or like uh uh the the problems we We The Machine learning problem we can handle the overhead is much significantly lower so we can enable more machine learning models yeah I would say for now you can at least

start with your own uh user Define you know UDF to start get the taste of it amazing well I think that uh teaser is as good of a place as any to end so uh I think we're up on time we'll wrap things up there but uh Jinder thank you very much for for joining us today um a really incredible session and and I know the participants will will take a lot away from it um you shared a slide to your Twitter do do you want to quickly navigate to that now and we can just leave that on the screen um is is Twitter the best place for people to follow you and find out yeah yeah I think you know the the again right so

I'll say um uh you might already realize brevis as a team as a project isn't necessarily direct to and consumer and user it's more like uh you know work with partner projects work with Dev developers right so yeah sure feel free to to follow us and you know ask questions yeah sure awesome well uh everyone get your phones out scan that code and head over to the Twitter I see everyone saying thank you in the chat as well thank you jinda and we'll see you all again tomorrow [Music]

Related talks