Trader Joe lending monitoring
- Monitor underwater accounts via TraderJoe lending subgraph
- Determine which assets to repay and seize
- Trigger the liquidate method of a contract with three parameters : borrower address, asset to repay, asset to seize
Installation
npm install
Commands
Run the application
npm run start
Print low health accounts
npm run print
Test
npm run test
Configuration
Environment variables
ENV Variable | Description |
---|---|
PROVIDER_URL | Avalanche network URL |
THEGRAPH_BASE_URL | TraderJoe lending subgraph URL |
TRADERJOE_LIQUIDATOR_ADDRESS | Avalanche C-Chain address of the liquidator contract |
OWNER_PRIVATE_KEY | Owner of TRADERJOE_LIQUIDATOR_ADDRESS |