
A few months ago, we were reading the explainer of the PT-reUSD-10DEC2026 / USDC Morpho market manipulation on Ethereum. The attacker manipulated the relevant Pendle market, affected the OjoPTFeed, triggered liquidations and made roughly $1m in profit in minutes.
We wanted to understand two things.
First: how did this oracle work, and what made the manipulation possible?
Second: looking only at the oracle contracts and the state of the Morpho market, could we tell whether manipulating it was economically interesting before it happened?
That became the original idea behind Under The Hood: a tool that would answer those questions by analysing both borrower positions and oracle design.
There is no single number that can tell you whether an oracle is “safe”, whether a market is vulnerable, or whether a manipulation is worth attempting. Any such score would require a growing stack of assumptions about the oracle, size of the underlying market, execution costs, borrower positions and their HF.
We did not want to hide those assumptions inside an opaque risk score. Instead, Under The Hood collects the information we found most useful for doing that analysis yourself, and separates it into two sides:
- oracle decomposition - how the market price is constructed and how it can change;
- liquidation risk - how borrower positions react to different price moves. An oracle can be manipulatable while the market behind it offers little economic opportunity. A small price deviation can also matter a lot if enough debt sits close to liquidation - which was the case with PT-reUSD.
That is the high-level idea of the tool: understand the price, then understand what is exposed to it.
What you can see Under The Hood
Every Morpho Blue market is defined by a short set of immutable parameters: collateral token, loan token, LLTV, IRM and an oracle.
Under The Hood starts from a Morpho market and looks at it from two sides.
On the oracle side, it reconstructs where the price comes from, which contracts contribute to it, and what logic connects them.
On the market side, it looks at borrower positions and aggregates them into a cummulative liquidation risk chart: how much debt becomes liquidatable at different oracle-price moves.
Why oracle analysis gets complicated quickly
One basic question when assessing a Morpho market is: how does this market determine how much of debt token X a unit of collateral Y is worth?
Sometimes the answer is straightforward: a plain BTC/USD Chainlink feed doesn’t require much decomposition and analysis. But many (if not most) Morpho markets are not priced that way. Their oracles are composite: a top-level contract can source values from several feeds, exchange rates, adapters or pricing models, then apply arithmetic or conditional logic on top.
Even stablecoin pricing differs: one market can effectively assume 1 USDC = 1 USD (cbBTC / USDC on Base is one example) while another explicitly includes a USDC/USD feed.
The same applies to USDT, wrapped tokens and other assets. Two markets using the same token can therefore react differently to the same depeg or price shock because their oracle designers made different assumptions. PTs, vault shares, staking assets and NAV-based tokens add more layers: exchange rates, maturity logic, discounts, caps, fallback feeds and other transformations.
While building Under The Hood, we kept finding these differences in places where they were not obvious from the market or the asset name. So we figured that the first and most important job of the tool is to reconstruct the oracle into something readable.
Price Explanation and Oracle Structure
The oracle side of Under The Hood has two representations of the same pricing path.
Price Explanation reduces the oracle into the calculation producing the current price: values, conversions, feeds and parameters. Instead of seeing one final number, you can see that the price comes from an exchange rate multiplied by one feed and divided by another, or that one component is fixed, capped, discounted or adjusted before entering the final result.

Oracle Structure shows the contract graph behind that calculation. If the price requires eight contracts, the graph contains all eight.

These two views add a lot more data to the current oracle price as the basic state of the system.
An oracle can return a fixed value for months while containing logic that switches to another pricing path under specific conditions.
One example is the USDe / USDG market on Robinhood, where the oracle uses a MetaOracleDeviationTimelock with a primary and backup branches:

