Repository navigation
test: show fee mints can leave held shares below the protected amount - #26
Merged
Merged
Conversation
Covers the performance fee under Step and TIPP ratchets, the fee charged while a shortfall is reported, the high-water mark left at its seed while the fee is off, and the management fee on a vault held at the floor. The tests assert current behaviour and are expected to fail once fees are capped at the cushion above the floor.
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.
Adds
test/FeeFloorBreach.t.sol, which shows that fee mints can leave shares held to maturity below their protected amount.settleTermasks the controller for the shortfall first and then mints the performance fee against the high-water mark. Nothing caps that fee at the cushion above the floor. The management fee accrual has the same gap. Each test brings the vault to a state where NAV meets the promise before fees and then checks navPerShare after settlement.stepRatchet_endsBelowProtectedtippLock_endsBelowLockchargedWhileShortfallReportedstaleMarkChargesEarlierTermGainspushesFlooredVaultBelowProtectedThe tests use the existing mock legs and executor and set leg values directly to reach each maturity NAV, so they cover the fee arithmetic and not the market path to it.
They assert current behaviour, so they are expected to fail once the fix lands. The fix should turn them into invariant checks: navPerShare after fees stays at or above the protected amount (the TIPP lock included), and the reported shortfall matches the real one.
forge testpasses on this branch (non-fork suite), andforge fmt --checkis clean.