Skip to main content

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 class exposes several getter properties for reading market state after loading. No additional RPC calls are required — these read from the locally loaded vault state.

Usage

import { Vault, LOCAL_ENV } from "@exponent-labs/exponent-sdk";
import { Connection, PublicKey } from "@solana/web3.js";

const connection = new Connection("https://api.mainnet-beta.solana.com");
const vault = await Vault.load(LOCAL_ENV, connection, vaultAddress);

// SY exchange rate
console.log("Exchange rate:", vault.currentSyExchangeRate);

// Maturity info
console.log("Expiration timestamp:", vault.expirationTimestamp);
console.log("Expiration date:", vault.expirationDate);

// Token mints
console.log("PT mint:", vault.mintPt.toBase58());
console.log("YT mint:", vault.mintYt.toBase58());
console.log("SY mint:", vault.mintSy.toBase58());

// SY balance held in the vault
console.log("SY balance:", vault.syBalance);

Available Properties

PropertyTypeDescription
currentSyExchangeRatenumberCurrent SY to underlying exchange rate
expirationTimestampnumberUNIX timestamp (seconds) at which the vault expires
expirationDateDateJavaScript Date at which the vault expires
mintPtPublicKeyPT token mint address
mintYtPublicKeyYT token mint address
mintSyPublicKeySY token mint address
syBalancebigintTotal SY balance held in the vault’s escrow
authorityPublicKeyVault authority PDA
escrowSyPublicKeySY escrow token account
escrowYtPublicKeyYT escrow token account
addressLookupTablePublicKeyAddress lookup table for the vault

Refreshing State

To fetch the latest onchain state, call reload:
await vault.reload(connection);
console.log("Updated rate:", vault.currentSyExchangeRate);