#[repr(C)]pub struct Treasury {
pub daily_jackpot: u64,
pub weekly_jackpot: u64,
pub buyback: u64,
pub last_close_price: i64,
pub last_close_expo: i32,
pub _pad_close: [u8; 4],
pub last_close_publish_time: i64,
pub stability_reserve: u64,
pub daily_accrual: u64,
}Fields§
§daily_jackpot: u64Today’s playable daily vault (T+1 locked at UTC midnight via AdminRotateDailyVault).
weekly_jackpot: u64Weekly accrual bucket — debited on weekly disbursement, then finalized to stability.
buyback: u64Buyback reserve (10% of ticket sales).
last_close_price: i64Close price from the most recently settled period — used as the open reference
for the next settlement. Zero until Initialize seeds it.
last_close_expo: i32Pyth exponent matching last_close_price.
_pad_close: [u8; 4]§last_close_publish_time: i64publish_time from the Pyth feed at last settlement.
stability_reserve: u64Stability reserve — excess weekly accrual + 60% of routed trading fees (brief v2).
daily_accrual: u64T+1 accrual bucket — ticket 70% during UTC day D; rotated into daily_jackpot at day end.
Implementations§
Source§impl Treasury
impl Treasury
Sourcepub const LEGACY_BODY_LEN: usize = 48
pub const LEGACY_BODY_LEN: usize = 48
Body length before stability_reserve (deployed accounts pre-0.3.12).
Sourcepub const PRE_DAILY_ACCRUAL_BODY_LEN: usize = 56
pub const PRE_DAILY_ACCRUAL_BODY_LEN: usize = 56
Body length before daily_accrual (accounts with stability, pre-0.3.17).
pub fn pda() -> (Pubkey, u8)
Sourcepub fn decode_account_data(data: &[u8]) -> Result<Self, &'static str>
pub fn decode_account_data(data: &[u8]) -> Result<Self, &'static str>
Decode raw treasury account data (8-byte Steel discriminator + body).
Trait Implementations§
Source§impl AccountValidation for Treasury
impl AccountValidation for Treasury
fn assert<F>(&self, condition: F) -> Result<&Self, ProgramError>
fn assert_err<F>( &self, condition: F, err: ProgramError, ) -> Result<&Self, ProgramError>
fn assert_msg<F>(&self, condition: F, msg: &str) -> Result<&Self, ProgramError>
fn assert_mut<F>(&mut self, condition: F) -> Result<&mut Self, ProgramError>
fn assert_mut_err<F>( &mut self, condition: F, err: ProgramError, ) -> Result<&mut Self, ProgramError>
fn assert_mut_msg<F>( &mut self, condition: F, msg: &str, ) -> Result<&mut Self, ProgramError>
impl Copy for Treasury
Source§impl Discriminator for Treasury
impl Discriminator for Treasury
fn discriminator() -> u8
impl Pod for Treasury
impl StructuralPartialEq for Treasury
Auto Trait Implementations§
impl Freeze for Treasury
impl RefUnwindSafe for Treasury
impl Send for Treasury
impl Sync for Treasury
impl Unpin for Treasury
impl UnsafeUnpin for Treasury
impl UnwindSafe for Treasury
Blanket Implementations§
Source§impl<T> AccountDeserialize for Twhere
T: Discriminator + Pod,
impl<T> AccountDeserialize for Twhere
T: Discriminator + Pod,
fn try_from_bytes(data: &[u8]) -> Result<&T, ProgramError>
fn try_from_bytes_mut(data: &mut [u8]) -> Result<&mut T, ProgramError>
Source§impl<T> AccountHeaderDeserialize for Twhere
T: Discriminator + Pod,
impl<T> AccountHeaderDeserialize for Twhere
T: Discriminator + Pod,
fn try_header_from_bytes(data: &[u8]) -> Result<(&T, &[u8]), ProgramError>
fn try_header_from_bytes_mut( data: &mut [u8], ) -> Result<(&mut T, &mut [u8]), ProgramError>
impl<T> AnyBitPattern for Twhere
T: Pod,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
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
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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