Skip to content

feat: live protocol stats on homepage #6

Description

@EmeditWeb

Problem

The homepage shows hardcoded stats. The stats should
pull live data from the API and update automatically.

What To Build

Create src/hooks/useProtocolStats.ts that fetches:

  • Total pool value from GET /liquidity/pool
  • Active loans count from GET /loans/stats (or health)
  • Total vendors from GET /vendors?limit=1 (total count)

Show live stats in the hero section replacing the
hardcoded ones. Add a pulsing green dot next to
each live stat.

Show loading skeletons while fetching.
Show last updated timestamp below stats.

Files To Touch

  • src/hooks/useProtocolStats.ts (new)
  • src/pages/Home.tsx

Acceptance Criteria

  • Stats update from live API on page load
  • Loading skeletons shown while fetching
  • Error fallback shows last known values
  • Pulsing dot indicates live data

Mandatory Checks Before PR

  • npm run build passes
  • No any types
  • PR references this issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions