Skip to content

feat(morpho): route YV unwind liquidity alerts to the curation chat - #336

Merged
spalen0 merged 1 commit into
mainfrom
feat/curation-channel
Aug 6, 2026
Merged

feat(morpho): route YV unwind liquidity alerts to the curation chat#336
spalen0 merged 1 commit into
mainfrom
feat/curation-channel

Conversation

@spalen0

@spalen0 spalen0 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

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.

🚨 ⚠️ Insufficient vbUSDT unwind liquidity for YV collateral markets on KATANA
🏦 Vaults: Gauntlet USDT, Yearn OG USDT (V2), Gauntlet USDT (V2)
💰 Withdrawable vbUSDT: $425,077.48
🔥 Total collateral at risk: $516,853.61
📊 Required with buffer: $646,067.02 (0.66x coverage)
💹 Markets:
- yvvbUSDT/vbUSDC: $516,853.61 at risk (2% shock, LLTV 86.0%)

Setup

One new env var, a standalone chat served by the DEFAULT bot:

TELEGRAM_CHAT_ID_CURATION=your-curation-chat-id

Until it's set on the runner, nothing changesresolve_channel falls back to the morpho group, so a missing env var can't silently drop the alert.

Changes

  • utils/telegram.py — new CURATION_CHANNEL and resolve_channel(channel, fallback).
  • protocols/morpho/markets.py — the unwind alert is sent with channel=resolve_channel(CURATION_CHANNEL, PROTOCOL). Its protocol stays morpho, so the emergency-withdrawal dispatch hook still fires and alert records keep their origin.
  • Docs: .env.example, protocols/morpho/README.md, monitoring.yaml.
  • Tests: two cases in tests/test_morpho_markets.py covering 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/format clean; full suite passes (717 passed, 4 skipped).

🤖 Generated with Claude Code

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>
@spalen0
spalen0 marked this pull request as ready for review August 6, 2026 13:27
@spalen0
spalen0 merged commit 76c735e into main Aug 6, 2026
3 checks passed
@spalen0
spalen0 deleted the feat/curation-channel branch August 6, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant