Gearbox Workshop with Gearbox co founder by 0xmikko

ETHDubai 2024 · 20 Apr 2024 · 13:54

Gearbox co-founder 0xmikko leads a workshop on using leverage with Gearbox Protocol.

Speakers

Topics

From ETHDubai 2024, hosted by DeFi Dubai.

Transcript

and what we are talking today I have a talk related to continuous delivery because this topic is not really covered well and if you decide to launch your own protocol if you really want to real hardless and problems which you can face when you manage it it's uh really my personal experience and experience of all our team members which continuously build a pretty complex staff so basically why I'm talking today about the things the first part today luckily gearbox achieved 400 Millions T yeah it's great yes thank you for congratulations but still it's a

huge responsibility and uh gearbox itself based on many many integration so me personally know how painful the world defy composability and even if you believe that all tokens work the same and so on I have a fake some bad news for you it's not true we leas around 70 tokens and we really deploy we3 maybe in December of 2023 and then it looks like each week we add two or three tokens so it's a process and if you manage the five protocol you should have processes

of course all this stuff comes from the Dow through the voting and at this speech I want to talk how we can really make it in a safe way not to make a mistake which could cost a lot of money if you know there is one protocol when people make a small toot in their deploy script they change LC and then it was a liquidations up to 24 million Unfortunately they I we could not share our EXP experience but I can talk what we do to prevent such things and another part which is very very very interesting that gearbox itself is driven by Dow so all stuff done by people who are decentralized we manage the protocol

through the vings we openly for all stuff and I believe it's like a crypto wipe that we shouldn't have something hidden we have no additional Tooling in gearbox which help us to get more information than us Dow members do so basically it's a quiet way how we can do a brief explanation what gearbox is gearbox it's a leverage solution so basically you can get up to X20 leverage for really any coin you want so basically we work with different assets and now do you do you believe what is the most uh demanded tokens at the moment for average now it's USD it's your borrow

but what you are using for strategies yeah it's different RT taking tokens correct because it's a point Mania and another part related to aen so in gearbox it's a quite unique solution when you can in one click open a position like X10 in rest taking token or in aena token and get a lot of points and I've heard a really great numbers of people who do that and really become a rich so our our point is to add as many new protocols and Integrations as we can because people really like Leverage especially during the blue Market when everything is grow and a short recap related how it works so here you can see

our architecture gearbox is two side protocol and I will just highlight the things which is significant to understand the first part there are two side one is the passive lenders these people just provide money similar like you can deposit them in the bank currently it's around 50% apy in uh stable coins and around 25 for it which is pretty impressive and this part you just provide money and forget it all about a transaction sign it on execute just to really know what happens in gearbox multiseq is limited with 36 hours so it's a very very significant to have a time to make a Veta transaction if some malicious could get an access or

add some something or so on because we should keep hand on a pulse so what we do we also check all the contracts deployed and how it interact and basically the whole information which comes from different systems like protocol monitorings DNS Checker it's another system we continuously check the DNS records was not changed uh it was hacked in the curve protocol when someone could bribe the I forgot the company and change the DNS to point to malicious website now we have a robot which continuously checks the DNS if the change happens we also got notification we also use the aggrega XS to check and compare different prices because of

course if we can find some huge deviation on binance to prices we can get from Oracle it's also another thing we could understand that something goes wrong and of course some stuff related to standard grafana which also help us to understand that services are healthy and working and another part related to monitoring is how to make updates as I said and previously can we show this picture it's how we really start deploying so basically as you can see this fast growing was possible because we were able to really launch a few tokens per week it's a pretty pretty pretty hard process when each week you

should make the whole cycle from idea hey we want want to really add that token like Renzo e to make it possible and check that all systems in gearbox work properly and when this transaction will come to the main head they will work properly and nothing was breaken broken and here how we achieve that the first part Le let's talk a little bit about how the governance process works after snapshot voting the transaction comes to multi then it's going through 36 hours and then the protocol is updated for some thing some really emergency thing or things which could be updated a little bit faster which do not

