Skip to content

Commit 980adf0

Browse files
sktbrdclaude
andauthored
fix(treasury): sponsorship card counts Morpheus stakes in Staked (#290)
The per-rider TVL column read vaultTvl (Morpho only), so a rider backed purely through Morpheus showed a dash here while the /stake orbit lit him up with $31 — the same two-answers bug 861b390 fixed for the headline, one table lower. The column now prints the athlete's `total` (vault + Morpheus, the orbit node's own figure) under a header renamed to "Staked", and the total row is the graph's headline `total` — never a second sum. Yield stays vault-fee-only: it is the only per-rider-attributable earning; the MOR half lives in the headline. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 48bdc99 commit 980adf0

3 files changed

Lines changed: 16 additions & 13 deletions

File tree

messages/en/treasury.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@
106106
"title": "Sponsorship yield",
107107
"desc": "Everything the riders earn the treasury: the vaults’ performance fee plus MOR from the Morpheus stake. Depositors keep their principal — only the yield is split.",
108108
"colRider": "Rider",
109-
"colTvl": "Vault TVL",
109+
"colTvl": "Staked",
110110
"colYield": "Vault yield",
111-
"totalTvl": "Total vault TVL",
111+
"totalTvl": "Total staked",
112112
"openTitle": "Anyone can do this now",
113113
"openDesc": "Distributing the split and pushing the balance to the treasury are both permissionless — no vote needed. Any wallet can trigger them.",
114114
"govDesc": "Only converting those shares to USDC needs a proposal: the treasury is a timelock, and ERC-4626 lets nobody else redeem on its behalf.",

messages/pt-br/treasury.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@
106106
"title": "Rendimento de patrocínio",
107107
"desc": "Tudo que os riders rendem pro tesouro: a taxa de performance dos vaults mais o MOR do stake na Morpheus. Quem deposita mantém o principal — só o rendimento é dividido.",
108108
"colRider": "Rider",
109-
"colTvl": "TVL do vault",
109+
"colTvl": "Em stake",
110110
"colYield": "Rendimento do vault",
111-
"totalTvl": "TVL total dos vaults",
111+
"totalTvl": "Total em stake",
112112
"openTitle": "Qualquer um pode fazer agora",
113113
"openDesc": "Distribuir o split e empurrar o saldo pro tesouro são os dois permissionless — não precisa de votação. Qualquer carteira dispara.",
114114
"govDesc": "Só converter essas shares em USDC exige proposta: o tesouro é um timelock, e o ERC-4626 não deixa mais ninguém resgatar no lugar dele.",

src/components/treasury/SponsorshipYield.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,15 @@ export function SponsorshipYield({ brlRate = null }: { brlRate?: number | null }
9797
split: r.split,
9898
// The split holds the whole fee; the treasury's half is what this column is about.
9999
yieldUsd: a ? a.feeAccrued / 2 : null,
100-
// `vaultTvl`, NOT `total`: the performance fee accrues on the Morpho
101-
// balance alone, so pairing the yield with a MOR-inclusive figure would
102-
// invite reading a return rate off two unrelated numbers.
103-
tvl: a ? a.vaultTvl : null,
100+
// `total` (vault + Morpheus stake) — the SAME figure the orbit node
101+
// prints, so a rider backed purely through Morpheus (Will's MOR stake)
102+
// no longer reads as having nothing behind him here while /stake lights
103+
// him up. The yield column stays vault-fee-only because that is the only
104+
// per-rider-attributable earning — the MOR half of the treasury's take
105+
// exists only as the graph-level aggregate in the headline above. The
106+
// header says "Staked", not "Vault TVL", for exactly this reason: these
107+
// two columns answer different questions and must not be read as a rate.
108+
tvl: a ? a.total : null,
104109
};
105110
});
106111

@@ -112,9 +117,9 @@ export function SponsorshipYield({ brlRate = null }: { brlRate?: number | null }
112117
const treasuryTotal = graph?.treasuryUsd ?? 0;
113118
const vaultShare = graph?.gnarsAccrued ?? 0;
114119
const morShare = graph?.gnarsMorUsd ?? 0;
115-
// One source of truth: `vaultTvl` is each vault's own `totalAssets()`,
116-
// straight off the shared graphno second TVL field to drift.
117-
const totalTvl = rows.reduce((s, r) => s + (r.tvl ?? 0), 0);
120+
// One source of truth: the graph's own headline total (vault + Morpheus),
121+
// the identical number the orbit printsnever a second sum to drift.
122+
const totalTvl = graph?.total ?? 0;
118123
const claimable = rows.filter((r) => r.split && (r.yieldUsd ?? 0) > 0);
119124

120125
return (
@@ -206,8 +211,6 @@ export function SponsorshipYield({ brlRate = null }: { brlRate?: number | null }
206211
</ul>
207212
</div>
208213

209-
{/* Deliberately NOT the orbit node's figure, which also carries the
210-
rider's MOR stake and would not belong under a fee-earning column. */}
211214
<div className="flex items-baseline justify-between gap-2.5 border-t border-border pt-3">
212215
<span className="text-xs text-muted-foreground">{t("totalTvl")}</span>
213216
<span className="font-mono text-sm font-semibold tabular-nums">

0 commit comments

Comments
 (0)