DAPPCON 2024: Aggregated Lending Markets: Going Beyond Modular Vs. Monolithic - Paul Frambot

DappCon 2024 · May 2024 · 19:51

Paul Frambot examines aggregated lending markets in DeFi at DappCon 2024, moving past the modular-versus-monolithic framing that has dominated discussion of lending protocol design. The talk considers how aggregation across lending markets can offer a third path for DeFi lending infrastructure.

Speakers

Topics

From DappCon 2024, hosted by Dappcon Berlin.

Transcript

so today I'm going to talk about uh the Morpher approach more specifically and uh how we um explore the trade-off between monolithic and and modular and the solution we thought of uh World building Morpho blue and and the vision behind it so maybe very quickly about Moro uh for those who don't know about it so we are landing and baring protocol uh we started two years ago with an optimization layer built on top of avin compound uh and then you know we we were like for probably one of the biggest users there of of aen compound and uh we decided to build our own uh landing and baring protocol uh because of you know we were missing some some features or

some some resilience that we were expecting as as builders on top of Ling and barring protocols and so um we ended up building what we call now morphol blue uh which is a uh completely immutable and and permissionless protocol lending primitive you can think of it more as you know uniso for for Lending um and you know this talk is going to be about um the monolithic versus modular approach uh in lending so there is like especially recently a lot of debates around how do you design like a landing and barring protocol uh should you make it you know a monolith or or multiple pieces that sort of compose with with one another

and and the first approach is the uh the monolith uh approach so essentially that's the uh you know I and compound model so first introduced by compound and then you know iated on it uh a lot and and improved it uh up to like the V4 version that was introduced very recently and really what's what's great about this approach is that it gives you a very nice uh Financial like product right it's super easy to use you have like very deep liquidity because you know all assets are put together in a single pool of liquidity I think uh you know you have protocols like like inab that callit the unified liquidity layer I think a V4 has a similar similar term and by treating like all all assets in

like this common partt you have like deep liquidity so you know large borrowers can come in at any time and borrow large amounts of money uh you know large lenders they can withdraw at any time large amounts of money uh and also it gives like great stability uh in in interest rates as well and so it's really about you know having this full stack experience where you put like all the features and all the management and you you know sort of like hide this away from the user and so the the the drawbacks of this approach is that it's really like a one-size fital approach right like you you all when you deposit some usdc on a given instance like you get exposure to all the different you know collateral backing at the same time and um often times because you have a lot of like

features and you have to to have the logic of the code that you know put all those assets together it means a lot of lines of code and you know upgradable patterns are needed and that often turns into like incidents because you know due to upgrades or just because the code is extremely large and insanely complex like I do encourage people to look into like the number of like incidents and you know reports that you have on immuni on Landing protocols like whether at the the pool level or at you know protocols built on top of lending pools because you know lending pools upgrade they're changing specific lines of code that could impact you know Integrations that are built on top right um and the last thing is is really the fact that those instances and and this is what we

discussed during the panel are are governed right so they're governed by token ERS uh so we mentioned the upgradability pattern but also the risk management part and and really the idea is that token orders are going to decide on hundreds like literally hundreds of risk parameters that are you know fairly complex to understand to be frank like you know you have for example what's the Oracle pricing a given Market or what's you know the collateralization ratio that you allow on a specific asset up to what cap uh each for you know those parameters for each asset uh you know you have maybe 10 20 different Assets in each pool then you have multiple pools on different chains so that's a lot of parameters they're all interdependent

with one another with the market conditions and with the parameters of other lending protocols and we're assuming that toen orders are both knowledable and active enough in order to make those decisions and in practice of course you know they're not right like you know anyone can buy a talken you don't have a PhD in Risk Management right like and you don't have to be superactive so obviously you're going to delegate this responsibility to a consultant right to a risk manager that's going to you know essentially do the the the hard work for you right uh but the problem with this approach that is then it's some kind of you know exclusive contract behind you know the the the funds of like the The Lending and and the risk manager that

essentially gets paid you know as a consultant uh in order to perform those risk management right and also there is low incentive for open sourcing like when you have like some risk management uh tooling that you're operating as a as a consultant well if you open source your models and if you open source the code you use to set those risk parameters in a or or in compound well you know then you have much you very little pricing power when it comes to negotiating terms for your contracts right so you have really intenses in making this happen so the tldr is like right now most of the computation in landing pools of risk parameters are often times completely close Source right and decided by by token orders even though and greenlighted by token orders but uh but

