Scaling DEFI protocol: Gearbox v3 from deployment to 400M TVL

ETHDubai 2024 · April 2024 · 27:24

This session examines scaling Gearbox v3 from deployment to a reported $400 million in total value locked.

Speakers

Topics

From ETHDubai 2024, hosted by DeFi Dubai.

Transcript

yeah hello hello hope you're in a good mood I think it was a very productive to days so now if yesterday I was focused more on technical details related to things like how to make protocol robust how to update it and so on at this case I want to talk a pretty interesting topic from my side related to how to make the protocol scalable and at this point I believe many other protocols who really try to solve the task maybe sometimes fail maybe sometimes was successful but what I've learned from the previous three years was about how

to use a technical strategy so I'm not willing to talk about marketing how to do this and so on how to really support protocol growth from the technical side uh hello one more time my name is Mikel I really started from the hakon so it was like a true story gearbox was invented in 2021 January during s Global hakon so I have no good connection network and so on and today it achieved yesterday $400 million so it was a pretty good achievement here I believe so and what I've learned from these

three years making a lot of mistakes and all this stuff and how to really make this transformation I want to talk and initial idea of gearbox was uh pretty simple it was a margin trading on unisab because margin trading is always a pretty interesting idea but of course I started thinking okay I'm not willing to attract liquidity it's a lot of different job to do a whole exch chain can I really use Unis swap just for trading and so on and build something upon it and then gearbox become uh very very very uh flexible and now we can leverage literally everything any

protocol and token and just a short recap what gearbox is gearbox works as a uh decentralized Prime brokerage account so basically you can consider it like smart contract wallet when you have X1 more money but you couldn't do whatever you want with this money you couldn't visero into your pocket or do anything instead of that you can go across of different protocols get the leverage and really support your any strategy in the most natural way so there is nothing to learn how to combine two different protocols and so on it works similar like you do it in real life and a short

recoup how it works so basically you can see there are two side of the protocol on the passive side it works like a normal bank depositors so you can really provide your money on the left side and get healed and you should not really check Twitter all time and understand is it good or not because I am the worst Trader ever which assets I bought they also going down so I prefer to be on the passive side but at the same time I know that crypto generates a lot of money I am not willing to put my money in European Union bank to get one person API I want to get some share and this share of the yield should be in a fair

way so all these three years we focus to make a very good terms for LPS so when you deposit your capital on the left side it goes to the pool and that's all then you can take your uh LP token and really get a profits but but what is really unique in gearbox it's the right side and this is need as people who are really checking Twitter and know how to trade and make money so they could open a credit account it's a defi primitive which was invented three years ago and the logic here that when initial funds are transferred on this credit account it could take leverage from the pool for example nides could provide 10 East then it takes 90 E from the pool and it's get

10 X more money and then each transaction which sent by nides you can see it here goes through a special credit manager which checks all stuff and so on and then it executed on behalf of credit account on third party protocol so pretty easy it looks like you have 10x more money you send different transaction and then you can really deposit this into different Farms resten or for example you borrow usdc then you go to Unis swap swap it into East and you already uh have a long position and the good point that we never know what would be really successful in the next years because the

biggest problem with all defi or any kind of crypto Founders that currently you can have an idea wow it's good to build a margin trading then you start thinking you spend around from 3 to 12 months on development because Krypto to make it safe it's a pretty hard then of course you should pay for out it and it also takes around two months then you deliver it into production and it's too late and it's a huge problem what I've seen for the last three years deliver it to the market and go to the market it's a crucial stuff which you should support and definitely people as you know who start and wish to

restake and make a huge exis and a very successful project and the question what we start thinking in gearbox how we can build a system to deliver any kind of Leverage extremely fast and what we found so basically you can see in it's a very good date it was on the 20th of February we at leverage restak points at this date we really first add Reno East and uh e fire and so on and you can see how fast it start growing so basically what you should do it's by design by technical design make your architecture very very very generic in gearbox we

have a lot of complexity I told about yesterday it's related that we can support many protocols we should build some intermediat contract which is called adapter but the basic idea here through this complexity we can really leverage for reaking for farms and so on and each new protocol which comes to the market and have a very good at least provable price Oracle could be listed on gearbox when you can do it faster the first outcome and first Insight I got when you can do a different things pretty fast it's a good way to fast growing and when you develop your

architecture do not try to hardcode any conrete protocol I really met a lot of people who built something and they said hey we really want to leverage or do some operation with this Unis swap pool keep in mind maybe in a few months it will be outdated and if you couldn't switch to new idea it would be too late another part related to I think it was a really great Innovation related to the quarter system gearbox introduced it the first in the market and basically it's another part what we what we learned for 3 years some tokens has low liquidity some Protocols are not so mature to get leverage from Big protocols like AA and

so on how we can make a really system which could help us to make them also with leverage because it's also Rive ills all risk could be really transferred to there and we create a really pool Centric way when you can set up precisely limit of collateral so here you can for example for V we allowed to use not more than 20,000 eum as collateral we never compute these things in uh token you provide we always compare the pool and this quot system makes a pretty good way which I've never me before because now the pool has a

