Felix
  • Welcome to Felix
  • Contributors
  • Money Market Products
    • Overview
    • Points and Incentives
    • CDP Market (feUSD)
      • How it Works
      • Minting / Borrowing feUSD
      • Managing your borrow position
      • Earning feUSD yield
      • FAQ
    • Vanilla Markets
      • How it Works
      • FAQ
  • Advanced
    • Smart Contract Audits
    • Risk Management
  • Developers
    • Market 1: feUSD CDP
    • Market 2: Vanilla
  • Terms
    • Risk Disclosure Statement
    • Terms & Conditions
    • Privacy Policy
    • Cookie Policy
  • Community
    • Discord
    • Twitter
    • Mirror
Powered by GitBook
On this page
  • Overview
  • Liquidations
  • Liquidate Function
  • Open Source Bots
  1. Developers

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

Market
Market ID
Liquidation Discount

WHYPE / USDe

0x292f0a3ddfb642fbaadf258ebcccf9e4b0048a9dc5af93036288502bde1a71b1

12.67%

WHYPE / USDT0

0xace279b5c6eff0a1ce7287249369fa6f4d3d32225e1629b04ef308e0eb568fb0

12.67%

UBTC / USDe

0x5fe3ac84f3a2c4e3102c3e6e9accb1ec90c30f6ee87ab1fcafc197b8addeb94c

7.41%

UBTC / USDT0

0x707dddc200e95dc984feb185abf1321cabec8486dca5a9a96fb5202184106e54

7.41%

Vaults

Vault
Address

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:

0x68e37de8d93d3496ae143f2e900490f6280c57cd

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:

liquidate(
    MarketParams memory marketParams,
    address borrower,
    uint256 seizedAssets,
    uint256 repaidShares,
    bytes calldata data
) external returns (uint256 seizedAssetsOut, uint256 repaidAssetsOut);

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 to 0 if you're specifying repaidShares instead.

  • repaidShares: The amount of debt shares to repay. Set this to 0 if you're specifying seizedAssets 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 or repaidShares 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 if data.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.

PreviousMarket 1: feUSD CDPNextRisk Disclosure Statement

Last updated 13 days ago

By:

Repository:

By:

Repository:

By:

Repository:

By:

Repository:

View on Purrsec
morpho-labs
Morpho-liquidation-bot
morpho-labs
Morpho-liquidation-bot-educational
etherhood
Liquidator-Morpho
zach030
morpho-liquidator-bot