Morpho: Liquidation and Oracle-Agnostic pricing

DeFi DevDeFi Dev
3 min read

Last time we learned a lot about the Morpho product from their documentation, in a nutshell:

  • Morpho is a lending protocol that puts the emphasis in permissionless and effective lending: minimum governance constraints, anyone can deploy their own isolated lending market, and with additional layers like Morpho Vaults, capital is rotated to where it is most needed and accrues more yield.

Let’s keep learning from the Morpho docs and dive deeper into the next 2 topics: Liquidation and the Oracle-Agnostic model.

Liquidation

First, we have two concepts that we need to understand:

  • Loan-To-Value (LTV)

  • Liquidation Loan-To-Value (LLTV)

Loan-To-Value

LTV is a metric used in tradfi to determine the risk involved in a loan. Here in DeFi, it represents the value of the loaned amount relative to the value of the collateral. For example, if a user deposits $10,000 worth of ETH as collateral and the lending platform allows an LTV of 50%, they can borrow up to $5,000 in stablecoins or another asset.

To calculate the LTV of a position in Morpho, we use a simple formula:

LTV = (BORROWED_AMOUNT ORACLE_PRICE) / (COLLATERAL_AMOUNT) (ORACLE_PRICE_SCALE)

where ORACLE_PRICE_SCALE = 1e36.

Liquidation Loan-To-Value

If LTV is a metric to determine how much the amount to borrow is worth, relative to the collateral, LLTV is a metric that determines how much an entity can borrow before being liquidated. In other words, LLTV is a risk parameter that defines at what LTV ratio (Loan-To-Value) a loan becomes undercollateralized and subject to liquidation. The formula is very simple: LLTV = LOAN_AMOUNT / COLLATERAL_VALUE.

Example: Let’s say a market in Morpho sets an 85% LLTV liquidation threshold. Alice deposits $1,000 worth of ETH and borrows $800 worth of USDC. Her initial LLTV is 80% which is relatively safe, but if the price of ETH falls and her LTV reaches 85%, liquidation occurs.

How Liquidations work in Morpho

Liquidations are simple: a liquidator can liquidate up to 100% of the amount owed and received the corresponding collateral value, plus the relative incentive.

No fee is taken by the Morpho protocol at this level. The entire Liquidation Incentive Factor (LIF) goes to the liquidator. I will not try to disect the formula to calculate the LIF at this point, but if you’re curious you can check the Morpho docs.

To continue with their example, if a borrower provided $1000 of collateral in a market that has a LLTV of 80%, and their debt reaches just above $800, the position is liquidatable.

In this case the formula would be: SEIZABLE_ASSETS = DEBT_AMOUNT LIF = 800 1.06 = 848.

The liquidator would seize up to $848 of collateral and the borrower would keep $152 of the collateral they provided initially.

TLDR for LIF: The lower the LLTV, the higher the LIF. The more difficult it is to get liquidated, the higher percentage the liquidator can take.

Oracle-Agnostic Pricing

Finally, let’s look at how Morpho approaches oracles. First, a lending protocol obviously needs to know the price of the assets lended and collateralized. Oracles are the primary method for querying such prices.

Determining a price without using oracles requires a lending protocol to have internal trading markets, which makes the whole system less gas efficient, more complex and prone to new attack vectors.

Morpho uses an oracle-agnostic rather than oracle-less approach. The protocol has no oracle or trading mechanism built into it. When you create a market you are responsible for providing an address for a working oracle be it from Chainlink, Pyth, Uniswap or whichever.

Morpho mentions markets may also have prices hardcoded or use a mechanism like the one Ajna uses, we will explore that later.

Conclusion

With that, we’ve covered two very important pieces of the Morpho architecture: Liquidations and Oracles. In the following articles we will keep exploring more of their architecture to become through lending experts. Let’s keep building 🚀.

0
Subscribe to my newsletter

Read articles from DeFi Dev directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

DeFi Dev
DeFi Dev