Skip to content

AWS Lambda function that monitors Compound finance utilization percentage

License

Notifications You must be signed in to change notification settings

alexp3y/compound-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

AWS Lambda function that monitors Compound finance utilization percentage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published