# Attacker can drain the entire suppliers on Morpho market by inflating collateral price

Escrowed shares shrink effectiveSupply in Notional's Morpho oracle, so a yield-token donation inflates collateral price and lets attacker borrow out the entire market.

- Payout: Audit contest
- Severity: high
- Program: Notional
- Found by: mstpr-brainbot
- Disclosed: 2025-06-27
- Write-up quality: 8/10
- Original: https://github.com/sherlock-audit/2025-06-notional-exponent-judging/issues/214
- Library page: https://bugbountylibrary.com/r/sherlock%3A2025-06-notional-exponent%3AH-2
- Tags: area:web3 domain:web3 impact:data-leak impact:funds-loss kind:contest platform:sherlock sev:high tech:evm tech:solidity technique:chained technique:source-review vuln:accounting-error vuln:oracle-manipulation

**Target:** AbstractYieldStrategy Morpho oracle price() / initiateWithdraw escrow accounting
**Root cause:** initiateWithdraw escrows shares (raising s_escrowedShares) without burning them, so effectiveSupply() drops to VIRTUAL_SHARES floor while totalSupply stays; convertSharesToYieldToken divides by effectiveSupply, so a small yieldToken donation massively inflates price().
**Steps:**
1. Call `lendingRouter.initiateWithdraw(tapir, address(y), withdrawRequestData)` for full balance; effectiveSupply drops to 1e6 floor, shares still held.
2. Transfer `1e18` yieldToken directly to the YieldStrategy contract (`IERC20(y.yieldToken()).transfer(address(y), 1e18)`).
3. Read `y.price()` — now ~1.14e36 instead of ~1.14e18 because convertSharesToYieldToken divides by effectiveSupply=1e6.
4. Call `MORPHO.borrow(marketParams, borrowable, 0, tapir, tapir)` directly (bypassing LendingRouter so transient-state convertToAssets override is skipped) to borrow entire market supply.
5. Finalize the withdrawal request to reclaim original collateral shares.
**How found:** Code reading of initiateWithdraw/effectiveSupply and price()/convertSharesToYieldToken; noticed escrowed shares aren't burned so effectiveSupply can be driven to the VIRTUAL_SHARES floor, then realized a donation to yieldTokenBalance inflates price() and that direct Morpho.borrow skips the transient-state override.
**Exploitation:** Attacker with a large share position initiates a full withdrawal (escrowing shares, collapsing effectiveSupply to the 1e6 virtual floor), donates 1e18 yieldToken to inflate the oracle price ~1e18x, then borrows the entire Morpho market supply directly via MORPHO.borrow (bypassing LendingRouter transient state), and finally finalizes the withdrawal to recover the original collateral — netting all supplier funds for the cost of the donation.
**Escalation:** Direct Morpho.borrow bypasses LendingRouter's transient convertToAssets override, so the manipulated base convertToAssets is used by the oracle; combined with full-market borrow drains all suppliers.
**Insight:** When an oracle price divides by a supply that can be shrunk via escrow/lock mechanics, check whether a donation to the numerator can be amplified by the denominator floor; also check whether direct calls to the lending pool bypass router-only transient state used by the oracle.

