Skip to content

spalen0/bad-debt-alert

Repository files navigation

Bad Debt Alert

Alerting Telegram bot for bad debt data from Risk DAO. It's a simple Python script that is triggered by GitHub actions every hour. It checks bad debt data for a given protocol and if the value is above a given threshold it will send Telegram message to a defined chat.

Add new alert

  • Add new workflow to .github/workflows
  • In GitHub repository settings add secrets:
    • TELEGRAM_TOKEN - generate token for your bot.
    • TELEGRAM_CHAT_ID - open the link in a browser and change {TELEGRAM_TOKEN} to your token. Find your chat id in the JSON response. It's possible to set multiple chat ids separated by comma.
  • Set remaining env variables:
    • PROTOCOL name of the protocol you want to monitor.
    • DEBT_THRESHOLD in dollars after which an alert will be sent to Telegram chat. Optional value.
    • DEBT_THRESHOLD_RATIO in percent after which an alert will be sent to Telegram chat. Default value is 100%.
    • DATA_URL link to the data source in JSON format. Link to all RiskDAO data sources. Example data URL for Sonne Finance.

Custom alerts

USDR Treasury

There is a special workflow for USDR Treasury. It checks if the USDR Treasury in DAI is below a given ratio threshold it will send Telegram message to a defined chat.

About

Alerting for debt debt

Resources

Stars

Watchers

Forks

Languages