but close Source right and so it's very clear that you know there is a a better you know a need for uh in the space for like more robustness and and more flexibility at the same time in the things we we want to do we could argue also you know more efficiency but really the two main things are like you know security and and and flexibility and so modularity emerge as a as a solution to this tradeoff right as as as a solution to this uh to those problems so the idea of like modular Platforms in general is that you can you know create your own uh Landing platform and configure it the way you want with you know anyone can become manager and and and essentially you know provide a unique risk profiles to to users you

know given their their appetite right and that's really interesting because essentially the idea is that you you know you can essentially fit the risk profile of pretty much anybody right like you you can you know create a landing pool you know a fork of a for example or compound that is specifically designed to Ure a specific use case right and this is what maker did with spark for example like they had some specific needs and so decided to Fork the av3 implementation in order to be able to to answer those needs right um and even though that's a great approach it has some you know downside as well like as soon as you start creating two different you know instances you fragment liquidity right and even though you can sort of like mitigate that

through composability you know like for example if you take compound I have a spark they have a lot of like you know collateral in common and they have a lot of collateral in common but they don't share liquidity with one another right and each instance is going to fragment liquidity even further right the second thing is that you have uh a lot of you know different different you know it's it's harder as a user to make your choice right when there is just you know a then okay it's fine you you trust a you just deposit in a if you have you know multiple options and we were discussing this during the panel well you have to make your own you know you know decision which you know complexifies the the the user experience and the last thing is that you know

modular Platforms in themselves are frankly you know just a code libr at the end of the day right it's just like you have a piece of code and anyone can deploy it right and build their own Landing protocol the same way you know people used to Fork uh the I V3 or the compound V2 compound you know not compound V3 but compound V2 instance um the code in itself you know does not create value what creates value is as we were discussing the state and the management of it right so you know the new use case that we create by forking the compound you know in or the a instance will will generate value because you know there is some liquidity so we match lenders with bars uh but also because we do proper uh

risk management right so in one case we have uh the mono approach which you know has the nice you know aggregation of all the liquidity and I think you know if you haven't looked into it the av4 for poost explain how they're you know essentially taking this even further and aggregating liquidity like you know not other like modular approach would uh today um and the uh modular approach you know does not uh so sorry they're they aggregate liquidity but they're quite restrictive in what they can enable and on the other hand you have modular uh platforms that are that are you know very flexible they let you create what you want uh but then they fragment the state they fragment

the liquidity uh Etc and this is where the concept of aggregation comes in um and it's it's I think it was a term that was first used in the context of polygon uh blockchain stack where essentially uh you have the same you know in the infrastructure side the same trade-offs between monolitic and modular and they came up with the the the term aggregation which is essentially is visualized this way which is you have multiple instances you know in some kind of you know modular Paradigm but they share liquidity uh to some extent right and so the idea is that this ation at at the liquidity level like the the goal is really to be

able to you know have the flexibility of modularity while preserving like the the a common state to certain extent right so how how do we build such thing right what what does it mean you know in practice to have like aggregation and shared liquidity Etc well what you need in the first place is a flexible primitive like core markets that are minimal enough and an opinionated enough in such a way that you they can be shared by multiple people multiple you know builders on top that want to express different risk profiles right uh and then on top of that you have modular layers so the the core primitive in itself is not modular

it's it's it's uh you know it's flexible in such a way that you have multiple users coming to it and but it's uh the modularity comes on top where you can you know essentially rebuild and subract away all the complexity of having a primitive so like the ux the reaggregation of liquidity the risk management etc etc and the idea is that they are completely optional you don't have to inherit from the entire code base for example of uh using you know a very large protocol that does at the same time ux risk management you know account abstraction Etc you just you know um take the risk of what you're essentially you know taking like if you want if you want account abstraction then you you take the risk of like the tag behind it but if you don't want it

you don't have to subscribe to it right and so this is essentially with this philosophy that we built like Moro blue which is we want something that's sufficiently primitive such that it can be recomposed into multiple modular instances that will share eventually those mini like you know uh Lego bricks uh Elemental Lego bricks right so one one market on Mor BL is really one collateral asset One loan asset one liquidation loan to value and one Oracle it's as simple as this uh and it's immutable forever right and it's it's it's h it's you know some people like to qualify Mor for as modular but like I disagree that the Primitive in itself is isn't modular on

purpose it's actually very primitive and and in such a way that uh it's it's generated in such a way that multiple you know users will be able to reaggregate uh on top so that's more for blue the downside with this approach is obviously that you know as we were describing earlier uh as a lender you have to do your own risk management right you have to decide okay should I be lending to so I have some usdc should I be lending it to the pool backed by SES should I be lending it to the pool backed by wbtc with what Oracle up to what you know like loan to value all these kind of things right and so this is why we have a second layer which is the risk management layer uh that we

