Market 2: Vanilla
For any questions, join the Felix Discord, and reach out to contributors.
Overview
The Vanilla Markets is a borrow and lend market built on Morpho
Borrowers deposit HYPE or other assets as collateral and can borrow HUSD, USDT0, USDe, etc.
Lenders deposit assets to earn borrower interest.
Markets
WHYPE / USDe
0x292f0a3ddfb642fbaadf258ebcccf9e4b0048a9dc5af93036288502bde1a71b1
12.67%
WHYPE / USDT0
0xace279b5c6eff0a1ce7287249369fa6f4d3d32225e1629b04ef308e0eb568fb0
12.67%
UBTC / USDe
0x5fe3ac84f3a2c4e3102c3e6e9accb1ec90c30f6ee87ab1fcafc197b8addeb94c
7.41%
UBTC / USDT0
0x707dddc200e95dc984feb185abf1321cabec8486dca5a9a96fb5202184106e54
7.41%
Vaults
USDe
0x835febf893c6dddee5cf762b0f8e31c5b06938ab
USDT0
0xfc5126377f0efc0041c0969ef9ba903ce67d151e
Liquidations
Vanilla Markets are built on the standard Morpho smart contracts, which means liquidations follow the same mechanism as on Ethereum Mainnet or Base. Liquidations occur when a borrower's health factor falls below 1.
Any third party—typically bots or keepers—can call the liquidate
function to repay a portion of a borrower's debt and seize a corresponding amount of collateral at a discount.
The relevant contract for liquidations of Vanilla Markets on HyperEVM is the Morpho contract, deployed at:
Liquidate Function
Contract: Morpho Blue Core
Purpose: Liquidates an undercollateralized borrower's position by seizing collateral in exchange for repaying a portion of their debt. This helps maintain protocol solvency and allows liquidators to earn a liquidation bonus.
Function Signature:
Parameters:
marketParams
: Struct containing the market’s configuration (collateral/loan asset addresses, oracle, lltv, etc.)borrower
: The address of the user being liquidated.seizedAssets
: The amount of collateral (in collateral token units) to seize. Set this to0
if you're specifyingrepaidShares
instead.repaidShares
: The amount of debt shares to repay. Set this to0
if you're specifyingseizedAssets
instead.data
: Optional payload for advanced integrations. Used for callbacks or flash logic.
Return Values:
seizedAssetsOut
: The actual amount of collateral seized.repaidAssetsOut
: The actual amount of loan token paid to repay the borrower's debt.
Notes:
Either
seizedAssets
orrepaidShares
must be set to zero. The protocol computes the corresponding value based on price and the liquidation incentive.Only undercollateralized positions (health factor < 1) are eligible for liquidation.
A liquidation incentive is applied to reward the liquidator with a discount on the seized collateral.
A
onMorphoLiquidate
callback is supported ifdata.length > 0
.
Example Use Case:
If a liquidator wants to repay a borrower's debt worth 1,000 USDT0, they can call liquidate(...)
with:
repaidShares
≈ equivalent to 1,000 USDT0 worth of shares (calculated based on market totals)seizedAssets = 0
Let the protocol compute the amount of collateral to seize (based on current oracle price and incentive factor)
Open Source Bots
Liquidation Bot 1
Languages and Tools: Typescript & Solidity
Description: A simple, fast, and easily deployable liquidation bot for the Morpho protocol. This bot is entirely based on RPC calls and is designed to be easy to configure, customizable, and ready to deploy on any EVM-compatible chain.
Liquidation Bot 2
Languages and Tools: Typescript & Solidity
Description: This contribution presents a simple implementation of a liquidation bot that can liquidate unhealthy position on Morpho. Using Typescript and Solidity.
Liquidation Bot 3
Languages and Tools: Rust & Solidity
Description: This contribution presents a detailed strategy for liquidations using Rust and Solidity.
Liquidation Bot 4
Languages and Tools: Go & Solidity
Description: This contribution presents a detailed strategy for liquidations using Go and Solidity.
Last updated