5min

Tutorial: Liquidator Bot

Intro

Liquidators load and loop through users to check if they can be liquidated.

See Fees & Liquidations liquidator incentives.

Full GitHub example:

Getting Started

  1. Load latest group of users.
JS
|

๏ปฟ

2. Loop through loaded users and check if they have hit their liquidation threshold.

JS
|

๏ปฟ

Advanced

If you're interested to make the liquidator bot run better, you can make edits such as it's much more effective to:

1. Sort users in an efficient data structure based their liquidation price;

2. Monitor the market's price to determine when to run liquidation checks / RPC checks.

We encourage the community to build out stronger liquidations engines and bots to secure our Insurance Fund and user collateral. If interested to chat or have any questions, please reach out to us on Discord or Twitter!

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