pub struct StakingPool {Show 18 fields
pub authority: Pubkey,
pub token_mint: Pubkey,
pub reward_mint: Pubkey,
pub pool_token_account: Pubkey,
pub reward_token_account: Pubkey,
pub reward_rate: u64,
pub lock_duration: i64,
pub total_staked: u64,
pub total_rewards_distributed: u64,
pub bump: u8,
pub is_active: bool,
pub created_at: i64,
pub tensor_enabled: u8,
pub s_max: u64,
pub entropy_weight: u64,
pub total_entangled_stakes: u32,
pub total_pool_entropy: u64,
pub average_coherence: u64,
}Expand description
A staking pool that holds staked tokens and distributes rewards. Each pool has its own configuration, token accounts, and reward parameters.
Fields§
Authority/admin who can update pool configuration
token_mint: PubkeyMint of the token being staked in this pool
reward_mint: PubkeyMint of the reward token (may be same as token_mint)
pool_token_account: PubkeyPool’s token account holding staked tokens
reward_token_account: PubkeyPool’s token account holding rewards to distribute
reward_rate: u64Reward amount per unit time (in lamports per slot)
lock_duration: i64Minimum lock duration for stakes (in seconds)
total_staked: u64Total tokens currently staked in this pool
total_rewards_distributed: u64Cumulative rewards distributed from this pool
bump: u8PDA bump seed for this account
is_active: boolWhether this pool is accepting new stakes
created_at: i64Timestamp when this pool was created
tensor_enabled: u8Whether tensor network enhancements are enabled for this pool
s_max: u64Maximum entropy target for this pool (1e6 scale)
entropy_weight: u64Weight factor for entropy in reward calculations (1e6 scale)
total_entangled_stakes: u32Number of stakes participating in entanglement
total_pool_entropy: u64Sum of all stake entropy contributions
average_coherence: u64Average coherence preservation across all pool members
Trait Implementations§
Source§impl AccountDeserialize for StakingPool
impl AccountDeserialize for StakingPool
Source§fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize(buf: &mut &[u8]) -> Result<Self>
Mint account into a token
Account.Source§fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
fn try_deserialize_unchecked(buf: &mut &[u8]) -> Result<Self>
Source§impl AccountSerialize for StakingPool
impl AccountSerialize for StakingPool
Source§impl BorshDeserialize for StakingPool
impl BorshDeserialize for StakingPool
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for StakingPoolwhere
Pubkey: BorshSerialize,
u64: BorshSerialize,
i64: BorshSerialize,
u8: BorshSerialize,
bool: BorshSerialize,
u32: BorshSerialize,
impl BorshSerialize for StakingPoolwhere
Pubkey: BorshSerialize,
u64: BorshSerialize,
i64: BorshSerialize,
u8: BorshSerialize,
bool: BorshSerialize,
u32: BorshSerialize,
Source§impl Clone for StakingPool
impl Clone for StakingPool
Source§fn clone(&self) -> StakingPool
fn clone(&self) -> StakingPool
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Discriminator for StakingPool
impl Discriminator for StakingPool
const DISCRIMINATOR: [u8; 8]
fn discriminator() -> [u8; 8]
Source§impl Space for StakingPool
impl Space for StakingPool
const INIT_SPACE: usize
Auto Trait Implementations§
impl Freeze for StakingPool
impl RefUnwindSafe for StakingPool
impl Send for StakingPool
impl Sync for StakingPool
impl Unpin for StakingPool
impl UnsafeUnpin for StakingPool
impl UnwindSafe for StakingPool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more