Skip to content

feat(portfolio): chart share of all LPT with and without staking - #877

Open
adamsoffer wants to merge 1 commit into
portfolio-value-chartfrom
portfolio-supply-share
Open

adamsoffer wants to merge 1 commit into
portfolio-value-chartfrom
portfolio-supply-share

Conversation

@adamsoffer

Copy link
Copy Markdown
Collaborator

Note

Stacked on #875 (value chart), which is stacked on #867. Review only this PR's own changes.

What

The Network share tab now charts the portfolio's share of all LPT, next to what the same LPT would be had it been held without staking. New LPT is minted every round, so holding without staking is a shrinking share of the supply, while staking's rewards keep pace with it. This is the case for staking in units that don't depend on price.

Network share tab on the full history of late claimer 0x427d…55b6, with the tooltip open on Apr 5, 2025

Late claimer 0x427d…55b6, Network share → All. Staked, its share grew from about 0.0065% to 0.0134% of all LPT; the same 1,624 LPT held without staking would now be 0.0027%.

How it's counted

  • The same flows as the Value chart (feat(portfolio): chart value with and without staking #875). "With staking" is stake plus LPT taken out, which counts as if kept. "Without staking" is the LPT deposited. Both are divided by that round's total supply, and no prices are needed.
  • Share of active stake (voting weight) moves to the tooltip. It was the tab's main line; the tooltip now shows it alongside the total supply and the LPT behind each line. If supply data is missing, the tab falls back to the old chart.
  • Incomplete supply is left out. The subgraph's first Arbitrum rounds (2466–2468) report about 12.9M LPT, about half the real supply, before the rest was bridged at round 2469. A round whose supply is under 90% of the next round's is skipped, so the chart doesn't open with a false spike.

Changes

  • rounds now fetch totalSupply; RoundPoint and SeriesPoint carry it (both optional), and the mock subgraph serves it.
  • supplyShareSeries in lib/portfolio/value.ts, with 4 new tests.
  • The Network share tab in components/portfolio/hero.tsx: two lines, the tooltip and a caption.

Testing

  • 304 tests pass; typecheck and lint are clean.
  • Checked in the browser on 0x427d…55b6 at desktop and phone width: the tooltip math matches (4,374 LPT ÷ 41.8M = 0.0105%), there's no horizontal scroll, and there are no console errors.

🤖 Generated with Claude Code

The Network share tab now charts the portfolio's share of total LPT
supply, next to what the same LPT deposited, unstaked, would be: new LPT
is minted every round, so holding without staking is a shrinking share
of the supply, and staking's rewards keep pace with it. Counted as the
value chart is (LPT taken out counts as kept; deposits from the same
per-round flows), with no prices needed.

- Rounds carry the subgraph's totalSupply, and the series its supply.
- Rounds whose supply is well below the next round's are left out: the
  subgraph's first Arbitrum rounds (before 2469) count about half the
  supply, the rest not yet bridged.
- The tooltip keeps the share of active stake (voting weight) and shows
  the total supply and the LPT behind each line; a caption sums it up.
- Without supply data, the tab falls back to share of active stake.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
explorer-arbitrum-one Ready Ready Preview Nov 17, 2026 4:48pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview — 6a635c67 Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant