The waterfall
At each snapshot, the stack is revalued and the change is shared out in a fixed order.
Try it
Drag HLP's month
The formula
Let S, J and K be the senior, junior and cushion values, and T what the stack owns now: HLP equity plus the buffer plus money between chains, minus queued deposits and settled withdrawals.
due = S × cap × Δt / 1 year
S' = min(T, S + due)
sub = T − S'
if sub ≥ J + K: // a gain for the layers below the senior
g = sub − (J + K)
K' = K + g × 20%
J' = J + g × 80%
else: // a loss
l = (J + K) − sub
K' = K − min(K, l)
J' = J − (l − min(K, l))The same function runs in Tranches.split() on Elysium and in this site's simulator. The senior's accrual is owed every snapshot, so in a thin month the junior pays the gap; in a strong month the junior keeps the excess.
Order of losses
A loss lands on the cushion's accrued income, then on the junior. The senior's value only falls when T drops below S itself, which means the cushion and the junior are both at zero. After a junior loss, staked $VLTS can be sold to put USDC back into the junior; see the cushion.
Shares and rounding
Each tranche has one USDC of virtual value and virtual shares, so the first share prices at 1.0 and a wiped-out tranche never divides by zero. Prices are (value + 1) / (supply + 1) in USDC units.