Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 1.16 KB

README.md

File metadata and controls

14 lines (9 loc) · 1.16 KB

Project description

A Python bot for liquidation of unhealthy obligations in Solaris protocol.

How it works

  1. The bot fetches all obligations accounts inside the protocol and tries to find an unhealthy one (obligation.borrowed_value < obligation.unhealthy_borrow_value) and checks if the liquidation will be profitable (liquidation_reward > flashloan_fee)

  2. The bot sends a liquidate_obligation instruction to the liquidation program containing a public key of unhealthy obligation

  3. Liquidation program gets some liquidity_amount from a lending program via flashloan and repays a loan. Then if it returns flashloan + flashloan_fees and takes a liquidation reward. If balance_before < balance_after it return Ok(), if now throws an error and reverts the transaction.