Repository navigation
recover H1/H2 onto main (stacked-merge fix) - #14
Merged
Merged
Conversation
Audit H1/H2: the performance fee was charged on (nav - protectedAmount), i.e. NAV above the 90% floor, so a flat term (nav 100 vs floor 90) or a losing term (nav 95) still minted a 'performance' fee; and because every new term re-strikes the floor at 0.9x current nav with no minimum term, a keeper could loop settleTerm->startTerm to mint ~perfBps*(1-P) of NAV per cycle indefinitely. Fix: the performance fee is now charged only on the rise in navPerShare above a per-share high-water mark, which then ratchets up. Flat/losing terms and re-struck terms where navPerShare has not advanced pay zero, and gains are never double-charged across terms. HWM is seeded at the first startTerm's entry price. Also added a 7-day MIN_TERM_DURATION in the controller as anti-churn defense-in-depth. Composes with the H3 per-share design (deposits never move navPerShare, so the basis is clean). Regression tests: no fee on flat/losing terms, HWM holds across terms, min-term blocks 1-second churn. 116 -> 120.
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.
PR #13 was merged into its base branch
fix/h3-per-share-floorrather than main (the recurring stacked-PR footgun), so the H1/H2 high-water-mark fee + minimum-term-duration fix never reached main (highWaterPerShareWadwas absent). This cherry-picks the single H1/H2 commit (578a767) cleanly onto current main. Suite 116 -> 120, green. See #13 for the full finding/fix description.