Just a few words about this example: the observed on-chain price source is just a hardcoded 1 USDe = 1 USDG and it was like that since the beginning, while real market value of USDe is present only in the backup leg of the oracle.
Looking at historical price here, you’d probably come to a reasonable conclusion that this market is forever stable, and therefore your position HF should be as close to 1 as possible to maximise capital efficiency.
While this is true for the past, the future is not so clear: if USDe depegs a little and settles at 0.99 USD (which is not crazy or unheard of), the top level oracle price drops to the market value without any smoothness as soon as deviation challenge is accepted - with 0 time for you to react to the market price suddenly (or even slowly) going down.
We have also seen structures where two branches eventually depend on the same underlying oracle (here’s an example). The oracle looks like it contains independent fallback logic, but the two paths cannot meaningfully diverge no matter what happens.
Those details are hard to see from an oracle address, contract code or a price chart.
There are dozens of oracle examples that surprised us a lot - to keep this short, we will publish separate breakdowns of some of these cases in the following posts.
How the oracle analysis works
Under The Hood does not stop at the market-level oracle or at the first value it returns. It follows the pricing path through adapters, feeds, proxies and token contracts until the relevant dependency graph is reconstructed.
That process is recursive: if one component points to another contract that contributes to the price, the analysis continues from there. It also goes beyond a single execution trace. The engine inspects contract code, metadata and important parameters that may reveal branches or dependencies which are not active in the current call path.
That is how structures like the USDe / USDG MetaOracleDeviationTimelock can be reconstructed even when one branch is not currently being used and called onchain.
Once the graph is built, the engine tries to understand the role of each component inside the price calculation. A Chainlink or Redstone feed is treated as a price source. An ERC4626 call is treated as a share-to-asset conversion. A discount model is represented as a transformation. A composite oracle is represented as the arithmetic connecting its inputs. That is the semantic part: the output is not just a graph of contracts and return values, but an explanation of how those contracts contribute to the final price.
Today this is implemented through roughly twenty reusable adapters covering dedicated providers such as Chainlink, RedStone, Chronicle etc, and structures like NAV feeds, exchange-rate conversions, composite oracles, linear discount models, adjusted feeds and several protocol-specific designs.
We initially expected unusual markets to require dozens or hundreds of one-off integrations. In practice, most complex oracles are combinations of a relatively small set of recurring primitives.
The engine is deliberately conservative about unsupported logic. If it can establish what a component does, it explains it. If it cannot, that part is marked as unknown rather than filled with a plausible interpretation.
Liquidation risk
The second part of Under The Hood looks at borrower positions. For each Morpho market, we calculate how far individual positions are from liquidation and aggregate the result into a liquidation-risk view.
For normal markets, the analysis covers enough positions to represent more than 99% of total borrowed assets. Very large markets are capped at 5,000 largest positions. You can then see how much debt becomes liquidatable after an oracle price moves by a certain percentage:

Some markets can absorb a large move before meaningful debt reaches liquidation. Others, especially looping and correlated-asset markets, can have substantial debt concentrated within a very small price range.
This goes back to the original PT-reUSD question: the oracle analysis tells you how the price can move, and the positions analysis tells you how much value becomes liquidatable if it does. Together, the two views make it easier to narrow down markets where an unusual oracle design coincides with meaningful liquidation exposure.
The same page also shows which vaults supply liquidity to the market and how large each allocation is relative to the vault.

Morpho first, not Morpho-only
Under The Hood was originally built around Morpho markets. Morpho is convenient for this because each market is isolated and has a clearly defined oracle and a strict top-level interface, which gives the analysis a clean entry point.
But the semantic analysis engine itself is already close to protocol agnostic: oracles interfaces differ between protocols, but the logic mostly consists of the same building blocks we already cover.
You can already use the search and enter an oracle address + chain directly: the output is not always as complete or polished as it is for Morpho markets yet, but the same recursive semantic engine is used underneath. Here’s a result for an Aave V3 LBTC oracle as an example:

The direction is to make that analysis fully protocol agnostic.
Conclusion
We started with one oracle-manipulation case, but the problem turned out to be much broader. The information needed to understand a market is usually already onchain. The hard part is reconstructing it into something useful: how the price is built, how borrower positions depend on it, and where the actual risk sits.
This is still an early version of what we want Under The Hood to become.
The longer-term goal is broader: build a DeFi risk analytics platform that helps researchers, curators, lenders and borrowers understand complex market structure without having to reconstruct everything manually each time.
For now, please explore Under The Hood, take a look at the markets and oracles you actually use, and let us know what you think.
If you're working with DeFi lending markets, managing risk, or building on top of oracle infrastructure, we'd especially love to hear from you. Whether you have ideas for new features, use cases we haven't considered, or challenges that our tool could help solve, we'd love to discuss them and explore what we could build next!