Stop showing unwithdrawable yield as earnings - #76
Open
Enochthedev wants to merge 1 commit into
Open
Conversation
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.
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.
Closes GHO-55.
The staked caption read
+11.5596 earned. The figure it sat under iscollateralValue— 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
settledYieldis a claim against assets that do not exist", and the cap is what stops that becoming borrowable collateral. It stays.lib/stake.tsderives the uncovered part fromtotalLedgerValuevscollateralValue, 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.min()cannot put a solvency warning on a healthy position.8 new tests against the live Sepolia numbers from the issue. Detail in ADR 0043 and runbook Part 7.50.