3jane: monitor nominal backing floor and IS_PAUSED#225
Merged
Conversation
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>
Co-Authored-By: Claude Opus 4.7 (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.
Summary
check_nominal_backing_floorto3jane/main.py— alerts on any change toSUSD3_NOMINAL_BACKING_FLOOR, and a separate alert-once when the floor exceeds current sUSD3totalAssets(a state in which sUSD3 redemptions can be blocked).check_protocol_paused— alert-once onIS_PAUSED0→1 transition. Distinct from the existing per-vaultisShutdown()check.3jane/abi/ProtocolConfig.jsonwith the genericconfig(bytes32)getter, and folds both new reads into the existingmain()batch (no extra RPC round-trips).Why now
A pending TimelockController op (executing in ~1 day) upgrades the sUSD3 proxy
0xf689…64a7to a new implementation0x2038a352…that introduces a nominal backing floor and starts using a protocol-wide pause flag inProtocolConfig. Current on-chain value of the floor is 0 (unused until governance sets it), so this monitor is silent until then.Behavior verified locally
End-to-end dry-run against mainnet (telegram mocked) completed cleanly with the expanded 8-call batch.
Test plan
TELEGRAM_BOT_TOKEN_3JANE/TELEGRAM_CHAT_ID_3JANEare still wired in the scheduled workflow.python 3jane/main.pyand confirm the floor read still returns 0 (governance hasn't set it yet) and no spurious alert fires.SUSD3_NOMINAL_BACKING_FLOORto a non-zero value to confirm both the change and breach alert messages render correctly in Telegram.🤖 Generated with Claude Code