refactor: centralize stablecoin depeg monitoring into stables/main.py#195
Merged
refactor: centralize stablecoin depeg monitoring into stables/main.py#195
Conversation
…n.py Move all stablecoin depeg monitoring into a single script that runs on the multisig-checker workflow (every 10 min) instead of being embedded in each protocol's main script at varying cadences. Alerts are still routed per protocol's Telegram channel. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract fetch_prices() from check_stablecoin_prices() so stables/main.py can fetch all 6 tokens in one call and pass pre-fetched prices for per-protocol depeg checks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n.py No need for a wrapper function — stables/main.py fetches once and checks prices directly, sending per-protocol alerts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove duplicate _defillama_fetch_prices and _dl_client from yearn/alert_large_flows.py in favor of the shared utility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
stables/main.pyChanges
stables/main.py— single script that fetches all stablecoin prices in one DeFiLlama call, grouped by protocolSTABLECOIN_TOKENSandcheck_stablecoin_prices()calls fromethena/ethena.py,infinifi/main.py,maple/main.py,cap/liquidity.pymultisig-checker.ymlto includestables/main.pymaple/README.mdto reference centralized scriptTest plan
stables/main.pyruns successfully and fetches prices for all 6 tokens🤖 Generated with Claude Code