Morpho, the new gateway to decentralized lending

ETHCC 5 · July 2022 · 18:23

Paul Frambot introduces Morpho's combination of peer-to-peer matching and lending pools. The presentation examines how matching borrowers and lenders can use otherwise inactive liquidity more efficiently.

Speakers

Topics

From ETHCC 5, hosted by Ethereum France.

Transcript

Hello everyone. Thank you for for joining the the talk today. So I'm going to talk about Moro a landing protocol and I'll take you through the the journey that I personally went into DeFi. the reason why I went to to create moro and uh why it's important in the burm market conditions to consider this kind of protocols that I'm going to present in a second. So when I first came into DeFi, it was back in 2018 and 19 around that and at the time so I I don't know if some of you knew about Dharma or Isltoe protocols that basically you had

to post an offer and wait for someone to to take your offer, right? So like the classical traditional finance p peer-to-peer way uh but onchain and I don't know if some of you used it but it was quite a pain to use because what happened is that you were saying I'm lending at 2% this amount of liquidity and then you had to wait for someone but in 2019 like nobody was using the blockchain to lend and borrow crypto assets so you waited for nothing and so the good thing with those protocols was that all the liquidity that you lent was actually borrowed by someone else. But

the downside is nobody was there. So you were not getting any yields. So if we were to put this protocol Eland on on the graph, it was actually here. So you have a good capital efficiency, but it's not liquid. Okay. So, um, I kind of stopped DeFi after this for a while and went into like modeling of of of the the different protocols out there. And in 2020 when when compound like came out with its lending pool and and DeFi summer and everything uh it was really a breakthrough and I just wanted to take a step back on why it was a breakthrough at the time that because compound and then a really enabled liquid experience

of defi meaning that anyone could borrow at any time withdraw at any time and almost any amount right if you go to to a today you're able to borrow billions right and on compound as well and this is amazing because from a smart contract perspective you just click the button and you start earning yields or you just click the button and you get your liquidity and it was at the time a very needed property that we did not have yet it came at a cost and this is the cost of efficiency because we'll have the occasion to tackle that in a second but on those pools if you want to be able to withdraw or billions, you have to have billions of idle liquidity somewhere in those smart

contracts. So, if we were to to position the uh sorry, I think I got the wrong day. Okay, never mind. Uh so if you go to compound website for example, you'll notice that you have a huge spread between the lending side and the borrowing side. So if you try to lend money, you most likely get 1% APY while if you want to borrow money, you'll be more on the 3% APY range. And well, the reason for that is because on compound on a you have much more lenders than you

have borrowers. Okay? So you have huge pools of liquidity on which you have many suppliers sharing the revenues of few borrowers and for example if you have free lender for one borrower a borrower is going to pay for the freeze. So there was this is what creates the spreads in the in the compound protocol and the a protocol. So this difference so a compounds are nice because they're liquid but they're not nice in the sense that they're less efficient and they have this huge interest gap and mofo in all this is like a and compound. So it's a lending protocol it

works exactly the same way. So you supply and borrow crypto assets. You have like the same uh liquidity available. So on MOF which is live right now, you can borrow billions of liquidity. You have the same collateral factors, the same oracles. Everything is the same. You have the same functions. Uh the only difference is that we have additional efficiency and thus improved rates for both lenders and borrowers. So if you were to place morpho on the graph, it would look like moro is at le is capital efficient and is liquid at the same time. So the question is how do we do it? Well, actually that's quite simple.

So if you're a user of Moro and you want to lend liquidity, what's going to happen is you're going to provide for example ETH. So ETH is going to go to Moro and Moro is going to put it to the pool and then a borrower comes in and the borrower is going to supply some collateral and after providing the collateral well MO is is going to click the borrow button and and Moro is going to take the lender's liquidity that is in the pool to give it directly to the borrower. And what is important to understand at this point is that lenders and borrowers are not interacting with the pool directly now. They are inter interacting with each other. So they

