Skip to content

feat(safe): monitor yearn multisigs with proposer-based filtering#232

Merged
spalen0 merged 2 commits into
mainfrom
yearn-ms
May 21, 2026
Merged

feat(safe): monitor yearn multisigs with proposer-based filtering#232
spalen0 merged 2 commits into
mainfrom
yearn-ms

Conversation

@spalen0
Copy link
Copy Markdown
Collaborator

@spalen0 spalen0 commented May 21, 2026

Summary

  • Adds 16 yearn-controlled multisigs (mainnet/base/katana) to the existing Safe queued-tx monitor, routed to a new YEARN_MS telegram destination. Source: engn33r/multisigs.csv. Other chains (Polygon, Arbitrum, Optimism, Fantom) intentionally excluded for now.
  • Filters pending txs against a per-safe allow-list of recurring proposer addresses (YEARN_EXPECTED_PROPOSERS) so only unexpected proposers raise an alert. Allow-list discovered from the last ~50 executed txs per safe (≥20% share & ≥5 occurrences). On current pending state this filters ~70% (89/127).
  • Splits safe/main.py 483 → 276 lines by moving static config (addresses, proposers, chain/api maps, proxy-upgrade selectors) into safe/addresses.py.
  • Adds Katana (katana-main) to safe_apis, safe_address_network_prefix, and safe_network_to_chain_id alias map.

Telegram routing uses the standard TELEGRAM_CHAT_ID_YEARN_MS secret (a group chat, not a forum topic) — set the secret in repo settings once the group id is known.

Notes / follow-ups

  • Some pending txs still alert because their proposer wasn't in the top-50 historic sample — e.g. SAM mainnet has a recurring 0x80c9aC86... not yet in the allow-list. Easy to extend after live alerts land.
  • A few safes intentionally have no filter: V3 Deployer katana (only 2 historic txs, both pre-proposer-field) and Core Dev mainnet (48/50 historic txs pre-proposer-field). They alert on every queued tx as before.

Test plan

  • Set TELEGRAM_CHAT_ID_YEARN_MS repo secret to the yearn_ms group chat id
  • Verify the existing multisig-checker.yml workflow run (safe/main.py) succeeds end-to-end
  • Confirm safe_apis["katana-main"] resolves a 200 from Safe (will be silent if 404)
  • Watch live alerts for a few cycles; extend YEARN_EXPECTED_PROPOSERS with any obviously-recurring "unexpected" proposers
  • Confirm yearn_ms group receives messages and non-yearn protocol alerts still route to their existing chats

🤖 Generated with Claude Code

spalen0 and others added 2 commits May 21, 2026 17:04
Add 16 yearn-controlled multisigs on mainnet/base/katana to the safe monitor,
routed to a new YEARN_MS telegram destination. Filter pending txs against a
per-safe allow-list of known bot/EOA proposers so only "unexpected" proposers
alert — cuts noise ~70% on current pending state.

Also splits safe/main.py: static config (addresses, proposers, chain/api maps)
moved into safe/addresses.py to keep main.py focused on logic.

Adds Katana (katana-main) plumbing to safe_apis, safe_address_network_prefix,
and the safe_network_to_chain_id alias map.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@spalen0 spalen0 marked this pull request as ready for review May 21, 2026 15:20
@spalen0 spalen0 merged commit cf95bc8 into main May 21, 2026
2 checks passed
@spalen0 spalen0 deleted the yearn-ms branch May 21, 2026 15:20
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