Skip to content

Stop showing unwithdrawable yield as earnings - #76

Open
Enochthedev wants to merge 1 commit into
mainfrom
wavedidwhat/gho-55-the-dashboard-shows-yield-that-cannot-be-withdrawn-as-if-it
Open

Stop showing unwithdrawable yield as earnings#76
Enochthedev wants to merge 1 commit into
mainfrom
wavedidwhat/gho-55-the-dashboard-shows-yield-that-cannot-be-withdrawn-as-if-it

Conversation

@Enochthedev

Copy link
Copy Markdown
Collaborator

Closes GHO-55.

The staked caption read +11.5596 earned. The figure it sat under is collateralValue — already capped at redeemable — so the line claimed the yield was money and that it was money on top of the whole of what can be withdrawn.

Not a contract bug. The vault says "no rewards ever flow in, so settledYield is a claim against assets that do not exist", and the cap is what stops that becoming borrowable collateral. It stays.

  • lib/stake.ts derives the uncovered part from totalLedgerValue vs collateralValue, rather than asserting it in copy — a funded vault stops warning with no string edit.
  • credited, not redeemable, not "not yet": there is no schedule that would fund it.
  • A dust floor, so a wei of rounding on a min() cannot put a solvency warning on a healthy position.
  • Green comes off the Accrued yield figure while the ledger is uncovered.
  • Rate named beside it — 11.71 at four decimals reads as volatile until you know it is 5% APR on 21,000.

8 new tests against the live Sepolia numbers from the issue. Detail in ADR 0043 and runbook Part 7.50.

The pipeline summary captioned the staked figure "+11.5596 earned". That
figure is collateralValue, already capped at what the shares can redeem,
so the caption claimed the yield was money and that it was money on top of
the whole of what can be withdrawn. On Sepolia maxWithdraw equalled the
principal exactly and none of it was ever withdrawable.

The cap is correct and stays — it is what stops unfunded yield becoming
borrowable collateral. This reads totalLedgerValue beside collateralValue
and derives the uncovered part, so a funded vault stops warning without
anyone editing copy. "Credited, not redeemable", because "not yet"
promises a schedule that does not exist.

A dust floor keeps a wei of rounding on a min() from putting a solvency
warning on a healthy position.
@linear-code

linear-code Bot commented Aug 28, 2026

Copy link
Copy Markdown

GHO-55

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