don't have to share with the pool what their interest rates are. So let's take a graph that we all understand. The idea is that you start uh as a supplier. So let's say you're the very first supplier of Moro. You're here. You're going to be put on the pool by Moro. So you're going to have the interest rate of the pool which is the one here and then a borrower is going to come in. Okay. And as we said Moro is going to take the liquidity from compound and is going to match it with the borrower and there they are peer-to-peer. So they can have a rate which is independent from the rates of the pool. And here what's going to happen is that moro is going to put the

rate that is here in the middle and that is bo for both parties is going to be better. So it means that the lender is going to have more yield and the borrower is going to earn uh is going to pay less and at some point someone of the two parties want to leave right for example I was lending capital and I want to to get my capital back. So what's going to happen in that scenario is that Moro is going to uh disconnect the lender and the borrower and have the other party fall back to the underlying pool. So this is what's happening here. So MO is an academic and researchbased project that we've been

working on for more than a year and a half now. So we're publishing papers. The first of them is a white paper with like all the vision and everything in it. I suggest that if you're interested in learning more in like the mechanics of the protocol, you should just take a quick look. It's called like white paper morpho.xyz. It's quite an easy read uh to be honest. Um and now what I wanted to tackle is a specific property of moro that enables moro to scale with its underlying blockchain. But before that I think it would be probably interesting to make sure that everyone has understood the protocol. So if you guys have question maybe we can take some of them

now. So do you have questions or for the protocol specifically? Can we get this on? Yeah. Hi. Uh so you have to match uh when the you you make the peer-to-peer action from the b borrower and the lender you have to match the exact same amount. Yeah. Okay. So in moro you don't need to match the exact same amount. We're matching liquidity and not users. So it means that a user that let's say has 1 million can be matched with multiple users that have like 100k for example or whatever like whatever amount. So there is no need to find the exact match. Okay.

Since everybody that is matched peer-to-peer is at the same rate, it's kind of funible to some extent, right? It someone can be matched with someone or with someone else. It does not matter. So, as a lender, I can have one part of my money uh in peer-to-peer and the other part in a pool of Exactly. Yeah. And then the APY you're going to experience is actually the average of the two and it's going to be strictly better than what you have on the pool. So the main idea to understand is that you have one mor for each landing pool like you have more for compound for compound which is like uh we have more for a for a etc etc and if you're using compound then more for compound is basically going to be an improvement of

your yield because you preserve the same liquidity you preserve the same risk model because we we replicate the liquidation experience yet you're going to be matched peer-to-peer so you're going to have an improvement of your yield. It's kind of a capital efficiency boost. Okay. So, if the supply rate is always better on Morpho than compound, in an extreme example, all the lenders would go on Morpho. So, wouldn't you at some point run into this problem where if one of the loans on Morpho needs to disassemble, there's no fallback liquidity back on Compound because everybody went to Morpho. It's a it's a good question. So first what we claim is that morpho compound is going to be as

liquid as compound itself. Meaning that if compound is not liquid then we're not liquids as moro compound. Okay. Yet on lending protocols you usually have more lending than borrowing. So you will always have an excess of loans like of liquidity that is supplied that will end up in the pool. But you can have discrepancies between markets where you have markets that are dried up and in that case compound is illquid and we are too more questions.

Do you want to move? Great. Okay. So the other topic I wanted to tackle today is that so we've seen together that in the past we started with very traditional approaches meaning peer-to-peer like some of you may remember Oasis Dex that was basically the equivalent of Eastlands indexes and for lending you had Eastland and Dharma and we progressively moved to those pool models like unis swap like a compound etc and what I'm trying to say here is that we were constrained to do so because of blockchain limits, so gas inefficiencies, but also because of activity limits, right? You have low

activity in the blockchain. You don't have professional market makers on chain in 2018. So, you're not able to to build a book of orders at the period of time. And I wanted to to make an analogy that uh so we we built this pool protocols that turn out to be less efficient that what could a book be and to reflect on uh the gas consumption of those protocols. I I just showed here the size of a block and the space that it takes to execute an algorithm that is based on the pool or an algorithm that is peer-to-peer. So, for example, if you

