Liquidation sucks. Avoid liquidation using Compound Monitor.
Compound Monitor is an AWS Lambda function that monitors Compound Finance utilization and sends an alert email once the utilization threshold percentage has been reached.
git clone https://github.com/amperry/compound-monitor.git
npm install
- Create a new AWS Lambda function named 'compound-monitor' with a basic execution role (access to CloudWatch logs optional) and the necessary environment variables.
- Configure an Amazon EventBridge Rule to trigger function at regular interval (suggested: every 5 minutes).
The repo includes npm scripts for packaging and deploy:
npm run package
npm run deploy
Include the following environment variables when creating your AWS Lambda function:
WALLET_ADDRESS=0x...
ALERT_THRESHOLD_PERCENTAGE=75
GMAIL_USER=
GMAIL_PW=
-
The wallet address holding a compound finance position that is to be monitored.
-
The utilization percentage that when exceeded, will trigger an alert email once per function invocation.
-
Gmail credentails used by nodemailer to send the email.