@morpho-org/liquidation-sdk-viem
v2.18.0
Published
Viem-based package that provides utilities to build viem-based liquidation bots on Morpho and examples using Flashbots and Morpho's GraphQL API.
Keywords
Readme
@morpho-org/liquidation-sdk-viem
Viem-based package that provides utilities to build viem-based liquidation bots on Morpho and examples using Flashbots and Morpho's GraphQL API.
Installation
npm install @morpho-org/liquidation-sdk-viemyarn add @morpho-org/liquidation-sdk-viemGetting Started
An example liquidation bot currently used in production is available under examples/.
This bot, provided a list of whitelisted markets to monitor, automatically:
- Fetches liquidatable positions from the API
- Finds the largest available liquidity for a swap of the collateral for the debt via 1inch
- Redeems collateral MetaMorpho shares for the underlying assets when applicable
- Only submit profitable liquidations (wrt to the gas cost & the swap's slippage)