like to call uh where essentially you know you have risk experts uh that can you know build their own risk manage Vault and provide this passive experience to user so if you have usdc well you can go into the block analytica and row Vault or you can go into the gaunlet vault gaunlet which by the way was initially a consult on for a and transition to this new model of like you know providing service to users directly and and so you go to their vault you provide liquidity and they're going to you know do the risk management on on your behalf essentially and this way you have multiple VTS you know expressing different risk profiles some of them will expose you to real world assets to you know Blue Chips like SE wbtc Etc uh and and the idea is that those

different vots well they can share some markets right they have some markets in common so for example in in the in the chart here you have Market two which for example could be like you know wst is to borrow usdc right if two volt of usdc list this Market they would share liquidity so to recap if you have compound and a they both list s they don't share liquidity if you have two metamorph volts replicating similar risk profiles as a and compound they will share liquidity to the extent that they share risk anyway so that's a quick recap of like the approach that you have on one side and on the other side uh where essentially the Recaps that we break into two pieces the the risk management

and the you know liquidity and interest accounting part such that the risk management is modularized and you know anyone can plug into those you know Elemental bricks that share liquidity and aggregate liquidity okay so this is what the the stack looks like in in practice uh you have different risk profiles you know you know with some some you know for example St ASV has a bunch of like real world assets some people don't want exposure to this the block analytica Vol is extremely blue chap around you know assets like s wbtc SD Etc uh re7 is more oriented around lrts and you know sometimes all of those markets they do share some markets you know for example

the WSC SS markets is shared by you know a bunch of those different risk creators and so they will share liquidity to the extent that they they share risk and so you know at scale this is sort of like you know what the the stack looks like I just presented metamorpho but there are many layers of obstruction that you can rebuild that either reaggregate liquidity that Arbitrage rates uh reaggregate liquidity for lenders but also for for for borrowers to get like a very similar experience to what you have on a A or or or a compound and again as a user you don't have to subscribe to all of this you only subscribe and you only pay for what you need essentially and obviously the advantages of that is that we have like a very you know immutable and robust core which is

frankly something we as builders on top of a compound for the last two years we wish we had you know integrated and finally the the the obvious upside of all this is that you know Network effects compound right like the the more Builders we have around the Stag the more liquidity and the more you know efficiency you get into the this free market model essentially and so the more liquid and more efficient everything becomes so yeah that's it um I don't know if you have any questions all right so uh okay we have the first question right

here microphone hello um the metamorpho uh number of where you've offloaded risk manager or it's out well Out Source or however you want to describe it extrapolated away and as you mentioned some of the people doing risk management now for you are former maybe even current I don't know uh working with AA so there there's obviously uh overlap there and expertise but I'm curious is the risk there that over time we're going to see consolidation at that layer so now where you have lots of different people doing different things and it's you can choose but the reality just might be that in three years five years I don't know Gauntlet or Steakhouse and they're

they're doing 90% of the risk management and you're kind of back where we are if you will today with one large entity kind of controlling your risk management right so I think that's a great question so the first thing is I would say is that it's very unlikely that the risk profiles of the entire humans you know human beings you know all comes back to one risk profile right so it's pretty much sure that we you know as humans we have different you know risk appetites and that we want to expose ourselves to different risk right then we could make the point that you know maybe I don't know like row or block analytica are going to spin off you know five different volts and each volt is going to c a specific risk profile but in practice you you know some of those

votes require like a bunch of expertise on specific assets like if you take real world assets for example like St has has like you know a deep expertise on those things right R7 is more deep into lrts and you know those kind of things so I think right now we're biased in the sense that you know defi is merely a couple you know m hundred billion dollars but the you know the over catalized lending Market in trfi is a trillion dollars of volume daily and they all have very different R profiles right So eventually you could imagine a world where you can extend this to eventually you know credit and writing as well right like where essentially metamorph can do algorithmic risk management but also uh you know essentially become credit funds right and and so our take is that yes in the

current state of of D5 which is frankly quite small um it is possible to filiz everything into one Mega pool right uh that we all trust and that will cover you know 50% of the market which is approximately what has right now uh but as def scales you know I'm having a hard time believing that all humans are going to be treated equally in one p and also the second thing is that it's a free market right so it's completely permission it's completely open so you know if one player starts to become you know very big then you can challenge you know this player either by lowering the fees or by going for like more risky things or like innovative ways I think open source has been like a great

differentiator among like it's been very interesting frankly to see like all the different risk creators uh competing with one another one of the differentiator of course is the fee but the other one is open source right like you know how do you open source you know the your LTV formula or this kind of things anyway I hope it answers the question all right thank you so yeah please thank our speaker