This bot monitor profitable rebalancing opportunities every minute and trigger rebalance if needed.
To install the dependencies, run the following command:
pnpm install
Note If you want to contribute to this project, make sure you have run installation from the monorepo root in order to setup git hooks etc.
Copy .env.example
to .env
and modify the values.
Build the rebalancer:
pnpm build
Run the rebalancer:
node dist/cron.js
This bot is automatically deployed to fly.io via GitHub Workflow.
To create deployment on new chain, you need to create new Fly app first.
To create new Fly app, run the following command:
flyctl launch
Given the app name using the following format: rebalancer-$CHAIN
. For example
rebalancer-bsc
.
Next step is to set the secrets.
Run the following command to create the secrets:
flyctl secrets --app APP_NAME set RPC_URL="" WALLET_PK="" SENTRY_DSN="" FLTS="" MIN_PROFITS=""
Then you need to setup automatic deployment by adding deployment job in apps-rebalancer-prod.yml.