different limits not more than 10 person could be invested in asset a not more than 20 person and another would be use as collateral for asset B and so on and so on and then when you go to the pool you can combine some very risky active which could generate some yield with lowrisk things which could generate more stable outcomes and I think it's a good Innovation and another part which is pretty cool we create rates uh for any asset you you really could use for so basically here you can see if you go to V you will pay additional 25.87 person to the pool apy and it

create a great utilization so at my point many protocols try to say hey we have a high tvl it's not a metric because utilization is a real metric which we should focus when your protocol has a lower utilization it means that on this borrow side let me go oh sorry if you have a low utilization all all money which generated here will be distributed for many idle liquidity correct here so this part makes money this part gets the apy if your utilization is low it means that all this money for example it's 10 person will be distributed for all pool

participants and the end rate will be like 1/10 of borrow rate when you utilization like in a gearbox around 90 person it makes that all dollar earned here will be converted to 90 cents here and it's a totally different way how high apy could be achievable in the pool and if you go here to the quar system it's a very very good idea to have these quas which could set us not not by us by uh special gauges system different rates for different assets and create a really fair distribution between

LPS and people who build strategy because it's a market equilibrium if people today are willing to pay 25% in eum to get heal from a RIS taking protocol it's a fully Market way and we shared it carefully with LP and this rate do not depend on pool utilization like in many other protocol and as a result it's really help us to avoid that spiral when for example rate is going down people start to close their position on the right then the apy going lower on the left then people start to close their position and this Des spiral totally destroy the pool gearbox luckily with this quarter system I believe they

will be implemented soon in many other Protocols are pretty save for this Market fluctuations another part what I also want to tell how how to make your protocol scalable and it's a very very significant is smart contract ux primarily people who develop their products do it totally in two different ways the first part they start thinking about how to build a smart contract and then they start thinking how to build a front end and the problem that sometimes in a front end you should do multiple actions or what is much worse you ask people to go somewhere for example on Unis swap do this stuff in gearbox in 2022 we implemented a multi call and now

you can build a complex strategy in one click just imagine to do something at here all required approvals I will talk a little bit more but it's how you can also improve your protocol in terms of growing because one click makes a lot of sense to open a convex position in gearbox you should do and it's like the easiest way for example you borrow one e somewhere so you should go to Unis Swap and swap add one more transaction to get approval yeah it's as always then you should go to the curve if fits the good pass and swap 3,200 usdc into fra also add some transactions to approval then

you should go to the curve and call add liquidity to get this LP token then you should go to the convex and then of course you can in the something in the middle really lose some money because prices are going up and down and if you ask your user to do some much complexity to get something you really have a very very low conversation we built multic call which could execute this in one transaction do all needed approvals and for safety we remove all of them so after that in all these protocols we will set zero allowance as a result people will really very very grateful

that they could open any transaction in one click if you build your own protocol do it on Smart contract level do not really give this to the front end because on front end the majority of this stuff could not be done because only user has an access and take all stuff another part what I've learned that approvals and permits it's an also huge barrier all time when I personal personally go to defy and want to do something it's an all really pay when you should go approve some tokens like usdt requires to make a zero allowance if you want to raise it so it's a very very bad ux if you can build something which do it automatically in your

protocol you can grow much faster because you really each time you ask user to wait like a few minutes when transaction will be submitted on chain it takes so much efforts and people are really prefer to switch somewhere crypto it's an economic attention so keep this attention and focus on value not on this continuous operation and uh today I want to talk some more ideas what we can build more to make protocols even better so in gearbox as I said we buil multicol to create a seamless ux on the smart contract level we make it modular to really get stuff related to uh add new

assets and really create the market what you user wants but what we can improve I have some ideas in mind and probably some of them will be implemented in the next version of gearbox the first part I'm really happy that a few weeks or months ago this EAP for 4844 really happened it's a huge Improvement for the whole zerum ecosystem just imagine when you built your protocol previously we do all these tricks for gas savings all lines of Court were written you take different tricks how to compute in more efficient way and so on currently gas prices are really nothing on rollups just check

it's even not 1 cent on arbitrum one to swap tokens now I think the new eror of developers are coming it's my prediction but definitely we should not focus so much on a guas the same things one was in web 2 when the web web servers come came to the scene and people also because it was a very low machines tried to optimize their code in C language and so on and then of course when we have a like zero gas cost I believe definitely the complexity of all protocols will grow because now you shouldn't focus on this lowlevel development you can do much more and pretty soon maybe in a few

years we will get solidity Frameworks in analogy like we have a web two Frameworks if you know Express Express in not JS or a python framework which definitely improve the system and the way how fast we can deliver and following this I believe this complexity will be encapsulated in some Frameworks contract size will be included and we could deliver faster and much safer because now we should not really think should we add this check or not for security another great part was AP 3074 it was not so far away and the account abstraction and it creates a new opportunity to gearbox will be much

