Skip to main content

Tranche Model

A tranching market separates one yield asset into two LP tokens.
TrancheRoleRisk profile
SeniorReceives more protected exposure to the underlying SY assetLower expected return, protected by Junior capital until coverage is exhausted
JuniorProvides first-loss protection to SeniorHigher expected return, absorbs losses first
Senior protection is not unlimited. It is bounded by the effective Junior NAV available in the market. The market tracks raw NAV and effective NAV for each tranche. rawNAV=SY amount×SY exchange rate\text{rawNAV} = \text{SY amount} \times \text{SY exchange rate} In raw program values, SY amount is in raw SY token units and SY exchange rate is a Number fixed-point value. Converting the Number scale does not apply token mint decimals. Raw NAV follows the current value of the SY assigned to each tranche. Effective NAV is the value assigned after the waterfall applies gains, losses, recovery balances, fees, and return allocation. LP share prices are based on effective NAV.

Coverage

Coverage measures how much Junior value protects Senior exposure. Each market has a minCoverage parameter that defines the minimum protection ratio required by the market. The SDK also exposes a target coverage ratio. The program uses a fixed target utilization of 90%, so: targetCoverage=minCoverage0.9\text{targetCoverage} = \frac{\text{minCoverage}}{0.9} For example, if minCoverage is 0.20, the target coverage ratio is about 0.2222.

Utilization

Utilization measures how stretched Junior protection is relative to the minimum coverage requirement. U=minCoverage×(srRawNAV+β×jrRawNAV)jrEffectiveNAVU = \frac{\text{minCoverage} \times (\text{srRawNAV} + \beta \times \text{jrRawNAV})}{\text{jrEffectiveNAV}} The contract applies this formula with fixed-point ceiling arithmetic: protectedExposure=srRawNAV+ceilFixed(jrRawNAV×β)\text{protectedExposure} = \text{srRawNAV} + \operatorname{ceilFixed}(\text{jrRawNAV} \times \beta) U=ceilFixed(minCoverage×protectedExposurejrEffectiveNAV)U = \operatorname{ceilFixed}\left(\frac{\text{minCoverage} \times \text{protectedExposure}}{\text{jrEffectiveNAV}}\right)
TermDescription
srRawNAVSenior raw net asset value
jrRawNAVJunior raw net asset value
jrEffectiveNAVJunior NAV after loss, recovery, and return allocation
betaJunior-side exposure weight used by the risk config
minCoverageMinimum protection requirement
If Senior raw NAV is zero, utilization is zero. If Junior effective NAV is zero while Senior raw NAV is non-zero, utilization saturates to the maximum raw fixed-point value. Higher utilization means Junior protection is more scarce. The return model clamps utilization to 1.0 when calculating the marginal return share.

Return Curves

The return model maps utilization to the share of Senior-side residual yield allocated to Junior. juniorReturnShare=f(U)\text{juniorReturnShare} = f(U) Senior receives the remainder: seniorReturnShare=1juniorReturnShare\text{seniorReturnShare} = 1 - \text{juniorReturnShare} Tranching supports two curve types:
  • Point curve - stores explicit utilization points and linearly interpolates between them.
  • Utilization-guided curve - starts from a target Junior share at 90% utilization and can shift over time when utilization stays away from target.
See Return Curves for formulas and examples.

Market State Model

Tranching uses product-level states that map to onchain accounting transitions.

Normal State

The Normal State is the standard operating mode. Deposits and withdrawals are evaluated against coverage, capacity, and pause checks, and yield is distributed through the active return curve. This state is stored onchain as Active.

Recovery Period

The Recovery Period can begin after a covered negative NAV event. It gives Junior time to recover covered Senior losses if the underlying asset recovers. Senior withdrawals are paused during the Recovery Period. Junior withdrawals can still be allowed if they do not reduce coverage below the market’s required protection level. This state is stored onchain as FixedTermRecovery. It can be disabled with fixedTermDurationSec = 0.

Settlement

Settlement is not a separate onchain state. It is the forced transition back to Active after the market sync has already applied losses and recovery accounting. During sync, the program first applies NAV losses through the waterfall. Junior absorbs Senior-side losses up to available Junior effective NAV. Any residual Senior loss reduces Senior effective NAV. After that accounting is complete, the settlement transition clears jr_impermanent_loss, resets fixed_term_end_ts, and leaves the market in Active. Settlement can happen when the fixed-term recovery period is disabled, when it has elapsed, when utilization reaches liquidationUtilization, or when Senior has unrecovered impermanent loss.

Liquidation Threshold

The Liquidation Threshold determines when the Recovery Period is skipped. If utilization reaches liquidationUtilization, the program applies the settlement transition instead of waiting for recovery.

Loss and Gain Waterfalls

Losses are transferred in order:
  1. Junior absorbs losses first.
  2. Senior-side losses are covered by Junior effective NAV.
  3. If Junior protection is exhausted, residual loss reduces Senior effective NAV.
Gains first repair outstanding loss balances before becoming distributable yield.
Gain sourceFirst useResidual use
Junior gainRecover Senior impermanent lossIncrease Junior effective NAV
Senior gainRecover Senior impermanent loss, then Junior impermanent lossSplit residual yield by the return curve
See Return Curves for concrete gain and loss examples.

Fee Structure

Fees are configured per market and accrue as LP shares. The accrued LP shares are minted to the configured protocolFeeRecipient through mintProtocolFeeShares.
Config fieldDescription
srProtocolFeeFee charged on Senior-side yield retained by Senior
jrProtocolFeeFee charged on Junior-side raw appreciation retained by Junior
juniorReturnProtocolFeeFee charged on Senior-side residual return allocated to Junior
seniorDepositProtocolFeeFee charged on Senior LP shares minted during deposit
juniorDepositProtocolFeeFee charged on Junior LP shares minted during deposit
seniorWithdrawProtocolFeeFee charged on Senior LP shares burned during withdrawal
juniorWithdrawProtocolFeeFee charged on Junior LP shares burned during withdrawal
Yield fees accrue only while the resulting market state is Active. During the Recovery Period, protocol fee accrual from market updates is paused. For integration-facing fee formulas and raw/display units, see Units and Fees.

LP Share Pricing

LP shares are priced against effective NAV. lpPrice=effectiveNAV+1NAVtotalLpSupply+1\text{lpPrice} = \left\lfloor \frac{\text{effectiveNAV} + 1_{\text{NAV}}}{\text{totalLpSupply} + 1} \right\rfloor The virtual terms make first deposits and empty-supply cases well-defined. In normalized formulas, 1_NAV is one NAV unit. In SDK raw bigint values, it is 1_000_000_000_000. For deposits: grossLpOut=valueAllocated×(currentLpSupply+1)navToMintAt+1NAV\text{grossLpOut} = \left\lfloor \frac{\text{valueAllocated} \times (\text{currentLpSupply} + 1)}{\text{navToMintAt} + 1_{\text{NAV}}} \right\rfloor valueAllocated is the deposited SY amount multiplied by the current SY exchange rate. Deposit fees are charged in LP shares: netLpOut=grossLpOutgrossLpOut×depositFee\text{netLpOut} = \text{grossLpOut} - \left\lceil \text{grossLpOut} \times \text{depositFee} \right\rceil The total LP supply increases by grossLpOut, while the user receives netLpOut. Withdrawals first subtract the withdrawal fee from the burned LP amount, then scale the tranche’s asset claims by the remaining LP amount over totalLpSupply + 1.