Overview
⚠️ Depends on: #44 (GF-12 — Data Service Layer).
Build the /analytics page showing live protocol-wide metrics, and update the landing page stats bar to use real data instead of hardcoded values.
Problem
The landing page stats bar in app/src/app/page.tsx shows hardcoded static values:
<span className={styles.statValue}>4</span> // always "4"
<span className={styles.statValue}>1.40×</span> // always "1.40×"
<span className={styles.statValue}>0%</span> // always "0%"
<span className={styles.statValue}>35%</span> // always "35%"
These should reflect live protocol data (TVL, APY, depositor count). Additionally, no /analytics page exists for in-depth protocol stats — common on comparable DeFi protocols like Beefy Finance and Yearn Finance.
Proposed Solution
1. Create app/src/app/analytics/page.tsx
Protocol overview cards (top row):
- Total TVL (aggregate across all vaults)
- Current best APY (highest 7-day trailing APY across tiers)
- Total yield harvested to date
- Total number of unique depositors
TVL breakdown chart
A stacked bar or area chart showing TVL per vault tier over time (7d, 30d, all-time range selector).
APY per vault table
| Vault |
Current APY |
7-Day APY |
30-Day APY |
| Flex |
X% |
X% |
X% |
| L3 |
X% |
X% |
X% |
| L6 |
X% |
X% |
X% |
| L12 |
X% |
X% |
X% |
Harvest history feed
A chronological list of harvest events:
- Date/ledger
- Total yield harvested
- Bounty paid (10 bps)
- Caller address
Deposit/withdrawal activity chart
Net capital flow (deposits minus withdrawals) per day over the last 30 days.
2. Update landing page stats bar
Replace the four hardcoded stat values with live data:
- Total TVL (from
useTVL())
- Best current APY (from
useAPY())
- Protocol fee: keep as
0% (correct, hardcoded is fine here)
- Max pool exposure: keep as
35% (correct, hardcoded is fine here)
Add Portfolio link to the nav for the analytics page.
Acceptance Criteria
Overview
Build the
/analyticspage showing live protocol-wide metrics, and update the landing page stats bar to use real data instead of hardcoded values.Problem
The landing page stats bar in
app/src/app/page.tsxshows hardcoded static values:These should reflect live protocol data (TVL, APY, depositor count). Additionally, no
/analyticspage exists for in-depth protocol stats — common on comparable DeFi protocols like Beefy Finance and Yearn Finance.Proposed Solution
1. Create
app/src/app/analytics/page.tsxProtocol overview cards (top row):
TVL breakdown chart
A stacked bar or area chart showing TVL per vault tier over time (7d, 30d, all-time range selector).
APY per vault table
Harvest history feed
A chronological list of harvest events:
Deposit/withdrawal activity chart
Net capital flow (deposits minus withdrawals) per day over the last 30 days.
2. Update landing page stats bar
Replace the four hardcoded stat values with live data:
useTVL())useAPY())0%(correct, hardcoded is fine here)35%(correct, hardcoded is fine here)Add
Portfoliolink to the nav for the analytics page.Acceptance Criteria
/analyticspage exists with all four overview stat cards showing live data