Skip to content

Implement GET /api/analytics/protocol for global protocol stats #119

@1nonlypiece

Description

@1nonlypiece

Description

Provide protocol‑level analytics for dashboards: total commitments, TVL, active vs settled, average compliance, etc.

Implementation Requirements

  • Path: src/app/api/analytics/protocol/route.ts.
  • Query on‑chain data (and/or caches) to compute:
    • totalCommitments, activeCommitments, violatedCommitments, settledCommitments.
    • totalValueCommitted, averageDurationDays, averageComplianceScore.
  • Return all in a single JSON payload.

Acceptance Criteria

  • Endpoint returns protocol analytics (even if partially mocked with clear TODOs).
  • Uses shared response format.
  • Efficient enough for periodic polling.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions