Skip to content

Fix Staked assets not showing up and not being withdrawable#1089

Closed
rossgalloway wants to merge 23 commits intomainfrom
fix-staking-to-always-show-withdraw-path
Closed

Fix Staked assets not showing up and not being withdrawable#1089
rossgalloway wants to merge 23 commits intomainfrom
fix-staking-to-always-show-withdraw-path

Conversation

@rossgalloway
Copy link
Collaborator

@rossgalloway rossgalloway commented Feb 26, 2026

Better description coming tomorrow:

Some staked positions do not show up in the portfolio view and cannot be withdrawn via the usual methods. This PR makes sure they are discoverable and can be withdrawn easily. Because old staking contracts are not always picked up by enso, we can't rely on them to provide routes from them. So we fall back to the old unstake/withdraw logic from staked vaults (including yBOLD)

This PR also includes commits from #1056 which shows strategies that were not previously showing up and gets prices for them. unfortunately, the practice where strategies are not being endorsed, but are still able to be deposited into (and are deposited into by advanced users) is causing issues. We don't have any metadata levers on strategies to force them to be recognized as yearn, so the only way to show them is to pull in all erc-4626 and show them if the user has deposits in them. But now we have to deal with random 4626 strategies showing up in our portfolio and vault lists if users have them in their wallets. So I added tags for non-yearn vault list rows and a warning on non-yearn vault pages that they are not yearn vaults.

Also included in this PR is a change to how hidden vaults are shown. They are now hidden in the portfolio view unless actively turned on in the vault filters. We need to go through the current set of hidden vaults in CMS and unhide any that should still be shown. There are a number than are hidden and retired, but should probably only be hidden. I'll do that tomorrow.

I know this commit is a bear so put your clankers on overtime.

@vercel
Copy link

vercel bot commented Feb 26, 2026

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

Project Deployment Actions Updated (UTC)
yearnfi Ready Ready Preview, Comment Mar 9, 2026 4:05pm

Request Review

@github-actions
Copy link

github-actions bot commented Feb 26, 2026

Dependency Review

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

Scanned Files

None

@rossgalloway rossgalloway marked this pull request as ready for review March 6, 2026 03:40
@rossgalloway
Copy link
Collaborator Author

ready-ish for review

Removed 4 unnecessary files (-925 lines):
  - scripts/audit-kong-vault-inclusion.ts — diagnostic CLI tool
  - scripts/find-stakers.ts — diagnostic CLI tool
  - staking-holder-enumeration-runbook.md — AI session working notes
  - package.json — removed the 2 script entries for the above

  Fixed bug in useWallet.tsx:
  - The useMemo for cumulated vault values called getVaultHoldingsUsd() but didn't include it in the dependency
  array. It had [allVaults, balances, getBalance, getPrice, getToken] — missing stakingConvertedAssets which
  getVaultHoldingsUsd depends on. Changed to [allVaults, balances, getVaultHoldingsUsd] which correctly tracks all
  upstream dependencies through the callback reference.
@rossgalloway
Copy link
Collaborator Author

squashed and pointed at the new release branch in #1103

@rossgalloway
Copy link
Collaborator Author

included in #1093

@rossgalloway rossgalloway deleted the fix-staking-to-always-show-withdraw-path branch March 12, 2026 18:32
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.

2 participants