Bad Debt Triggers #825
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Bad Debt Triggers | |
| on: | |
| schedule: | |
| - cron: "15 * * * *" | |
| env: | |
| DEBT_THRESHOLD_RATIO: "0.5" # 0.5% debt threshold | |
| BAD_DEBT_TELEGRAM_TOKEN: ${{ secrets.BAD_DEBT_TELEGRAM_TOKEN }} | |
| jobs: | |
| bad_debt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| cache: "pip" # caching pip dependencies | |
| - name: Install uv | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install uv | |
| - name: Install dependencies | |
| run: | | |
| uv pip install --system . | |
| ### Aave Bad Debt Triggers | |
| - name: Run Aave V3 Mainnet | |
| run: uv run bad-debt/bad-debt-trigger.py | |
| env: | |
| PROTOCOL: "Aave V3 Mainnet" | |
| DATA_URL: "https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/ethereum_aave%20v3.json" | |
| BAD_DEBT_TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID_AAVE }} | |
| # NOTE: data is not live anymore: https://github.com/Risk-DAO/simulation-results/tree/main/bad-debt/latest | |
| # - name: Run Aave V3 Polygon | |
| # run: uv run bad-debt/bad-debt-trigger.py | |
| # env: | |
| # PROTOCOL: "Aave V3 Polygon" | |
| # DATA_URL: "https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/polygon_aave%20v3.json" | |
| # BAD_DEBT_TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID_AAVE }} | |
| # ### Maker Bad Debt Trigger | |
| # - name: Run Maker | |
| # run: uv run bad-debt/bad-debt-trigger.py | |
| # env: | |
| # PROTOCOL: "Maker DAO" | |
| # DATA_URL: "https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/ethereum_maker.json" | |
| # BAD_DEBT_TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID_MAKER }} | |
| # ### Compound Bad Debt Triggers | |
| # - name: Run Comp V3 WETH Mainnet | |
| # run: uv run bad-debt/bad-debt-trigger.py | |
| # env: | |
| # PROTOCOL: "Comp V3 WETH Mainnet" | |
| # DATA_URL: "https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/ethereum_compound%20v3_WETH.json" | |
| # BAD_DEBT_TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID_COMP }} | |
| # - name: Run Comp V3 USDC Mainnet | |
| # run: uv run bad-debt/bad-debt-trigger.py | |
| # env: | |
| # PROTOCOL: "Comp V3 USDC Mainnet" | |
| # DATA_URL: "https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/ethereum_compound%20v3_USDC.json" | |
| # BAD_DEBT_TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID_COMP }} | |
| # - name: Run Comp V3 USDCe Polygon | |
| # run: uv run bad-debt/bad-debt-trigger.py | |
| # env: | |
| # PROTOCOL: "Comp V3 USDCe Polygon" | |
| # DATA_URL: "https://raw.githubusercontent.com/Risk-DAO/simulation-results/main/bad-debt/latest/polygon_compound%20v3_USDCe.json" | |
| # BAD_DEBT_TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID_COMP }} |