Skip to content

fix: display actual vault token balance instead of underlying#89

Merged
bowd merged 1 commit intomainfrom
feat/fix-susds-amount
Jan 29, 2026
Merged

fix: display actual vault token balance instead of underlying#89
bowd merged 1 commit intomainfrom
feat/fix-susds-amount

Conversation

@bowd
Copy link
Contributor

@bowd bowd commented Jan 29, 2026

Summary

  • Fix vault token display to show actual token balance (e.g., sUSDS) instead of underlying asset amount (e.g., USDS)
  • Previously showed "1,050,000 sUSDS" when it was actually the USDS underlying amount
  • Now correctly shows the vault token balance with proper USD value calculation

Affected Assets

Asset Chain Description
sUSDS Ethereum Savings USDS
stEUR Celo Staked agEUR

Changes

  • ethereum.balance-fetcher.ts: Use tokenBalance for display instead of underlyingBalance
  • celo.balance-fetcher.ts: Same change for Celo chain
  • erc20-balance-fetcher.ts: Updated comments to reflect new usage

Test plan

  • Verify sUSDS balance on reserve holdings shows actual sUSDS token amount
  • Verify stEUR balance shows actual stEUR token amount
  • Verify USD values are still calculated correctly

🤖 Generated with Claude Code

Previously, vault tokens (sUSDS, stEUR) displayed the underlying asset
amount from maxWithdraw() but labeled it with the vault token symbol.
This was confusing since "1,050,000 sUSDS" was actually showing USDS.

Now we display the actual vault token balance (balanceOf) which matches
the symbol shown. The USD value calculation remains correct as it uses
the vault token price from DefiLlama.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bowd bowd merged commit 9776afe into main Jan 29, 2026
1 check passed
@bowd bowd deleted the feat/fix-susds-amount branch January 29, 2026 13:13
@github-actions
Copy link

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://analytics-api-preview-feat-fix-susds-amount-a4neydykmq-uc.a.run.app/docs

📝 Details:

  • Service: analytics-api-preview-feat-fix-susds-amount
  • Commit: 2aa3432
  • Branch: feat/fix-susds-amount
  • Updated: 1/29/2026, 1:16:23 PM UTC

This preview will be automatically updated with each new commit to this PR and will be deleted when the PR is merged or closed.

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