1. Find the market
2. Deposit shares
3. Claim yield
Each time someone cranksupdate_rewards, your YT’s share of accumulated yield
grows. Claim with:
4. Redeem PT at maturity
Afterclock.unix_timestamp ≥ market.maturity:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Turn vault shares into transferable principal and yield tokens.
import { findMarketPda, fetchMarket } from '@/app/generated/split-engine/accounts';
const [market] = await findMarketPda({
vault: vaultPda,
maturity: BigInt(maturityTs),
});
const marketAccount = await fetchMarket(rpc, market);
import { getDepositInstruction, findUserPositionPda }
from '@/app/generated/split-engine/instructions';
const [userPosition] = await findUserPositionPda({ market, owner: wallet.address });
const ix = getDepositInstruction({
user: wallet,
market,
userPosition,
vaultShareMint: marketAccount.vaultShareMint,
ptMint: marketAccount.ptMint,
ytMint: marketAccount.ytMint,
vaultShareEscrow: marketAccount.vaultShareEscrow,
userVaultShareAta,
userPtAta,
userYtAta,
amount: 1_000_000_000n, // 1,000 shares (9 decimals)
});
update_rewards, your YT’s share of accumulated yield
grows. Claim with:
import { getClaimYieldInstruction } from '@/app/generated/split-engine/instructions';
const ix = getClaimYieldInstruction({
user: wallet,
market,
userPosition,
vaultShareEscrow: marketAccount.vaultShareEscrow,
userVaultShareAta,
});
clock.unix_timestamp ≥ market.maturity:
import { getRedeemPtInstruction } from '@/app/generated/split-engine/instructions';
const ix = getRedeemPtInstruction({
user: wallet,
market,
ptMint: marketAccount.ptMint,
vaultShareEscrow: marketAccount.vaultShareEscrow,
userPtAta,
userVaultShareAta,
amount: 1_000_000_000n,
});
import { getEarlyExitInstruction } from '@/app/generated/split-engine/instructions';
