Skip to content

test: show fee mints can leave held shares below the protected amount - #26

Merged
jayeshy14 merged 1 commit into
mainfrom
test/fee-floor-breach
Sep 24, 2026
Merged

jayeshy14 merged 1 commit into
mainfrom
test/fee-floor-breach

Conversation

@jayeshy14

Copy link
Copy Markdown
Owner

Adds test/FeeFloorBreach.t.sol, which shows that fee mints can leave shares held to maturity below their protected amount.

settleTerm asks 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.

Test Setup Reported shortfall navPerShare after fees
stepRatchet_endsBelowProtected STEP90 steps protection to 1.125, maturity at 1.13 0 1.1046
tippLock_endsBelowLock LOCKED80 locks 1.2, maturity at 1.21 0 1.1694
chargedWhileShortfallReported Fixed90 term 2 protects 1.35, ends at 1.30 0.05/share 1.2803, fee still minted
staleMarkChargesEarlierTermGains fee off in term 1 leaves the mark at 1.00, then turned on 0 1.2916 vs 1.35
pushesFlooredVaultBelowProtected Fixed90 at exactly 0.90 at maturity, 200 bps management fee > 0, all from the fee 0.8824

The 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 test passes on this branch (non-fork suite), and forge fmt --check is clean.

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.
@jayeshy14
jayeshy14 merged commit d45b8d3 into main Sep 24, 2026
3 checks passed
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