Skip to main content
split-engine takes any yield-bearing vault share and mints two tradable SPL tokens: PT (redeems 1:1 at maturity) and YT (receives all yield accrued before maturity).

Accounts

Market

["market", vault, maturity].

UserPosition

["position", market, owner].

Instructions

MasterChef flow

This guarantees every YT holder earns exactly the yield accrued while they held, regardless of when others join or leave.

update_rewards

Anyone can crank:
  1. Read vault.share_price().
  2. delta = share_price - last_vault_share_price.
  3. If delta > 0: reward_per_share += delta × PRECISION / total_yt_supply (clamped at 1 if supply=0).
  4. last_vault_share_price = share_price.
Negative share-price movement does not decrement reward_per_share, losses are already absorbed at the vault layer (insurance fund + NAV).

Errors

NotMatured, AlreadyMatured, SupplyInvariantViolated, NoYieldToClaim, MathOverflow.

PT / YT concept

Why split, worked example.

yield-amm

Where PT and underlying trade.