Skip to content

feat(3jane): add USD3/sUSD3 monitoring#161

Open
spalen0 wants to merge 3 commits intomainfrom
3jane
Open

feat(3jane): add USD3/sUSD3 monitoring#161
spalen0 wants to merge 3 commits intomainfrom
3jane

Conversation

@spalen0
Copy link
Collaborator

@spalen0 spalen0 commented Mar 10, 2026

Summary

  • Add monitoring for 3Jane protocol (credit-based money market, modified Morpho Blue fork) per 3jane monitoring #160
  • Tracks USD3 (senior tranche) and sUSD3 (junior/first-loss tranche) ERC-4626 vaults on Ethereum mainnet
  • Monitors 5 key risk signals: PPS decreases, TVL changes, junior buffer ratio, vault shutdown, and debt cap changes
  • Uses batched RPC calls (6 reads in 1 batch) for efficiency, runs hourly

Monitoring Checks

Check Alert Condition Why It Matters
PPS (Price Per Share) Any decrease in USD3 or sUSD3 Indicates loan markdowns or defaults — critical since loans are unsecured
TVL >15% change in USD3 or sUSD3 totalAssets Large deposits/withdrawals or protocol-level events
Junior Buffer sUSD3 < 15% of USD3 TVL Thin first-loss coverage puts senior tranche at risk
Vault Shutdown isShutdown() becomes true (alert-once) Emergency shutdown activated
Debt Cap Any change to ProtocolConfig.getDebtCap() Governance scaling the protocol up or down

Current Live Values

  • USD3 TVL: $22.90M, PPS: 1.15556
  • sUSD3 TVL: $7.04M (in USD3), PPS: 1.06624
  • Junior buffer: 30.76% (healthy, well above 15% threshold)
  • Debt cap: $8.65M

Test plan

  • Script runs successfully with live on-chain data
  • Caching works correctly (second run shows matching previous values, no spurious alerts)
  • Ruff format and lint pass
  • No mypy errors in 3jane code
  • Verify Telegram alerts work with configured bot token/chat ID

Closes #160

🤖 Generated with Claude Code

spalen0 and others added 3 commits March 10, 2026 11:30
Add monitoring for 3Jane protocol — a credit-based money market on Ethereum
(modified Morpho Blue fork) with unsecured lending via credit lines.

Monitors:
- USD3 and sUSD3 price per share (alerts on any decrease)
- TVL changes for both tranches (alerts on >15% change)
- Junior tranche buffer ratio (alerts when sUSD3 < 15% of USD3 TVL)
- Vault emergency shutdown status (alert-once pattern)
- ProtocolConfig debt cap changes

Closes #160

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 3Jane's 24-hour TimelockController (0x1dCcD4628d48a50C1A7adEA3848bcC869f08f8C2)
to the monitored timelocks list. This catches contract upgrades, governance
changes, and emergency actions before they execute.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
spalen0 added a commit to chain-events/yearn-indexing-test that referenced this pull request Mar 10, 2026
Add 3Jane's 24-hour TimelockController (0x1dccd4628d48a50c1a7adea3848bcc869f08f8c2)
on Ethereum mainnet. Uses the existing TimelockController handler — no schema
or code changes needed.

Related monitoring PR: yearn/monitoring-scripts-py#161

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@spalen0
Copy link
Collaborator Author

spalen0 commented Mar 10, 2026

Linked PRs

Deploy order: Envio indexer first (to start indexing events), then this monitoring PR.

spalen0 added a commit to chain-events/yearn-indexing-test that referenced this pull request Mar 10, 2026
Add 3Jane's 24-hour TimelockController (0x1dccd4628d48a50c1a7adea3848bcc869f08f8c2)
on Ethereum mainnet. Uses the existing TimelockController handler — no schema
or code changes needed.

Related monitoring PR: yearn/monitoring-scripts-py#161

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@spalen0 spalen0 marked this pull request as ready for review March 10, 2026 10:51
@spalen0 spalen0 requested a review from tapired March 10, 2026 10:51
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.

3jane monitoring

1 participant