closer to the user keep in mind now you should go to gearbox if you want any strategy click something and do anything I definitely want to remove this intermediary change why should user to go to gearbox website for operation if it could work like a credit card credit account is already thing which is developed as smart contract wallet it's what we have at the moment why we could not really connect it on the wallet size as a back end and allow you to open your metamask frame rainbow wallet which support credit wallet

abstraction and has just x0 more money at the you will be so natural like credit card because nobody cares how it works you just go to the shop use credit card and it's done and it's a future when we really create a amazing composability because people now are not focusing how to really Co jump across different protocols to build your strategy we can be easily integrated on the wallet side and make a natural stuff and another big stuff if we can really achieve that if we can really buil a wallet with x 10 times more like a credit card the next part what we need is to be more decentralized and here I

believe it's my also prediction and it's also common that we will have get a totally new companies or protocols who can like chain link stream their risk parameters it's also happened with B protocol it also comes from gaunlet and cow slab some of this ideas and it's pretty cool if there if there are some people who knows or at least predict and do some risk job and it could be really streamed like a chain Ling stream prices on chain it's verifiable I can check historical predictions and understand who really makes this risk prediction and settings for the protocol much

better it could really be qualified and maybe some extra payment I have no clear idea how this business could work but it's what we will come and then you on LP site could really choose this risk provider as you want and deposit your money and there what I believe could be like an endgame for gearbox what we are going for is to become a liquidity layer just imagine to simplify user interaction with the protocol we definitely distinguish two parts the first part of gear box could be simply integrated in the wallet level and work across m multiple chains so basically you should not go to any website gearbox

or any other leverage things could be implemented in your wallet and just provide money wherever you need it could be done on RFQ like intents it could be done with additional action but you should not really check all this front end and so on and another part which delivers this Capital to liquidity layer like institutionalsales because if we can really have in an industry pretty robust risk provider who can make all this good risk prediction there is no way to trust the protocol if you're institutional you can trust the risk provider to person who carry about risk and here you should really have a

battle tested solution and that's all and it's what I believe we could build a system when people who pretty similar maybe how current bank system works you can open a deposit in a bank and here you can provide your LP you can set up your risk profile or for example you can say hey I am not willing to provide my liquidity on arbitro or optimism or this rollup but it's okay for me to deliver this liquidity to be used on mayet and this roll up and this roll up and that's all you choose your risk profile your liquidity is provided to this liquidity layer which exist cross chain and then people who is going to this chain they just open their wallet get credit

account and do each strategy what they want so what I believe and what we should really focus is on the solution which really improve the ux for the end users and this solution looks a pretty simple because risk providers do not ask you to go deeper in such a pretty complex white paper and so on it's onchain verifiable so reputation could come somehow cross-chain contracts will be battle tested and audited which also make a much simpler for LP to choose whatever you want and on user side who use leverage these things when the Leverage is accessible through the

Wallet create lower barrier which also create a better interaction but of course it's a such idea we need to do a lot of things ahead not only on a gearbox protocol of course the whole industry should grow to this level when we can definitely improve user interaction basically it's what idea about the future how it should be for end users and so on I want to share please if you have any questions I'm ready to discuss thank you so much for attention thank you very much so do we have any questions right back here we got a few hi great talk um you mentioned some

something about automatic approvals and permit um how exactly did you manage to make it automatic I think Landing pools uh can you return the picture please yeah thank you so much so basically Landing pools what I said here should be really changed into two parts the first part is liquidity layer and basically of course at this wallet it's not only one idea that you can leverage to get something of course you can also get the solution from your wallet because currently it's a pretty strange that you should go to the protocol year to any website to get it if you can do it in your wallet and

currently if you have any normal digital Banks you can do a lot of stuff in the application which represents wallet so taking onchain credit or leverage from the wallet layer I think it's the most natural way so B basically I believe as lending protocol will also follow this uh narrative and also be closer to end users over here hello uh thank you for the presentation so well uh my question is about uh the liquidation so do you have an open sourced Liquidators for example

can I join your uh liquidation program or do you run all the liquidations by yourself yeah thanks it's a it's a good question and uh basically to talk how it works I can go oh yeah this part we have liquidations of course if you consider here this credit account is works as smart contract wallet and it means that all tokens on this credit account are considered as coatal so basically if Health factor which is simply ratio between the value of collateral downgraded byts to your total depth with

interest L uh rate less than one such account could be liquidated and in this part it looks that simply a risky asset will be swapped back to underline one and the debt will be paid it's already how gearbox works and of course this part should be also improved from ux side from my point it's very very bad things for end user when it was liquidated so basically we really now working on The Leverage BS and other solution to help user to avoid any kind of liquidations but if it could happens it should happens to really protect LP

side so basically at this case I think the improvements for scaling what I'm talking today how to attract more users would be focused on two sides the first one make all tooling like limit orders and so on to avoid possible liquidations but if liquidation is needed to protect LPS it should happen and in this case it could be really pretty high things like in it's totally normal like in maker yeah I think di liquidation takes 13 person which extremely high but maker is stable so basically we should protect LP on the first place any other questions or did you want to keep

going anyone else going once all right thank you very much uh thank you for your attention have a good stay in Dubai