zfogg / bao-liquidator-bot

A simple liquidator bot for Bao's synthetic platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Liquidator Bot

License: WTFPL

A simple liquidator bot written in JS for BAO Finance's synthetics protocol.

This bot is by no means top-of-the-line and is meant to be used as a reference / starting point for people attempting to create more robust liquidation bots for the protocol. JavaScript is no bueno for MEV searching. Feel free to run it as-is, however, here's your competition: This is your competition

To Do

  • Create proxy contract to batch liquidation operations into one transaction
    • Submit transactions in flashbots bundles / to the flashbots RPC
  • Consider profit/loss when executing liquidations
    • Include gas expenditures & liquidation profit in consideration
  • Use subgraph more to speed things up, no need to query contracts in several instances
  • Auto-withdraw from bdTokens to receive underlying liquidity after successful liquidations.

Instructions

  1. Copy src/constants.default.ts to src/constants.ts and fill in blank values.
  2. Create a file in the project root called .secret and include your liquidator wallet's private key
  3. Run yarn
  4. Run ts-node ./src/indexv3.ts

References

License

Released under the WTFPL License. Have at it.

About

A simple liquidator bot for Bao's synthetic platform

License:Do What The F*ck You Want To Public License


Languages

Language:Solidity 60.3%Language:TypeScript 39.7%