Source
- Audit doc: docs/audits/260105-data-services-analysis-tooling-audit.md
- Date: 2026-01-05
Executive Summary
Data is aggregated from multiple sources (GraphQL, REST timeseries, yDaemon, APR oracle). To reach “professional data product” quality, the next steps are explicit provenance/“as-of” metadata, contract validation for timeseries, batching for consistent snapshots, and analyst tooling (export/compare/annotations).
Top Risks
- Metrics are combined without explicit provenance or snapshot timing, making results hard to trust/reproduce.
- Timeseries contract is implicit (cadence/time units), risking incorrect derived APR/APY.
- Vault page depends on 6–7 calls; scaling analysis features will multiply latency and failure modes.
TODO-Ready Specs (from audit)
TODO 1 — Add metric provenance + “as-of” metadata (P0)
- Where: VaultsContext, useVaultPageData, vault detail route, main info panel, strategies, charts.
- Goal: each metric exposes source + as-of + methodology.
- Acceptance: 1d APY, strategy est APY, charts show provenance.
TODO 2 — Formalize timeseries contract + runtime validation (P0)
- Where: src/lib/timeseries-api.ts, src/hooks/useRestTimeseries.ts, src/lib/utils.ts
- Goal: explicit timeUnit/period/alignment/asOf; validate payloads; warn on invalid cadence.
- Acceptance: invalid timestamps block derived APR/APY and show warning.
TODO 3 — Add batch “vault analytics” endpoint (P1)
- Goal: reduce vault page to ≤2 requests (ideal 1) with unified snapshot + provenance.
- Options: BFF endpoint or upstream multi-series timeseries API.
TODO 4 — Add observability + data health indicators (P1)
- Goal: centralized error telemetry + UI indicator for staleness/partial data.
TODO 5 — Add export + compare features for analyst workflows (P1)
- Goal: CSV/JSON export for charts/strategies; multi-vault comparison view; chart annotations.
Questions / Assumptions
- Can we run a small BFF, or must the site remain static-only?
- Primary analysis user persona (internal vs public)?
- Expected data freshness SLAs?
- Should exports include provenance metadata?
Source
Executive Summary
Data is aggregated from multiple sources (GraphQL, REST timeseries, yDaemon, APR oracle). To reach “professional data product” quality, the next steps are explicit provenance/“as-of” metadata, contract validation for timeseries, batching for consistent snapshots, and analyst tooling (export/compare/annotations).
Top Risks
TODO-Ready Specs (from audit)
TODO 1 — Add metric provenance + “as-of” metadata (P0)
TODO 2 — Formalize timeseries contract + runtime validation (P0)
TODO 3 — Add batch “vault analytics” endpoint (P1)
TODO 4 — Add observability + data health indicators (P1)
TODO 5 — Add export + compare features for analyst workflows (P1)
Questions / Assumptions