# Moonwell: faulty wrsETH oracle enables $1M over-borrow

Mispriced wrsETH oracle on Moonwell let attacker flash-loan wrsETH, mint collateral, over-borrow wstETH, and drain ~$1M.

- Payout: Real-world hack
- Severity: high
- Program: Moonwell
- Credited: DeFiHackLabs
- Disclosed: 2025-11-04
- Write-up quality: 7/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2025-11/Moonwell_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20251104-moonwell
- Tags: domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:high tech:evm tech:solidity technique:chained vuln:business-logic vuln:flash-loan vuln:oracle-manipulation

**Target:** Moonwell lending market (mwrsETH collateral / mwstETH borrow) on Base
**Root cause:** Moonwell's wrsETH price feed was faulty/mispriced, so the mwrsETH collateral was valued far above its real market price, allowing borrowing far more than collateral was worth.
**Steps:**
1. Flash-loan wrsETH from Uniswap v3 wstETH/wrsETH CL pool via `flash(recipient, 0, FLASH_AMOUNT, "")`.
2. In `uniswapV3FlashCallback`: approve and `mwrsETH.mint(flashAmount)` to mint collateral.
3. `comptroller.enterMarkets([mwrsETH])` to enable it as collateral.
4. `mwstETH.borrow(BORROW_AMOUNT)` — over-borrow wstETH against mispriced wrsETH collateral.
5. Swap borrowed wstETH -> WETH on wstETH/WETH CL pool.
6. Swap WETH -> wrsETH on wrsETH/WETH Uniswap v3 pool to obtain wrsETH for repayment.
7. Repay flash loan (`flashAmount + fee1`) to wstETH/wrsETH pool; remaining wrsETH swapped to WETH as profit.
**How found:** Attacker likely spotted that Moonwell's wrsETH oracle price diverged from the DEX market price (wrsETH/wstETH and wrsETH/WETH pools), making the collateral artificially valuable and enabling an over-borrow loop.
**Exploitation:** Attacker flash-borrowed ~20.78M wrsETH, minted it as mwrsETH collateral on Moonwell, entered the market, and borrowed ~20,592 wstETH against the inflated collateral value. Borrowed wstETH was swapped to WETH, part converted back to wrsETH to repay the flash loan, leaving ~$1M WETH profit. No capital required beyond gas.
**Insight:** On lending markets, compare each collateral asset's oracle price against its deepest DEX pool price; a persistent premium on a wrapped/LRT asset (like wrsETH) is a direct over-borrow opportunity, especially when a flash loan of that exact asset is available.
