mango-v4/bin/liquidator
Christian Kamm 5a05e9cb2e
Update anchor to v0.27.0, stop using submodule (#582)
2023-05-12 13:54:53 +02:00
..
src Ckamm/liq fixes (#571) 2023-05-05 09:11:12 +02:00
.env.example Organize paths, rename crates (#466) 2023-02-20 14:08:38 +01:00
.gitignore Organize paths, rename crates (#466) 2023-02-20 14:08:38 +01:00
Cargo.toml Update anchor to v0.27.0, stop using submodule (#582) 2023-05-12 13:54:53 +02:00
Dockerfile.liquidator Use ghcr.io container registry (#549) 2023-04-17 16:57:51 +01:00
README.md liquidator docs (#512) 2023-03-21 18:37:01 +01:00

README.md

Two branches are relevant here:

  • devnet: bleeding edge, may be unstable, could be incompatible with deployed program
  • main: stable, currently running on the mainnet-beta cluster

Setup Environment

.env Config file:

A .env file can be used to configure the liquidator setup. See .env.example for a example.

The environment variables required are

  • LIQOR_MANGO_ACCOUNT - public key of the mango account
  • LIQOR_OWNER - private key of the owner of the mango account
  • RPC_URL - RPC cluster url
  • SERUM_PROGRAM - the Openbook program Id the mango group is configured with e.g. primary mango group 78b8f4cGCwmZ9ysPFMWLaLTkkaYnUjwMJYStWe5RTSSX is configured to work with srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX

more advanced parameters

  • MIN_HEALTH_RATIO - minimum health ratio the liquidator should retain (default 50%)
  • REBALANCE_SLIPPAGE_BPS - slippage liquidator should tolerate when offloading tokens (default 100)
cargo run --bin liquidator

There is also a dockerfile Dockerfile.liquidator available in case one wants to run this in a containerized environment.