P5-W3: Protocol / TVL Pack — Gold datasets, protocol activity and TVL analytics#129
P5-W3: Protocol / TVL Pack — Gold datasets, protocol activity and TVL analytics#129user1303836 merged 1 commit intomainfrom
Conversation
… TVL endpoints (P5-W3) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Entire-Checkpoint: e7b6f974cd94
Remote Review — P5-W3: Protocol / TVL PackVerdict: No blocking issues. Clear from PR-comment review perspective. Review against focus areas
Non-blocking observations
SummaryClean implementation. Follows established patterns from P5-W1 and P5-W2. Proper Gold materialization with genuine protocol-level enrichment. TVL nullable handling is correct. Auth, migration, additive-only, and backward compatibility criteria all met. Ready to merge once CI completes green. |
Summary
protocol_eventsandpool_snapshotsdatasets materialized from Silverdecoded_eventsandtoken_transferscompute_protocol_events(),compute_pool_snapshots(),build_protocol_activity(), andbuild_tvl_analytics()functions in newadapters/src/protocol_analytics.rs/v1/analytics/protocol/activityand/v1/analytics/protocol/tvlbehind authprotocol_eventsandpool_snapshotstables with appropriate indexes,IF NOT EXISTSguards, and foreign keysQUERYABLE_DATASETSandEXPORTABLE_DATASETSextended to 12 entries each;DatasetName::all()returns 13 datasets (7 Silver + 6 Gold)Validation
cargo fmtandcargo clippycleanProtocolEventcorrectly classifies decoded events by type (swap/mint/burn/liquidity_added/liquidity_removed/transfer/other) with protocol_address mappingPoolSnapshotcaptures reserve state with optional TVLProtocolActivityaggregation produces correct event counts, unique participants, and time rangesTvlAnalyticsproduces per-pool and aggregate TVL with latest-snapshot dedupTest plan
cargo fmt --all --check— cleancargo clippy --workspace --all-targets -- -D warnings— cleancargo test --workspace— 915 tests pass🤖 Generated with Claude Code