2021-03-09 05:32:07 -08:00
|
|
|
# Mango Liquidator
|
|
|
|
|
2021-04-10 14:29:35 -07:00
|
|
|
## Setup Full Liquidator
|
2021-03-09 05:32:07 -08:00
|
|
|
Make sure to edit the .env file to look something like this:
|
|
|
|
```
|
|
|
|
export CLUSTER="mainnet-beta"
|
|
|
|
export CLUSTER_URL="https://solana-api.projectserum.com"
|
|
|
|
export KEYPAIR=~/.config/solana/id.json
|
|
|
|
export NODE_ENV=production
|
2021-04-10 14:29:35 -07:00
|
|
|
export GROUP_NAME="BTC_ETH_USDT"
|
2021-03-09 05:32:07 -08:00
|
|
|
```
|
|
|
|
|
2021-04-10 14:29:35 -07:00
|
|
|
### Run
|
2021-03-09 05:32:07 -08:00
|
|
|
```
|
|
|
|
yarn install
|
|
|
|
source .env
|
|
|
|
yarn liquidate
|
2021-04-10 14:29:35 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Setup Partial Liquidator
|
|
|
|
Make sure to edit the .env file to look something like this:
|
|
|
|
```
|
|
|
|
export CLUSTER="mainnet-beta"
|
|
|
|
export CLUSTER_URL="https://solana-api.projectserum.com"
|
|
|
|
export KEYPAIR=~/.config/solana/id.json
|
|
|
|
export NODE_ENV=production
|
|
|
|
export TARGETS="0.1 2"
|
|
|
|
export GROUP_NAME="BTC_ETH_USDT"
|
|
|
|
```
|
|
|
|
|
|
|
|
TARGETS represents the BTC and ETH amounts the partial liquidator should try to maintain
|
|
|
|
in the liquidator's wallet
|
|
|
|
|
|
|
|
### Run
|
|
|
|
```
|
|
|
|
yarn install
|
|
|
|
source .env
|
|
|
|
yarn partialLiquidate
|
2021-03-09 05:32:07 -08:00
|
|
|
```
|