🔷Morpho Markets
The ChainlinkOEVMorphoWrapper is used for liquidations in Morpho Blue isolated lending markets. Unlike the core market wrapper, this variant receives underlying tokens (not mTokens) as collateral and supports slippage protection via maxRepayAmount.
Key Differences from Core Markets
Market type
Moonwell Core (mToken)
Morpho Blue isolated
Collateral received
mTokens
Underlying tokens
Market identification
mToken addresses
MarketParams struct
Slippage protection
Fixed repay amount
maxRepayAmount parameter
Excess return
N/A
Unused loan tokens returned automatically
Function Signature
function updatePriceEarlyAndLiquidate(
MarketParams memory marketParams,
address borrower,
uint256 seizedAssets,
uint256 maxRepayAmount
) externalmarketParams
MarketParams
Morpho market identification struct
borrower
address
The underwater borrower to liquidate
seizedAssets
uint256
Amount of collateral to seize
maxRepayAmount
uint256
Maximum loan tokens willing to repay (slippage protection)
MarketParams Struct
Liquidation Flow
Solidity Example
Revert Conditions
borrower == address(0)
"ChainlinkOEVMorphoWrapper: borrower cannot be zero address"
seizedAssets == 0
"ChainlinkOEVMorphoWrapper: seized assets cannot be zero"
maxRepayAmount == 0
"ChainlinkOEVMorphoWrapper: max repay amount cannot be zero"
Wrong oracle BASE_FEED_1
"ChainlinkOEVMorphoWrapper: oracle must be the same as the base feed 1"
Chainlink price ≤ 0
"Chainlink price cannot be lower or equal to 0"
Incomplete round
"Round is in incompleted state"
Stale Chainlink data
"Stale price"
Actual repay > max
"ChainlinkOEVMorphoWrapper: repaid amount exceeds maximum"
Invalid loan token price
"ChainlinkOEVMorphoWrapper: invalid loan token price"
Events
PriceUpdatedEarlyAndLiquidated
address indexed borrower, uint256 seizedAssets, uint256 repaidAssets, uint256 protocolFee, uint256 liquidatorFee
FeeRecipientChanged
address oldFeeRecipient, address newFeeRecipient
LiquidatorFeeBpsChanged
uint16 oldLiquidatorFeeBps, uint16 newLiquidatorFeeBps
MaxRoundDelayChanged
uint256 oldMaxRoundDelay, uint256 newMaxRoundDelay
MaxDecrementsChanged
uint256 oldMaxDecrements, uint256 newMaxDecrements
Deployed Contracts
Base - ChainlinkOEVMorphoWrapper
WELL/USDC Morpho Market Parameters (Base)
Last updated

