Quick Look at Morpho: A Borrow-and-Loan Pool Optimizer for Liquidity and Capital Efficiency

In the DeFi market, “peer-to-peer pools” are designed and used to provide viable solutions for protocols that are shackled by liquidity. Not long ago, the highly regarded NFT trading platform Sudoswap has also become a user and beneficiary of this model.

However, although DeFi is no longer trapped by liquidity, it still faces financial efficiency problems, which is almost another mountain on the way forward for the market.

For example, in the lending track, over-collateralization has reduced the efficiency of funds, and when the borrowing demand does not match, a large amount of funds in the “point-to-pool” are idle and underutilized.

Aave’s predecessor, ETHLend, once operated in a “peer-to-peer” mode, with relatively high capital utilization, but liquidity and liquidation problems could not be solved, and it eventually turned to “peer-to-peer pooling”.

Is there a lending agreement that balances liquidity and capital efficiency?

Paul Frabot, a 21-year-old junior at Paris Telecom and Polytechnic University, and VincentDanos, research director of CNRS, co-founded Morph O, sought to leverage the advantages of “peer-to-pool” and “peer-to-peer” to maximize financial efficiency.

The Morpho Labs team designed the agreement in just nine months, secured the support of more than 100 investors, and completed $1.35 million and $18 million in financing, including well-known VCs such as a16zVariety and Coinbase Ventures.

What is Morpho?

Morpho is essentially a lending pool optimizer built on lending protocols such as Compound/Aave (called “base protocols” in Morpho usage scenarios) to match credit and debit financial needs through a peer-to-peer pattern to improve the funding efficiency of lending pools.

This means that Morpho users can both gain the liquidity of lending protocols such as Compound/Aave and earn higher APY, or “P2P APY”, through peer-to-peer mode.

Specifically, users interact with Morpho-Compound in the same way as they do with Compound, following the same mortgage rates and liquidation lines. The only difference is that when the credit and debit requirements are successfully matched, both get a higher APY than provided by the underlying protocol, i.e., Compound.

Compound

(Morpho-compound market)

The Morpho team believes that while the peer-to-peer pool model provides liquidity, many lenders capture only the interest paid by a small number of borrowers who enter the lending pool. In other words, the debit APY is always much higher than the credit APY. Therefore, it is desirable to introduce a peer-to-peer model to improve the capital efficiency of existing lending agreements while maintaining liquidity and clearing mechanisms.

Compound

(Morpho current matching efficiency)

2. How does it work?

Let’s assume that Bob is the credit and Alice is the debit, for example:

Bob wants to provide 10 ETH and deposit assets into Morpho (1). The Morpho protocol stores (2) these ETHs into Compound and obtains cETH (3). Subsequently, Bob received the same APY as he deposited directly in Compound.

Compound

Immediately after, Alice entered the market, hoping to lend 10 ETH. For this, she mortgaged BAT. The deposit triggers Morpho’s matching engine, which matches her to Bob peer-to-peer. Morpho takes Bob’s cETH (5) and converts it to ETH (6) and provides it to Alice (7).

Compound

At this point, because the lender and the debit are peer-to-peer matched, the borrowing funds are 100% utilized, and Bob and Alice no longer rely on the Compound lending pool, so Bob does not have to share profits with other lenders, and the funds it deposits are fully utilized, and Alice does not have to pay more interest. Both get optimized P2P APY, with higher credit APY and lower Debit APY than Compound APY.

Compound

In the whole process, only if the needs of the borrower and the lender are successfully matched, the two will get a new APY. If it does not match, then the underlying protocol provides APY.

Third, the core mechanism

1.Fallback Mechanism

The fallback mechanism is designed to ensure that user funds are always available while benefiting from optimal capital efficiency.

In the process of using the Morpho protocol, if someone does not find any counterparty through the P2P mechanism, the agreement will fall back to the underlying protocol (Aave, Compound, etc.) Under this configuration, the underlying protocol lending pool is considered the “last lender/debit”: the user receives at least the same economic return as the direct use of the lending pool.

Continue with Alice as an example. If Alice acts as a lender, wants to deposit in Morpho. In addition to the situations discussed above (matching successfully optimized for APY, unsuccessful enjoyment of APY provided by the underlying protocol), she may also face partial matching. Once that happens, Alice will enjoy optimized APY on its matching capital, and the rest will still get APY consistent with the underlying protocol.

What if Alice wants to withdraw funds when matching P2P? First, Morpho will try to replace Alice’s P2P credit with other lenders waiting in the pool. If there are no other credits, a fallback mechanism is initiated.

Under the fallback mechanism, Morpho borrows the remaining liquidity to which the lender is entitled to obtain directly from the pool of funds of the underlying agreement using collateral from other market lenders. In this way, lenders can seamlessly withdraw all their assets.

Conversely, a rollback mechanism can also be triggered in the case of repayment: Morpho provides excess liquidity repaid by the repayer to the pool of funds under the underlying agreement.

For example. First, Alice offers 100 DAIs on Morpho. Subsequently, Bob provided 1 ETH as collateral and borrowed 100 DAIs. Morpho matches Alice and Bob.

