feat(treasury): In DeFi — net worth by right, not token-in-wallet - #291
Merged
Conversation
Stock next to the flow: a new card reads every protocol position the treasury owns directly from chain state — ERC-4626 vault shares held by the treasury (convertToAssets of ITS balance, never totalAssets, which is everyone's money), its SplitsWarehouse balances, its verified share of undistributed non-vault split balances, and MOR staked in the Gnars Builders subnet. The vault-fee-in-splits row REUSES the stake graph's gnarsAccrued — one truth shared with the Sponsorship card. Spec rules wired in: a failed read renders as a failure (amber), never as 0; a legitimate zero renders as $0 with liquidity context; the vault-shares zero carries its explanation (the treasury never deposits — supporters do) so nobody 'fixes' it into rendering depositor money. The Total KPI becomes wallet + DeFi with the split named beneath it, and an incomplete DeFi read keeps the total as a labeled floor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@sktbrd is attempting to deploy a commit to the r4to's projects Team on Vercel. A member of the Team first needs to authorize it. |
2 tasks
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.
Summary
Implements the shared three-surface spec (Gnars/SkateHive/SOPA) on /treasury: the page now shows stock (what the treasury owns in protocol positions) next to the flow it already attributes.
convertToAssetsof the treasury's OWN share balance — nevertotalAssets), treasury's SplitsWarehouse balances, its verified percentage of undistributed non-vault split balances, and MOR staked in the Gnars Builders subnet (treasury + interim multisig), each with its exit path (permissionless / via proposal / locked until date).gnarsAccrued— the same figure the Sponsorship card prints. No second computation.Today's honest numbers: In wallet ~$34.4k · In DeFi $0.01 (fee shares parked in rider splits; everything else legitimately zero — measured on-chain, cross-checked independently by the operator).
Changes
src/services/treasury-defi.ts(+ tests for the unknown-propagation fold)src/components/treasury/TreasuryDefi.tsx,TreasuryKpiRow.tsx,page.tsxmessages/{en,pt-br}/treasury.json—defiblock + KPI keys, both localesTest plan
Generated with Claude Code