Liquidator bot for V1
To run the project you need:
- Python >=3.7.0 local development environment
- Brownie local environment setup
- Set env variables for Etherscan API, Infura and [Alchemy] (https://www.alchemy.com/):
ETHERSCAN_TOKEN
,WEB3_INFURA_PROJECT_ID
,ALCHECMY_API_KEY
- Local Ganache environment installed
Using Poetry for dependencies. Install poetry
curl -sSL https://install.python-poetry.org | python3 -
Clone the repo, then, to install dependencies
poetry install
within the local dir.
- Create an account using brownie and fund it for gas (more info here):
brownie accounts generate my_account
Add account password to scripts/constants/brownie_pass.txt
- Infura node (default choice by brownie) is sometimes problematic on arbitrum. So set up brownie to use alchemy node for arbitrum
brownie networks add Arbitrum arbi-alc host=https://arb-mainnet.g.alchemy.com/v2/ALCHEMY_API_KEY_HERE name=arbi-alc chainid=42161 explorer=https://api.arbiscan.io
Add or remove market and/or other contracts from scripts/constants/constants.json
if required.
Run liquidator on arbitrum:
brownie run liquidator.py main my_account arbitrum --network arbi-alc
Run liquidator on Eth L1:
brownie run liquidator.py main my_account ethereum --network mainnet