have a huge impact to the protocol we have a special smart contract which is called controller time log it helps for example to update some risk parameters in value so basically Dao could make a permission to change liquidation threshold not more than 10 persons so sometimes uh controller time lock could make these changes and for good updates we use this schema at first part we have some hypothesis or ideas what we should add then we buil a script and then we use our own development which is called Cloud test Nets and Cloud test Nets it's a good way when we can really make a new

network and everybody could connect it to it to check all services after this update as I said we should check front end we should check Liquidators we should check different data analytic platforms like defil Lama and so on and be ensured that on the date of update everything will continue work as it designed and then of course it's going through the voting and time lock and protocol what I mentioned the first part I believe it's a very very crucial thing is to make logs in more human readable way when you work with thousand of addresses it's a pretty hard to understand what happens and what each transaction means so basically we have

like our own standard which definitely explain what's going on which contracts are deployed it's just a screenshot with which parameters are set and so on because to manage all this stuff when deployed sometimes it was like 100 transaction it's a pretty hard to understand which address related to the thing and another part what we already built each time when you make a push into GitHub repo we have a cloud test n platform and here you can see there are active Forks so each time when I make a commit or anyone else we have a special Fork which automatically starts on CI and then it deploys everything to make a

new end point and then people who can launch test launch liquidation test and test front and could use this end point and get the all information about new updated state so basically if you click on any part you can find a lot of information here this is the fork for G uh 170 and I think now it's under the voting and here you can see a lot of uh good stuff so basically you can find endpoint you can find different uh logs related how optimistic liquidation works you can find information how state was updated how all tests related to the current deployment works and so on and this system was built as a clown system

on AVS and what is really interesting for each Network we have our own copy of a is note because as I said when you work with multiple protocols currently it could be like up to 20 protocols connected each protocol has its own State tokens balance and so on like running Anvil using normal RPC could be very very long time process it could take up to an hour and it totally breaks the whole development so you should wait so long to solve this problem we have a a e note which automatically syn with currently state for example on mayet now

it stayed around 2 terab but it help us to make queries pretty well as you know R note itself could not really provide a pretty fast quering for events if you try to run your own or is not and run envelop on it you could not really get queries pretty fast to solve this problem we have a special uh our software uh software which is called unv manager which really reot all events square like get logs to normal Alchemy and at this case we can really achieve two things for State changes we can check our e not for all events we use RPC provider and it's create a very very fast thing so basically in comparison

with uh in comparison with normal RPC maybe it's 20 times faster than it exist then another part what is also significant all oracles which exist on your simulated network has a time when the prices become stale and to to solve this problem we have a special server which continuously take the Oracle transaction like chain link updates and so on from normal mayet and bring it to our test net so in our test net for a whole day we have updated all transactions which do not break the

system because of course in gearbox we control that the Pro price is not stale and it's a very significant here we continuously deliver transaction to our test net to make it possible for at least 24 hours to work with current market State and check all this liquidations and so on and of course we have some filter which do not allow from external part to make any changes using Anvil cheat cats and so on so basically it's what I really want to tell two big Parts the first one is a cloud test net software which could really helps to make any simulation at the moment I believe it's very crucial if you want to test any composable protocol because

composability it's a really Nightmare and painful things all time you should go deeper and find all cages and if now you can definitely check and simulate all possible cases related some emergency things like liquidations P events and so on on a test net it's a good stuff the next part is related that very very significant to have all mon touring and use them across all time especially when you deploy or update the system to get the fresh data that everything works correctly or not so it's what we use and it's how we were able to really update the protocol and add more tokens and protocols each week

to achieve this 400 million tvl so basically it's what I want to talk today if you have any questions please over you okay thank you guys for attention thanks for your time if you have any question you can ask me privately here I'm here on the conference