Skip to content

3jane: monitor nominal backing floor and IS_PAUSED#225

Merged
spalen0 merged 2 commits into
mainfrom
3jane-monitor-nominal-floor-and-pause
May 20, 2026
Merged

3jane: monitor nominal backing floor and IS_PAUSED#225
spalen0 merged 2 commits into
mainfrom
3jane-monitor-nominal-floor-and-pause

Conversation

@spalen0
Copy link
Copy Markdown
Collaborator

@spalen0 spalen0 commented May 20, 2026

Summary

  • Adds check_nominal_backing_floor to 3jane/main.py — alerts on any change to SUSD3_NOMINAL_BACKING_FLOOR, and a separate alert-once when the floor exceeds current sUSD3 totalAssets (a state in which sUSD3 redemptions can be blocked).
  • Adds check_protocol_paused — alert-once on IS_PAUSED 0→1 transition. Distinct from the existing per-vault isShutdown() check.
  • Extends 3jane/abi/ProtocolConfig.json with the generic config(bytes32) getter, and folds both new reads into the existing main() batch (no extra RPC round-trips).

Why now

A pending TimelockController op (executing in ~1 day) upgrades the sUSD3 proxy 0xf689…64a7 to a new implementation 0x2038a352… that introduces a nominal backing floor and starts using a protocol-wide pause flag in ProtocolConfig. Current on-chain value of the floor is 0 (unused until governance sets it), so this monitor is silent until then.

Behavior verified locally

  • First run with floor=0 and IS_PAUSED=false: silent init, cache populated.
  • Floor 0 → 5M (no breach): single change alert.
  • Floor 5M → 10M crossing $6.9M backing: change alert + breach alert.
  • Steady state next tick: silent.
  • Backing recovers above floor then drops below again: breach re-alerts (cache resets on clear).
  • IS_PAUSED false→true: single alert. Stays true: silent.

End-to-end dry-run against mainnet (telegram mocked) completed cleanly with the expanded 8-call batch.

Test plan

  • Confirm telegram credentials TELEGRAM_BOT_TOKEN_3JANE / TELEGRAM_CHAT_ID_3JANE are still wired in the scheduled workflow.
  • After the pending timelock op executes, run python 3jane/main.py and confirm the floor read still returns 0 (governance hasn't set it yet) and no spurious alert fires.
  • Optional: temporarily fork-test by overriding SUSD3_NOMINAL_BACKING_FLOOR to a non-zero value to confirm both the change and breach alert messages render correctly in Telegram.

🤖 Generated with Claude Code

Adds two ProtocolConfig watches in anticipation of the sUSD3 v3 upgrade
(0x2038a352…) that introduces a nominal sUSD3 backing floor and exposes
a protocol-wide pause flag separate from per-vault isShutdown().

- check_nominal_backing_floor: alerts on any change to the floor, and
  alert-once when the floor exceeds sUSD3 totalAssets (sUSD3 redemptions
  can be blocked while breached).
- check_protocol_paused: alert-once on IS_PAUSED 0->1 transition.

ProtocolConfig ABI extended with generic config(bytes32). Both reads are
folded into the existing main() batch (no extra RPC round-trips).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@spalen0 spalen0 marked this pull request as ready for review May 20, 2026 11:48
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@spalen0 spalen0 merged commit 27ec14c into main May 20, 2026
2 checks passed
@spalen0 spalen0 deleted the 3jane-monitor-nominal-floor-and-pause branch May 20, 2026 13:06
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