pub struct MeteoraVault {
pub vault: Pubkey,
pub vault_token_account: Pubkey,
pub token_address: Pubkey,
pub lp_token_address: Pubkey,
pub last_updated_locked_profit: u64,
pub last_report: u64,
pub locked_profit_degradation: u64,
pub total_amount: u64,
pub lp_supply: u64,
}Expand description
Struct to hold data for Meteora vaults, which are used in Meteora AMMv1 and potentially Meteora DLMM pools.
Fields§
§vault: Pubkey§vault_token_account: Pubkey§token_address: Pubkey§lp_token_address: Pubkey§last_updated_locked_profit: u64§last_report: u64§locked_profit_degradation: u64§total_amount: u64§lp_supply: u64Implementations§
Source§impl MeteoraVault
impl MeteoraVault
Sourcepub fn calculate_withdrawable_amount(&self) -> u64
pub fn calculate_withdrawable_amount(&self) -> u64
Calculate the withdrawable amount from a Meteora vault
Accounts for locked profit degradation over time. The locked profit gradually becomes available based on the degradation rate and time since last report.
Source§impl MeteoraVault
impl MeteoraVault
Sourcepub fn update_vault_info(&mut self, central_context: Arc<CentralContext>)
pub fn update_vault_info(&mut self, central_context: Arc<CentralContext>)
Update vault information from on-chain account data
Fetches the vault account and updates all vault state including locked profit tracker, total amount, and LP token supply. Supports both big (10240 bytes) and small (1232 bytes) vault account formats.
Auto Trait Implementations§
impl Freeze for MeteoraVault
impl RefUnwindSafe for MeteoraVault
impl Send for MeteoraVault
impl Sync for MeteoraVault
impl Unpin for MeteoraVault
impl UnwindSafe for MeteoraVault
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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