Skip to content

Add stYFI to portfolio#1314

Open
rossgalloway wants to merge 9 commits into
mainfrom
codex/portfolio-staked-yfi
Open

Add stYFI to portfolio#1314
rossgalloway wants to merge 9 commits into
mainfrom
codex/portfolio-staked-yfi

Conversation

@rossgalloway

@rossgalloway rossgalloway commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR adds non-vault Yearn positions to the portfolio page:

  • staked YFI and delegated staked YFI
  • liquid-locker and migrated veYFI positions
  • the non-compounding yCRV boosted staker that pays rewards in crvUSD vault shares

YFI and yCRV balances are displayed with USD-denominated values in a shared Other Positions section. A note beneath the section explains that these balances are not included in the charts or headline totals above.

YFI APYs are sourced from the governance stats feed at https://data.dao-ops.com/prod/stats.json, proxied through app/api/governance/global-data/route.ts. The yCRV row reads the user balance, total supply, active APR, and boost directly from the boosted-staker contracts. It uses portfolio spot prices when available and falls back to yDaemon pricing for yCRV and yvcrvUSD.

stYFI rewards and claimable yvcrvUSD-2 rewards are shown in the portfolio rewards tab and can be claimed there. The rewards notification includes both reward sources.

Motivation and Context

Users have requested visibility into stYFI positions. The portfolio also previously omitted balances held in the non-compounding yCRV boosted staker, even when its claimable rewards were visible. This change makes both sets of Yearn positions discoverable from the portfolio while preserving the existing vault-only behavior for charts and aggregate balances.

How Has This Been Tested?

  • ran the portfolio test suite locally (62 tests)
  • ran TypeScript, lint, and a production build
  • tested locally against wallets with multiple YFI positions
  • verified the yCRV position and claimable rewards for a wallet with an active boosted-staker balance

To test, visit the portfolio page with a wallet holding staked YFI, migrated veYFI, liquid-locker tokens, or a non-compounding staked yCRV position. The balances should appear under Other Positions. stYFI and yvcrvUSD-2 rewards should appear and be claimable in the rewards tab.

Screenshots

Portfolio positions image

Surface governance staking balances alongside vault holdings in the portfolio.\n\n- Fetch and derive stYFI, veYFI, and liquid-locker positions\n- Include governance value and APY in portfolio totals and sorting\n- Add focused derivation and row-rendering coverage
@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
yearnfi Ready Ready Preview, Comment Jul 21, 2026 7:00pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
yearnfi-nextjs Ignored Ignored Preview Jul 21, 2026 7:00pm
yearnfi-nextjs-2 Ignored Ignored Preview Jul 21, 2026 7:00pm

Request Review

@github-actions

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@rossgalloway rossgalloway changed the title Codex/portfolio staked yfi Add stYFI to portfolio Jul 15, 2026
Show non-compounding yCRV stake balances and claimable yvcrvUSD
rewards in the portfolio.

- Read boosted staker balances, APR, boost, TVL, and rewards
- Fall back to yDaemon pricing when spot prices are unavailable
- Reuse a shared protocol row for YFI and yCRV positions
- Group excluded balances under Other Positions
Resolve the portfolio holdings conflicts while preserving weighted yvUSD APY details and the combined YFI and yCRV positions table.
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