Tranche Model
A tranching market separates one yield asset into two LP tokens.| Tranche | Role | Risk profile |
|---|---|---|
| Senior | Receives more protected exposure to the underlying SY asset | Lower expected return, protected by Junior capital until coverage is exhausted |
| Junior | Provides first-loss protection to Senior | Higher expected return, absorbs losses first |
NAV Accounting
The market tracks raw NAV and effective NAV for each tranche. 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 aminCoverage 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:
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. The contract applies this formula with fixed-point ceiling arithmetic:| Term | Description |
|---|---|
srRawNAV | Senior raw net asset value |
jrRawNAV | Junior raw net asset value |
jrEffectiveNAV | Junior NAV after loss, recovery, and return allocation |
beta | Junior-side exposure weight used by the risk config |
minCoverage | Minimum protection requirement |
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. Senior receives the remainder: 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.
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 asActive.
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 asFixedTermRecovery. It can be disabled with fixedTermDurationSec = 0.
Settlement
Settlement is not a separate onchain state. It is the forced transition back toActive 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 reachesliquidationUtilization, the program applies the settlement transition instead of waiting for recovery.
Loss and Gain Waterfalls
Losses are transferred in order:- Junior absorbs losses first.
- Senior-side losses are covered by Junior effective NAV.
- If Junior protection is exhausted, residual loss reduces Senior effective NAV.
| Gain source | First use | Residual use |
|---|---|---|
| Junior gain | Recover Senior impermanent loss | Increase Junior effective NAV |
| Senior gain | Recover Senior impermanent loss, then Junior impermanent loss | Split residual yield by the return curve |
Fee Structure
Fees are configured per market and accrue as LP shares. The accrued LP shares are minted to the configuredprotocolFeeRecipient through mintProtocolFeeShares.
| Config field | Description |
|---|---|
srProtocolFee | Fee charged on Senior-side yield retained by Senior |
jrProtocolFee | Fee charged on Junior-side raw appreciation retained by Junior |
juniorReturnProtocolFee | Fee charged on Senior-side residual return allocated to Junior |
seniorDepositProtocolFee | Fee charged on Senior LP shares minted during deposit |
juniorDepositProtocolFee | Fee charged on Junior LP shares minted during deposit |
seniorWithdrawProtocolFee | Fee charged on Senior LP shares burned during withdrawal |
juniorWithdrawProtocolFee | Fee charged on Junior LP shares burned during withdrawal |
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. 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:
valueAllocated is the deposited SY amount multiplied by the current SY exchange rate.
Deposit fees are charged in LP shares:
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.