Skip to content

fix: correct and extend 3Jane risk monitoring#286

Merged
spalen0 merged 7 commits into
mainfrom
fix/3jane-junior-buffer
Jun 18, 2026
Merged

fix: correct and extend 3Jane risk monitoring#286
spalen0 merged 7 commits into
mainfrom
fix/3jane-junior-buffer

Conversation

@spalen0

@spalen0 spalen0 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • value USD3 held by sUSD3 in USDC and divide it by deployed credit, matching the backing UI loss-buffer metric
  • use corrected USDC backing for the nominal-floor comparison
  • monitor the insurance fund raw waUSDC share balance and alert on outflows worth at least $50k
  • add the 3Jane 7-day upgrade timelock alongside the existing 24-hour timelock
  • add regression tests and update monitor documentation

Context

The junior-buffer monitor divided sUSD3.totalAssets() by total USD3 vault assets, producing a false 14.97% warning. Current onchain values are approximately $7.50M backing / $37.78M deployed credit = 19.86%.

This also implements the actionable monitoring-side gaps from #281. Vault shutdown monitoring already covered both USD3 and sUSD3.

Companion indexer PR: chain-events/yearn-indexing-test#29

Validation

  • uv run pytest -q tests/test_3jane.py tests/test_timelock_alerts.py (13 passed)
  • uv run ruff check protocols/3jane/main.py protocols/timelock/timelock_alerts.py tests/test_3jane.py tests/test_timelock_alerts.py
  • uv run ruff format --check protocols/3jane/main.py protocols/timelock/timelock_alerts.py tests/test_3jane.py tests/test_timelock_alerts.py
  • read-only live mainnet RPC run with alert/check functions disabled

Repository-wide mypy still reports pre-existing errors in shared utility modules.

@spalen0 spalen0 changed the title fix: use deployed credit for 3Jane junior buffer fix: correct and extend 3Jane risk monitoring Jun 18, 2026
@spalen0 spalen0 marked this pull request as ready for review June 18, 2026 10:40
@spalen0 spalen0 requested a review from tapired June 18, 2026 11:17
@spalen0 spalen0 merged commit e6962b9 into main Jun 18, 2026
2 checks passed
@spalen0 spalen0 deleted the fix/3jane-junior-buffer branch June 18, 2026 11:34
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