Add stYFI to portfolio#1314
Open
rossgalloway wants to merge 9 commits into
Open
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
rossgalloway
marked this pull request as ready for review
July 16, 2026 16:19
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds non-vault Yearn positions to the portfolio page:
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?
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