Read a user’s vault position with the kvault-interface crate: look up their share balance and value it in underlying tokens using the vault’s current exchange rate (AUM ÷ shares issued).
This only counts shares held in the user’s share ATA. If the vault has a share farm (VaultState::vault_farm is set), most users keep their shares staked in the farm, so a complete implementation must also read the staked balance from vault.vault_farm (Kamino Farms) and add it.
Queries transaction history for a specific user and vault over a time range. Returns time-series data including position changes and transaction details.
Queries cumulative performance metrics for a user across all vaults over a time range. Returns aggregated time-series data including total positions and earnings.
Retrieves historical performance metrics for a specific user and vault. Returns time-series data including shares, APY, and cumulative interest earned.
Queries historical profit and loss data for a user’s vault position. Returns transaction-level PnL history with cost basis, realized gains, and position values.