Senior cap and ratio bounds
Two numbers set the shape of the stack. Both are fixed in the constructor and cannot change.
The 8% cap
capBps = 800. The senior accrues 8% a year on its value, pro rata to the time between snapshots. It sits under HLP's long-run APR, so in most months the junior has room left after paying it.
The 20% floor
juniorMinBps = 2000. The junior must be at least 20% of senior plus junior. A senior deposit that would push the junior under 20% waits in its queue; a junior withdrawal that would do the same waits too. Junior deposits and senior withdrawals always go through, because they raise the ratio.
Losses can take the junior under 20%. Nothing is forced then; new senior money simply waits until junior money arrives.
Junior leverage
At the floor, every 1% HLP makes or loses moves the junior by about 5%, before the senior's accrual and the cushion's share. With more junior money the leverage falls: at 30% it is about 3.3x.