The MCDEX Perpetual contract incentives external agents, called keepers, to monitor and keep margin accounts safe.
This bot keeps track of margin accounts in the MCDEX perpetual contract and finds out accounts that have been unsafe. The bot will initiate a "liquidateByAMM" command to the Ethereum network:
- You will earn keeper reward
- The perpetual's AMM will earn penalty prize
- The perpetual's AMM will get the liquidated position
# we need python 3.6
git clone https://github.com/mcdexio/mai3-keeper.git
cd mai3-keeper
pip install -r requirements.txt
- Editing
config.example/config.py
, then "mv config.example config":
- Set rpc.url to an ETH node. We recommend that you start an Ethereum node yourself (ex: geth or parity). You can also register an infura account and paste the node url from infura dashboard.
- Set keeper account private_key. you may need export the private key from MetaMask
- Run it
python main.py