OEV

Moonwell's OEV system captures value from liquidation MEV at the protocol level, splitting profits between liquidators and the protocol. Instead of block builders capturing all liquidation surplus, Moonwell delays Chainlink price updates by a short window and allows liquidators to access fresh prices early by routing liquidations through OEV wrapper contracts.

How It Works

  1. Each Chainlink price feed is wrapped in an OEV wrapper contract

  2. The wrapper delays price updates by maxRoundDelay seconds (default: 10s)

  3. Liquidators call updatePriceEarlyAndLiquidate() to access the fresh price and execute the liquidation in one transaction

  4. Liquidation profits are split between the liquidator and the protocol based on liquidatorFeeBps

  5. After the delay window expires, the fresh price becomes publicly available to everyone

There are two OEV wrapper variants - one for Moonwell Core markets (mToken-based) and one for Morpho Blue isolated markets.

Configuration

These are the current deployed values. They are set at deployment and can be updated by the contract owner - do not hardcode them.

Parameter
Current Value
Description

liquidatorFeeBps

4000

Liquidator keeps 40% of profit

maxRoundDelay

10

Seconds before price becomes public

maxDecrements

10

Max previous rounds to search for valid data

Price Delay Mechanism

Both OEV wrappers implement the same delay logic in latestRoundData():

After maxRoundDelay seconds, the fresh price becomes available to everyone. The OEV window is only valuable during this delay period.

🏦Core Marketschevron-right🔷Morpho Marketschevron-right

Last updated