Skip to content

Commit

Permalink
Add more networks for Aave V3
Browse files Browse the repository at this point in the history
  • Loading branch information
spalen0 committed Aug 5, 2024
1 parent d61afd9 commit e3f59a7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 71 deletions.
29 changes: 27 additions & 2 deletions .github/workflows/aave-bad-debt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,40 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run script
- name: Run Aave V3 Mainnet
run: python bad-debt-trigger.py
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
PROTOCOL: "Aave V3 Mainnet"
DEBT_THRESHOLD_RATIO: "1"
DATA_URL: "https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/ethereum_aave%20v3.json" # https://github.com/Risk-DAO/simulation-results/blob/main/bad-debt/latest/ethereum_aave%20v3.json
DATA_URL: "https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/ethereum_aave%20v3.json"
- name: Run Aave V3 Arbitrum
run: python bad-debt-trigger.py
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
PROTOCOL: "Aave V3 Arbitrum"
DEBT_THRESHOLD_RATIO: "1"
DATA_URL: "https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/arbitrum_aave%20v3.json"
- name: Run Aave V3 Polygon
run: python bad-debt-trigger.py
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
PROTOCOL: "Aave V3 Polygon"
DEBT_THRESHOLD_RATIO: "1"
DATA_URL: "https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/polygon_aave%20v3.json"
- name: Run Aave V3 Optimism
run: python bad-debt-trigger.py
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
PROTOCOL: "Aave V3 Optimism"
DEBT_THRESHOLD_RATIO: "1"
DATA_URL: "https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/optimism_aave%20v3.json"
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ Alerting Telegram bot for bad debt data from Risk DAO. It's a simple Python scri
- `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](https://github.com/Risk-DAO/simulation-results/tree/main/bad-debt/latest) to all RiskDAO data sources. Example data URL for [Sonne Finance](https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/optimism_sonne.json).

## 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.
63 changes: 0 additions & 63 deletions usdr-treasury-trigger.py

This file was deleted.

0 comments on commit e3f59a7

Please sign in to comment.