Skip to content

Latest commit

 

History

History
48 lines (34 loc) · 1.57 KB

README.md

File metadata and controls

48 lines (34 loc) · 1.57 KB

Compound Monitor

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.

Installation

git clone https://github.com/amperry/compound-monitor.git
npm install

Configuration

  • 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).

Deployment

The repo includes npm scripts for packaging and deploy:

npm run package
npm run deploy

Environment Variables

Include the following environment variables when creating your AWS Lambda function:

WALLET_ADDRESS=0x...
ALERT_THRESHOLD_PERCENTAGE=75
GMAIL_USER=
GMAIL_PW=
  • WALLET_ADDRESS

    The wallet address holding a compound finance position that is to be monitored.

  • ALERT_THRESHOLD_PERCENTAGE

    The utilization percentage that when exceeded, will trigger an alert email once per function invocation.

  • GMAIL_USER / GMAIL_PW

    Gmail credentails used by nodemailer to send the email.

License

MIT