feat(morpho): route YV unwind liquidity alerts to the curation chat - #336
Merged
Conversation
Insufficient unwind liquidity for YV collateral markets is a curation decision — rebalance the vaults, adjust the market caps — not something the public morpho group can act on, so it now goes to an internal curation chat (TELEGRAM_CHAT_ID_CURATION) instead. resolve_channel keeps the alert in the morpho group until that chat id is configured, so it can't be dropped by a missing env var. The alert's protocol stays morpho, so the emergency-withdrawal dispatch hook is unaffected, as is every other morpho alert. Co-Authored-By: Claude Opus 5 (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.
The "Insufficient unwind liquidity for YV collateral markets" alert is acted on by curation (rebalance the vaults, adjust market caps), not by the public morpho group — so it now goes to an internal curation chat.
Setup
One new env var, a standalone chat served by the DEFAULT bot:
Until it's set on the runner, nothing changes —
resolve_channelfalls back to the morpho group, so a missing env var can't silently drop the alert.Changes
utils/telegram.py— newCURATION_CHANNELandresolve_channel(channel, fallback).protocols/morpho/markets.py— the unwind alert is sent withchannel=resolve_channel(CURATION_CHANNEL, PROTOCOL). Itsprotocolstaysmorpho, so the emergency-withdrawal dispatch hook still fires and alert records keep their origin..env.example,protocols/morpho/README.md,monitoring.yaml.tests/test_morpho_markets.pycovering the curation route and the morpho fallback.Scope
Only this alert moves. Every other morpho alert (bad debt, allocation, risk level, per-vault low liquidity) still goes to the morpho group.
Testing
ruff check/formatclean; full suite passes (717 passed, 4 skipped).🤖 Generated with Claude Code