EigenLayer Workshop with Core Team by Gajesh Naik
ETHDubai 2024 · 20 Apr 2024 · 19:57
Gajesh Naik leads an EigenLayer workshop for developers.
Speakers
Topics
From ETHDubai 2024, hosted by DeFi Dubai.
Transcript
hi everyone I'm J uh I work at igen ler I do engineering and devell uh today we'll be building our first AVS uh it's called incredible squaring uh before that I'll just give a quick uh brief intro about me I've been quing for the past uh 8 n years and I've been in crypto for last four years and this is um yeah this is this is my first Workshop so uh bear with me uh I previously worked at Sal Labs uh L zero and FTX Ventures and yeah I think uh let's let's get started uh so this is uh this is a brief about IG layer we have three
components uh one is stakers operators uh AVS developers and then avss um AVS developers are the ones who build aves for example they can be like Bridges or oracles or anything which requires trust uh operators are are people who run uh run these like operate uh run the like post data on the Oracle or like Bridge um and uh like provide a computational power uh stakers are the one who give the economic security and and yeah and abs is ABS consumers are usually like oracles like
Landing protocols or or like rollups Etc uh so this is what we'll be building today um it's very simple uh first there is a task generator uh who will submit a number to be squared uh then to to the AVS contract uh then the El uh the i l operators who have oped the AV will will get U uh will uh get details of the task then they'll uh send a response so if the number is two they'll they'll submit four um to the aggregator uh then uh which uh and then like aggregator will get inform like which
operators have opted into the AVS and and the task uh and once that's done like it will push the aggregated data to the AVS contract uh yes uh this is a more broad uh work through so it will it will first send a new task and then the new task event will be created um then send then the operator who have subscribed to it will get it and uh then then they'll they'll Square the number and submit it then aggregator will verify the signature aggregate the signature and uh if the quum is Corum threshold uh is reached then it will sub
charge yes uh now before we get our hands sty like uh do we have any questions okay uh does everyone have Docker installed uh can I just get hands up like who who has Docker give very few people um so yeah let's let's just take five minutes to get Docker inst Docker and the other pre prerequisits installed uh so head over to incredible squaring AVS uh on GitHub and over there there's uh so uh does everyone have Foundry and zap
preinstalled guess not um yeah let's let's actually start with Foundry uh so go to do uh incredible squaring uh AVS and the commands are over there like just copy it and paste it on your command prompt well we have Foundry installed now and I I already installed uh zap pry um is is everyone on the same page right now oh can I get a yes or no or just a hands up okay
awesome okay well next steps would be to download Docker uh just head to do.com and download the docker desktop uh for for your uh for your a machine okay uh we'll take 5 minutes off for this to download Docker and fontry uh yep time's up uh I I believe everyone got their Foundry and uh dock uh installed uh next uh go to incredible squaring AVS on GitHub and copy um uh
and uh copy the link and let's uh clone it okay the squaring and and next uh we're going to compile all the uh compile and build all the smart contracts so let's do that meantime we can go over the other other
parts so next we'll be uh next we'll be deploying all uh all the required uh stuff and and running an anval chain with uh uh and get all the I layer and abs uh contracts deployed uh next we'll run um uh the aggregator and operator and once this whole thing is done we can we can go go through all the all the service managers uh task manager other contracts yeah e
awesome uh we have everything compiled now and we can we can go and R deploy all the stuff so right now we have a local chain running and we have got some transactions here and yeah uh open a new tab now and let's run the aggregator and operator uh so this this command
basically registers the operator on IG layer and and then deposits like about like th contract th000 tokens uh strategy and uh and and registers uh registers to the AVS registry and yes uh now you can see that uh the aggregator sends uh numbers and the operator sorry oh yeah sure uh I think this this is fine
uh yeah so as you can see um the agregator sends uh uh sends numbers to uh like post the numbers and uh then the operator squares it and uh sends it back and it's all happening on the Chain uh now during the whole process does anyone have any questions are oh yeah oh sorry oh logger okay aome
uh does anyone have any questions or like uh is has an Road blocker during of the whole thing yeah oh right now uh uh so wey uh so the question is uh what's happening right now yeah sure so um let me just get back to the graph
here uh so uh sorry uh so the question was what's happening right now um so basically the task generator is sending uh numbers uh so if you can see uh wait so here uh right now the task indor is aggregator so it sent a new task uh so number 15 to be squared and after that uh the a The Operators which have opted into this so are are receiving the task and they they're squaring the number and sending it uh sending it to the aggregator again uh here so if you can see here uh the aggregator received uh signed task
response so this is the response here and uh after that the threshold is reached uh and once threshold is reached it sends the data to uh onchain yep uh does it answer your question awesome uh do we have any other other questions I guess not so we can we can dive into the contracts now uh I'll just terminate this now uh is this
visible awesome um Let me let me just get back here yeah uh so there are uh three contacts uh one is the service manager uh which which uh which will eventually contain like slashing logic and and like on uh right right now it's just a placeholder um second is task manager which creates uh which contains task creation and response and then there is the registry contracts uh yeah let me get back to this uh so this uh service manager will
contain uh slashing logic later once we we have it um and now the task manager uh so here in like this uh this is where like the uh the task generator like the creates the creates the task so like in this case like it gives the number to be squared and the quum threshold and uh like also the B data uh and inside like it it creates the struct and uh creates the event of new task generated
and yes uh after that we have a respond to task so this is where uh the aggregator Aggregates everything and uh and like uh publishes the W the task response and yeah this is what the logic looks like um and like if they have any uh if there's any challenges so like in case the number is not really the square So like um if the number is two and like they they submit four and the aggregator agregates and publishes it like someone can challenge this and then uh they resolve it so this will be uh we'll have more data about this uh U more stuff on
this like once our slashing logic is uh slashing is live um um yes with this like uh does anyone have any questions for now uh sorry yeah this is starting Port is here uh new task uh sorry can you starting point yeah this is the this is the logic uh so this is where all the um uh so like if uh so this is where all the all the mean service logic exists so like like the squaring and everything is in this one this contract uh then the other slashing logic and uh slashing logic will be here
uh in the service manager yeah uh does anyone else have a question uh did uh was uh did uh was anyone able to like run the run the demo on their machines right now uh just just raise your hands if yes awesome um cool this is this is um this is what like right now it looks like this is actually a uh we have like more stuff coming on so we'll have reference architectures and more stuff uh on this uh like coming up like in the next two
months and uh we'll have payments payments and slashing coming up in the next 6 months uh yeah uh if you have uh and and if you want to like deep uh get get in uh get in this more uh get deep into this then you can go to docs. layer .xyz or bit. l/ uh this is where like all uh nater has created all the like dumped all the resources for like getting into I layer um if you have any questions you can also message me on telegram Twitter or uh like email me um yes uh right now there's a hackthon happening uh so
encode Club is organizing their own Community hackthon uh uh for I uh for like on for building on top of IG layer and yeah that's link uh b. y// Acton um yep uh does anyone have any questions right now okay I think uh that that's the W uh uh this is the app I may need to start uh open the yeah just a minute oh it's actually open um yeah you can you can scan this and get a p app right now it's it's a cute elephant and an
infinite symbol uh sorry oh wait uh yeah sorry it's it's starting in 3 minutes let let me actually open it wait y I think it would be uh good to go now
can try again awesome yes thanks for joining uh thanks for listening to the whole talk uh if
you have any questions feel free to send it to me and yeah thanks for having me [Applause]