Skip to content

feat(yearn): monitor small parent vault flows - #345

Open
tapired wants to merge 6 commits into
mainfrom
codex/yearn-small-parent-deposits
Open

feat(yearn): monitor small parent vault flows#345
tapired wants to merge 6 commits into
mainfrom
codex/yearn-small-parent-deposits

Conversation

@tapired

@tapired tapired commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • New protocols/yearn/alert_small_parent_flows.py: alerts on every deposit or withdrawal with a raw ERC-4626 assets value between 0 and 10,000 for non-retired Yearn v3 parent vaults (Kong for discovery, Envio Deposit/Withdraw for events).
    • Per-chain (blockNumber, logIndex) cursors; first-run lookback floor is persisted.
    • Per-run alert cap with an overflow summary; first Envio failure is reported once to the Envio channel.
    • Alerts go to the internal curation chat (TELEGRAM_CHAT_ID_CURATION), falling back to the yearn group.
    • Defaults to the chains indexed by yearn/yearn-envio: 1, 8453, 42161, 137, 747474.
  • Align with yearn-envio, which dropped Optimism in yearn/yearn-envio@d124bed:
    • Indexer freshness check no longer expects Optimism.
    • Optimism Yearn TimelockController removed from the Envio timelock monitor (its events are no longer indexed).
    • Indexer links point at yearn/yearn-envio; .env.example sets ENVIO_GRAPHQL_URL.

Verification

  • Envio query fields checked against yearn-envio schema.graphql and the live 5a089e4 deployment.
  • Live dry run over 7 days (no Telegram): ~16 small flows, all vaults resolved, every Kong parent vault indexed.
  • ruff, tests: 873 passed.

🤖 Generated with Claude Code

@tapired
tapired requested a review from spalen0 August 28, 2026 13:18
@spalen0

This comment was marked as resolved.

spalen0 and others added 3 commits September 11, 2026 13:54
- Persist the first-run lookback floor so stream gaps can't drop events
- Cap individual alerts per run and summarize the overflow
- Report the first Envio failure once and stop the run
- Handle null GraphQL data and skip Kong rows missing asset metadata
- Keep hidden (non-retired) parent vaults monitored
- Apply --log-level to the module logger
- Default to chains indexed by yearn-envio (drops Optimism)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Send per-flow alerts and the overflow summary to the internal curation
chat, falling back to the yearn group when TELEGRAM_CHAT_ID_CURATION is
unset, matching the Morpho YV-collateral and lender-borrower monitors.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
yearn-envio dropped Optimism (yearn/yearn-envio@d124bed), so:
- Stop expecting Optimism in the indexer freshness check
- Drop the Optimism Yearn TimelockController from the Envio timelock
  monitor, which could no longer receive its events
- Point indexer links at yearn/yearn-envio and set the example
  ENVIO_GRAPHQL_URL

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@spalen0 spalen0 changed the title feat(yearn): monitor small parent vault deposits feat(yearn): monitor small parent vault flows Sep 11, 2026
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.

2 participants