/keeper-bots-v2

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Keeper Bots for Drift Protocol v2

Docs Discord Chat License

Setting up

Setup Environment

cp .env.example .env

Update values in .env accordingly

KEEPER_PRIVATE_KEY: can be a number array (as in example), or a path to a keypair.json as generated by solana-keygen. The address of this key requires SOL since it will be the signing authority of all transactions sent by this bot.

Initialize User

A ClearingHouseUser must be created before interacting with the ClearingHouse program.

yarn run dev --init-user

Depositing Collateral

Some bots (i.e. trading, liquidator and JIT makers) require collateral in order to keep positions open, a helper function is included to help with depositing collateral. A user must be initialized first before collateral may be deposited.

# deposit 10,000 USDC
yarn run dev --force-deposit 10000

Run Bots

By default, some Prometheus metrics are exposed on localhost:9464/metrics.

Run Filler Bot

yarn
yarn run dev:filler

Run Trigger Bot

yarn
yarn run dev:filler

Run JIT Maker Bot

⚠ requires collateral

yarn
yarn run dev:jitmaker