Skip to content

refactor(morpho): GraphQL-only V2 markets monitoring#321

Open
spalen0 wants to merge 2 commits into
mainfrom
morpho-v2-graphql-no-rpc
Open

refactor(morpho): GraphQL-only V2 markets monitoring#321
spalen0 wants to merge 2 commits into
mainfrom
morpho-v2-graphql-no-rpc

Conversation

@spalen0

@spalen0 spalen0 commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Rewrite markets_v2.py to drop RPC: one vaultV2s query loads TVL/liquidity/MorphoMarketV1 positions, then one markets query per chain for state/bad debt
  • Remove Base OUSD Vault V2 from config (all funds sit in monitored V1 via MetaMorpho adapter)
  • Fail the run on non-MorphoMarketV1 adapters or truncated adapter/position pages
  • Live compare: risk scores match prior RPC path; runtime ~17s → ~2s

Test plan

  • pytest tests/test_morpho_markets.py
  • Local python protocols/morpho/markets_v2.py vs prior run — identical risk scores
  • Confirm hourly CI job still green after merge

Made with Cursor

spalen0 and others added 2 commits July 23, 2026 22:00
Drop per-vault RPC adapter walks in favor of one vaultV2s query plus
batched market metrics, and remove OUSD V2 (funds live in V1).

Co-authored-by: Cursor <cursoragent@cursor.com>
Add main() batching/failure tests, a MorphoMarketV1 happy-path parse
case, document zero-supply skips, and drop the dead TVL guard.

Co-authored-by: Cursor <cursoragent@cursor.com>
@spalen0
spalen0 marked this pull request as ready for review July 24, 2026 15:39
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