Check Position & NAV

Query your ksUSD balance, the current share price, and the vault's NAV.


Your position

import { PublicKey } from "@solana/web3.js";
import { getAccount, getAssociatedTokenAddressSync } from "@solana/spl-token";

const [vaultPda] = PublicKey.findProgramAddressSync(
  [Buffer.from("vault")],
  PROGRAM_ID
);

const vault = await program.account.vault.fetch(vaultPda);
const userKsusdAta = getAssociatedTokenAddressSync(vault.ksusdMint, user.publicKey);
const ksusdAccount = await getAccount(connection, userKsusdAta);

const shares = BigInt(ksusdAccount.amount.toString());
console.log("Your ksUSD:", Number(shares) / 1e6);   // 6 decimals

Current share price

  • Initial share price: 1.000000

  • Drifts up monotonically as carry accrues (drawdowns excepted)

  • Performance fees charged only on net-new gains above the prior high-water mark (hwm_share_price_1e9 on the vault)


Your USDC-equivalent value


Vault-level NAV

  • cached_nav_usdc refreshes on every: deposit · withdrawal · fee collection · settle / attest_nav crank

  • Between cranks → reflects the last on-chain snapshot

  • Live unrealized P&L on Drift accrues into the next refresh


Pending queued withdrawal (if any)

PDA closes (and rent refunds) once the keeper calls process_withdrawal.


Last updated