Skip to main content

VaultState

Struct VaultState 

Source
#[repr(C)]
pub struct VaultState {
Show 44 fields pub vault_admin_authority: Pubkey, pub base_vault_authority: Pubkey, pub base_vault_authority_bump: u64, pub token_mint: Pubkey, pub token_mint_decimals: u64, pub token_vault: Pubkey, pub token_program: Pubkey, pub shares_mint: Pubkey, pub shares_mint_decimals: u64, pub token_available: u64, pub shares_issued: u64, pub available_crank_funds: u64, pub unallocated_weight: u64, pub performance_fee_bps: u64, pub management_fee_bps: u64, pub last_fee_charge_timestamp: u64, pub prev_aum_sf: PodU128, pub pending_fees_sf: PodU128, pub vault_allocation_strategy: [VaultAllocation; 25], pub padding_1: [PodU128; 256], pub min_deposit_amount: u64, pub min_withdraw_amount: u64, pub min_invest_amount: u64, pub min_invest_delay_slots: u64, pub crank_fund_fee_per_reserve: u64, pub pending_admin: Pubkey, pub cumulative_earned_interest_sf: PodU128, pub cumulative_mgmt_fees_sf: PodU128, pub cumulative_perf_fees_sf: PodU128, pub name: [u8; 40], pub vault_lookup_table: Pubkey, pub vault_farm: Pubkey, pub creation_timestamp: u64, pub unallocated_tokens_cap: u64, pub allocation_admin: Pubkey, pub withdrawal_penalty_lamports: u64, pub withdrawal_penalty_bps: u64, pub first_loss_capital_farm: Pubkey, pub allow_allocations_in_whitelisted_reserves_only: u8, pub allow_invest_in_whitelisted_reserves_only: u8, pub padding_2: [u8; 6], pub deposit_cap: u64, pub reward_info: VaultRewardInfo, pub padding_3: [PodU128; 232],
}
Expand description

Kamino Vault account state.

Fields§

§vault_admin_authority: Pubkey

Wallet authorised to manage the vault (update config, allocations, etc.).

§base_vault_authority: Pubkey

PDA that signs CPI calls on behalf of the vault.

§base_vault_authority_bump: u64

Bump seed for base_vault_authority.

§token_mint: Pubkey

SPL token mint for the vault’s underlying asset (e.g. USDC).

§token_mint_decimals: u64

Decimal places of token_mint.

§token_vault: Pubkey

Token account holding the vault’s uninvested (available) liquidity.

§token_program: Pubkey

Token program for token_mint (TOKEN_PROGRAM_ID or Token-2022).

§shares_mint: Pubkey

SPL mint for vault share tokens issued to depositors.

§shares_mint_decimals: u64

Decimal places of shares_mint.

§token_available: u64

Amount of underlying tokens currently available (not invested).

§shares_issued: u64

Total vault share tokens currently outstanding.

§available_crank_funds: u64

Tokens reserved for crank operation fees.

§unallocated_weight: u64

Weight assigned to the unallocated (idle) portion of the vault.

§performance_fee_bps: u64

Performance fee rate in basis points.

§management_fee_bps: u64

Annual management fee rate in basis points.

§last_fee_charge_timestamp: u64

Unix timestamp of the last fee charge.

§prev_aum_sf: PodU128

Previous assets under management as a scaled fraction (Fraction).

§pending_fees_sf: PodU128

Accrued but uncollected fees as a scaled fraction (Fraction).

§vault_allocation_strategy: [VaultAllocation; 25]

Per-reserve allocation slots. Active reserves have a non-default reserve pubkey.

§padding_1: [PodU128; 256]

Reserved for future use.

§min_deposit_amount: u64

Minimum token amount accepted for a deposit.

§min_withdraw_amount: u64

Minimum share amount accepted for a withdrawal.

§min_invest_amount: u64

Minimum token amount for an invest operation.

§min_invest_delay_slots: u64

Minimum number of slots between consecutive invest calls.

§crank_fund_fee_per_reserve: u64

Crank fee charged per reserve during invest operations.

§pending_admin: Pubkey

Wallet that has been nominated as the next admin (two-step transfer).

§cumulative_earned_interest_sf: PodU128

Cumulative interest earned by the vault, scaled fraction.

§cumulative_mgmt_fees_sf: PodU128

Cumulative management fees collected, scaled fraction.

§cumulative_perf_fees_sf: PodU128

Cumulative performance fees collected, scaled fraction.

§name: [u8; 40]

Human-readable vault name (UTF-8, up to 40 bytes).

§vault_lookup_table: Pubkey

Address lookup table for the vault’s accounts.

§vault_farm: Pubkey

Kamino Farms state for the vault’s share token farm.

§creation_timestamp: u64

Unix timestamp when the vault was created.

§unallocated_tokens_cap: u64

Maximum amount of tokens that can remain unallocated.

§allocation_admin: Pubkey

Wallet authorised to manage allocations (may differ from vault_admin_authority).

§withdrawal_penalty_lamports: u64

Flat withdrawal penalty in lamports.

§withdrawal_penalty_bps: u64

Withdrawal penalty in basis points.

§first_loss_capital_farm: Pubkey

Farm state for first-loss capital providers.

§allow_allocations_in_whitelisted_reserves_only: u8

When non-zero, allocations are restricted to whitelisted reserves only.

§allow_invest_in_whitelisted_reserves_only: u8

When non-zero, invest is restricted to whitelisted reserves only.

§padding_2: [u8; 6]

Reserved for future use.

§deposit_cap: u64

Total vault deposit cap; 0 means uncapped (for backward compatibility). This is a soft cap that only blocks new deposits — the vault AUM can still grow above it through earned interest.

§reward_info: VaultRewardInfo

Reward distribution state (VaultRewardInfo).

§padding_3: [PodU128; 232]

Reserved for future use.

Trait Implementations§

Source§

impl Clone for VaultState

Source§

fn clone(&self) -> VaultState

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for VaultState

Source§

impl Debug for VaultState

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Pod for VaultState

Source§

impl SplDiscriminate for VaultState

Source§

const SPL_DISCRIMINATOR: ArrayDiscriminator

The 8-byte discriminator as a [u8; 8]
Source§

const SPL_DISCRIMINATOR_SLICE: &'static [u8] = _

The 8-byte discriminator as a slice (&[u8])
Source§

impl Zeroable for VaultState

Source§

fn zeroed() -> Self

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyBitPattern for T
where T: Pod,

Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

Source§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
Source§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Src, Dst> LosslessTryInto<Dst> for Src
where Dst: LosslessTryFrom<Src>,

Source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
Source§

impl<Src, Dst> LossyInto<Dst> for Src
where Dst: LossyFrom<Src>,

Source§

fn lossy_into(self) -> Dst

Performs the conversion.
Source§

impl<T> NoUninit for T
where T: Pod,

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.