Some time later, Alice wanted to get back her 100 DAIs, but Bob hadn’t paid them back. To return the 100 DAIs to Alice, the Morpho matching engine will first try to replace her with another lender waiting in the pool. If there is no other lender at this point, Morpho will use Bob’s ETH collateral to lend 100 DAIs directly from the pool and give them to Alice. Alice leaves the Morpho protocol, and Bob seamlessly reconnects to the pool.

2.Matching Engine

The module in the code that is responsible for selecting and matching user liquidity is called the matching engine. Since the market will not always have a peer-to-peer demand, there is a need to match the engine to improve lending efficiency.

Match engine core parameters:

Economic efficiency: maximized number of matches;

Gas efficiency: Minimize Gas;

Simplicity: Users can passively benefit from depositing/lending in Morpho;

Fairness: Benefit from Morpho liquidity as much as possible, regardless of user needs.

In the specific use process, Morpho adopts the concept of queuing, and the first credit to enter will be the first to complete the match. However, one counterparty may offer $0.10 for a million different accounts. In this configuration, if a borrower comes in, he will use a lot of Gas to match his liquidity with these small sums of money.

Therefore, Morpho’s matching engine uses on-chain priority queues. It sorts users by decreasing volume and pairs credits and debits using a limited for loop pattern. However, in the absence of protections, doing so can lead to high costs for Gas. That’s why the maximum gas is determined by governance, which is called maxGasForMatching. If the maximum is reached, the remaining unmatched liquidity will fall back into the underlying protocol lending pool, ensuring that the P2P matching remains economically reasonable while guaranteeing that users get at least the same APY as the underlying protocol lending pool.

3.P2P tracking mechanics (P2P tracking mechanism)

Morpho introduces two variables, onPool and inP2P, to track a user’s deposit balance (calculated in the cToken/aToken fashion) and borrowings (p2pToken).

Suppose 1ETH = 200cETH. Alice enters the agreement to provide Morpho with 1ETH, and her deposit balance becomes: onPool: 200cETH; inP2P:0 p2pETH;

Now Bob lends out 1 ETH. Suppose, at this point, 1 ETH = 200 p2pETH, Alice’s deposit balance becomes: onPool 0cETH; inP2P:200 p2pETH;

One year later, if P2P APY is still at 1.4%, the p2pETH price will be 1ETH = 98.6p2pETH.

4. Reckoning and oracles

1) Price oracle

The quote on the Morpho protocol is the same as the price in the underlying protocol lending pool. If the price of the lending pool changes, then the Morpho quote will also change at the same time.

2) Liquidation

Morpho has its own liquidator and can scan users’ books directly. Morpho maps the collateral ratios and clearing lines of all lending pools on the chain. Thus, assuming that Morpho has a liquidator in operation, the liquidation guarantee for the user is the same as the liquidation guarantee for the user of the lending pool.

5. Token Economics

The Morpho token is $MORPHO, with a maximum total supply of 1,000,000,000, and the currently deployed tokens are non-transferable, and whether they are more transferable in the later period will be determined by the community.

The MORPHO token has governance features that can be used to vote on decisions:

Deploy Morpho core smart contracts across multiple protocols and networks;

Organize the list of listed markets and other important parameters

Manage the DAO vault

On August 6 this year, Morpho opened the Age1 phase of the incentive mechanism, distributing 5 million MORPHO tokens in 33 days.

Compound

(Age1)

Currently, Morpho has entered the Age2 phase, and 1% of all MORPHO tokens will be issued through Morpho-Aave and Morpho-Compound.

Compound

At Age2-Epoch1, Morpho will distribute 3 million MORPHO tokens, of which the Compound-Aave market distribution is 90%-10%. The remaining 7 million tokens were distributed in Epoch2 and Epoch3 phases until December 29 this year.

Compound

(Age2)

6. Agreed income

Morpho does not currently generate any revenue, the protocol fee function in its smart contract has not yet been activated, and the future will be decided by community governance.

According to reports, the agreement fee includes a portion of the optimized P2P APY, which comes from the spread between the P2P APY and the poolSupplyRate lender or poolBorrowRate debit.

Agreement fees apply only to P2P matching, and if the user does not match the lending needs, the Morpho protocol will not charge any fees and the user will receive at least the same APY as if using the underlying protocol lending pool directly

7. Financing

Last October, Morpho announced the completion of its first round of funding led by Nascent and Semantic, raising $1.35 million in investments including AngelDAOCherry VenturesStake Capital, Atka Capital and Faculty Capital and 30 other institutions, as well as more than 20 angel investors.

Since then, the team has completed a $18 million financing in July this year, with investors including well-known VCs such as a16z and Variant, as well as 80 investors (including agreement advisors, founders, etc.).

Reference:

Morpho white paper

morpho medium

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/quick-look-at-morpho-a-borrow-and-loan-pool-optimizer-for-liquidity-and-capital-efficiency/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2022-10-01 10:17
Next 2022-10-01 10:21

Related articles