take a peer-to-peer order book on chain, well, depending on the model, but most models will run into DDoS attacks or will run into out of gas issues or right guess uh out of gas limit exceptions, meaning that you're going to consume too much gas because you have to loop uh uh for all the orders of the book. So, you end up with problems obviously. And the very nice properties that we had with Pulse is that those protocols are very simple and they have a constant algorithm, a constant cost algorithm that is contained in a very small space of the block but again sacrificing efficiency. So one is costly but

efficient and the other is not costly but inefficient. And so the goal of Mofo is to introduce a new kind of design where D5 protocols in general can be hybrids where you start by doing peer-to-peer matches. You start by doing efficiency which is the part that is represented here. And whenever you need to stop because for example you're running into gas issues like gas is becoming too big then you can terminate the protocol with a pool call. So the uh a call to the the lending protocol that is based on the pool or to the deck that is based on the pool. So what we're trying to build here with Moro is a hybrid protocol that is

strictly better than uh the underlying protocol by using it and uh and making it uh more efficient. Okay. And another cool property that I think was cool to highlight in this talk was that with protocols that are built like this, you see that there is a variable part of peer-to-peer, right? The more peer-to-peer you do, the more costly, but the more efficient. And then if you think of multi-chain, it's very interesting because not all blockchains scale the same way. And if you have a blockchain like Ethereum that is very

constrained, well, you'll be thinking of an hybrid algorithm where you have a little part of it that is using peer-to-peer matching and you have a little bit of extra efficiency and then you go on the pool to to finish your your order. But on as blockchain keeps evolving, you could imagine that the parts of peer-to-peer matching uh that is done is bigger and bigger, thus enabling more and more capital efficiency. So what I'm trying to say here is that capital efficiency in DeFi comes at the cost of complexity and complexity is enabled with blockchain and performance blockchain. So what I'm seeing in the

future for DeFi is an increase of the complexity of the protocols that is going to be also enabled by the increase of the efficiency of the blockchain applications and having hybrid algorithms enable to scale progressively with the with the blockchain. Okay, one last thought is that um well recently we came into of course the this uh bare market where many protocols took uh risks that were probably deemed to be uh uh too high to such a point that it went bankrupt. And I wanted to highlight that we may be entering a new cycle for D5 where we should probably stop we should probably start to stop

forgetting um stop forgetting about the 20% API that we were looking at with you know uh artificial years and everything but maybe look more into very deep and complexity uh so that we can get a plus 1% yields but this one is hardly one and it's a pure capital efficiency optimization. So this is the goal of MOFU and what we're doing in lending but I'm sure many other protocols will pop up in other realm and and we'll use those hybrid mechanism. Thank you very much. Thank you questions.

Thank you Paul. Questions. Thank you for the presentation. Um, if we come back to this optimization for small uh people that have small amounts to to do peer-to-peer lending, I think with Moro you will favor it or take first a big amount so that you have only one transaction maybe to do than uh aggregating a lot of small liquidity. Yeah, that's a very good point. So in order to uh so this is about uh probably this part where we're doing pure matches. So in more you have a module called the matching engine

module where you have to decide who is going to be matched with who. Okay. And the goal of this matching engine is to optimize multiple parameters like the efficiency of the protocol but we have also in consideration the gas costs. And indeed, if you have many small users, then matching a one million guy with a bunch of $1 guy does not make sense because you'll have to do one million iteration in the matching engine. And this is just not going to work. So in moral what we're you implementing is a free heap. So it's a a data structure that has a sense of ordering uh in such a way that uh the uh the transaction have the lowest uh gas cost and start matching with deep liquidity first.

Great. Well, we can continue this discussion outside. This room is going to be taking a break now for about a half an hour. Thank you again, Paul, for your presentation. [Music] [Applause]