Short primer on oracle types:
• NAV/exchange rate - liquidations happen when the asset you loop loses a part of its backing
• market rate - liquidations happen based on the live price on DEXs/CEXs of the asset you loop
• linear discount oracle (for Pendle PTs) - liquidations usually happen only if the PT asset you're looping loses a part of its backing or the borrow rates are so high that they push your health ratio under 1.0. The PT price action can't lead to your position being liquidated.
In general, liquidations in markets with linear discount oracles are pretty unlikely unless you max leverage.
• TWAP oracle (also used mainly for Pendle PTs) - liquidations happen based on the 15-minute or 30-minute time-weighted average price of the PT asset you loop
As we've seen with PT-reUSD, TWAP oracles can be manipulated to liquidate loopers by an experienced attacker, so they are not ideal for borrowers.
• hardcoded oracle - a hardcoded oracle basically fixes the price of an asset to a manually configured price. They are great for borrowers (as they can't be liquidated), but terrible for lenders as lenders will get wrecked in case that a depeg happens
There are also other hybrid oracle designs, but these are the main oracle types you should know about.
I think it's crucial for anyone looping/lending on Morpho or Euler to understand well how the oracle of the market they're using works.
Because otherwise, you may wake up liquidated/losing money without understanding why.
Stephen made a good tutorial explaining how to check the oracle type on Morpho:
Perpetual futures are uniquely suited to creating new tradeable assets: by innovating on oracles and funding rate mechanics, almost any asset class can be reconstructed.
We’re using them to create the most efficient and liquid markets on the world’s most important assets, whether they be start-ups, compute, 24/7 public companies, or global indices.
Come see our first results, not in an academic journal, but on a live exchange.