Documentation Index
Fetch the complete documentation index at: https://v2-docs.exponent.finance/llms.txt
Use this file to discover all available pages before exploring further.
The Vault account stores all state for a yield stripping vault, including token mints, escrow accounts, exchange rates, treasury balances, emissions, and configuration.
Status Flags
const STATUS_CAN_STRIP: u8 = 0b0000_0001;
const STATUS_CAN_MERGE: u8 = 0b0000_0010;
const STATUS_CAN_DEPOSIT_YT: u8 = 0b0000_0100;
const STATUS_CAN_WITHDRAW_YT: u8 = 0b0000_1000;
const STATUS_CAN_COLLECT_INTEREST: u8 = 0b0001_0000;
const STATUS_CAN_COLLECT_EMISSIONS: u8 = 0b0010_0000;
Vault
pub struct Vault {
/// Link to SY program
pub sy_program: Pubkey,
/// Mint for SY token
pub mint_sy: Pubkey,
/// Mint for the vault-specific YT token
pub mint_yt: Pubkey,
/// Mint for the vault-specific PT token
pub mint_pt: Pubkey,
/// Escrow account for holding deposited YT
pub escrow_yt: Pubkey,
/// Escrow account that holds temporary SY tokens
/// As an interchange between users and the SY program
pub escrow_sy: Pubkey,
/// Link to a vault-owned YT position
/// This account collects yield from all "unstaked" YT
pub yield_position: Pubkey,
/// Address lookup table key for vault
pub address_lookup_table: Pubkey,
/// Start timestamp
pub start_ts: u32,
/// Seconds duration
pub duration: u32,
/// Seed for CPI signing
pub signer_seed: Pubkey,
/// Authority for CPI signing
pub authority: Pubkey,
/// Bump for signer authority PDA
pub signer_bump: [u8; 1],
/// Last seen SY exchange rate
/// Continues to be updated after vault maturity to track SY appreciation
pub last_seen_sy_exchange_rate: Number,
/// All time high exchange rate for SY
pub all_time_high_sy_exchange_rate: Number,
/// Exchange rate for SY when the vault expires
pub final_sy_exchange_rate: Number,
/// How much SY is held in escrow
pub total_sy_in_escrow: u64,
/// Total SY set aside to back PT holders
pub sy_for_pt: u64,
/// Total supply of PT
pub pt_supply: u64,
/// Amount of SY staged for the treasury
pub treasury_sy: u64,
/// SY earned by YT but not yet collected
pub uncollected_sy: u64,
/// Treasury SY token account address
pub treasury_sy_token_account: Pubkey,
/// Interest fee in basis points
pub interest_bps_fee: u16,
/// Minimum operation size for stripping
pub min_op_size_strip: u64,
/// Minimum operation size for merging
pub min_op_size_merge: u64,
/// Status flags bitmask
pub status: u8,
/// Emission reward configurations
pub emissions: Vec<EmissionInfo>,
/// CPI account configuration for SY program
pub cpi_accounts: CpiAccounts,
/// Claim rate limiting configuration
pub claim_limits: ClaimLimits,
/// Maximum PT + YT supply
pub max_py_supply: u64,
}
EmissionInfo
Tracks a single emission reward token associated with the vault.
pub struct EmissionInfo {
/// Token account for the emission (vault authority owned)
pub token_account: Pubkey,
/// Initial index when emission was added
pub initial_index: Number,
/// Most recently observed emission index from SY state
pub last_seen_index: Number,
/// Last claimable index after vault expires
pub final_index: Number,
/// Treasury token account for this reward
pub treasury_token_account: Pubkey,
/// Fee taken from emission collecting (basis points)
pub fee_bps: u16,
/// Accumulated treasury emission rewards
pub treasury_emission: u64,
}
ClaimLimits
Rate limiting configuration for interest and emission claims.
pub struct ClaimLimits {
/// Start timestamp of the current claim window
pub claim_window_start_timestamp: u32,
/// Total amount claimed in current window
pub total_claim_amount_in_window: u64,
/// Maximum claim amount allowed per window
pub max_claim_amount_per_window: u64,
/// Duration of each claim window in seconds
pub claim_window_duration_seconds: u32,
}
Key Concepts
Exchange Rates
The vault tracks three exchange rates:
last_seen_sy_exchange_rate — Most recent SY exchange rate observed
all_time_high_sy_exchange_rate — Highest exchange rate ever observed
final_sy_exchange_rate — Rate at vault expiration (stops updating after maturity)
Vault Lifecycle
A vault is active when current_ts >= start_ts && current_ts <= start_ts + duration. After expiration, post-maturity SY appreciation and emissions are directed to the treasury.