pub struct TunaConfig {Show 18 fields
pub discriminator: [u8; 8],
pub version: u16,
pub bump: u8,
pub admin_authority: Pubkey,
pub fee_recipient: Pubkey,
pub owner_authority: Pubkey,
pub max_swap_slippage: u32,
pub max_percentage_of_leftovers: u32,
pub suspend_lending_deposits: bool,
pub suspend_lending_withdrawals: bool,
pub suspend_add_liquidity: bool,
pub suspend_remove_liquidity: bool,
pub liquidator_authority: Pubkey,
pub oracle_price_deviation_threshold: u32,
pub default_protocol_fee_rate: u16,
pub default_liquidation_fee_rate: u32,
pub default_rebalance_fee_rate: u32,
pub reserved: [u8; 166],
}Fields§
§discriminator: [u8; 8]§version: u16Struct version.
bump: u8Bump seed for the vaults config account.
Current update authority address for both the TunaConfig and the Vault PDAs themselves - can be updated.
fee_recipient: PubkeyFee recipient address.
Owner of the program. Can change ownership and set the admin of the program.
max_swap_slippage: u32Maximum allowed swap slippage percentage.
max_percentage_of_leftovers: u32Maximum allowed percentage of leftovers.
suspend_lending_deposits: boolSuspends lending deposits in case of emergency.
suspend_lending_withdrawals: boolSuspends lending withdrawals in case of emergency.
suspend_add_liquidity: boolSuspends adding liquidity to positions in case of emergency.
suspend_remove_liquidity: boolSuspends removing liquidity, claiming fees and closing positions in case of emergency.
Liquidation bot wallet.
oracle_price_deviation_threshold: u32Maximum allowed oracle price deviation in percent.
default_protocol_fee_rate: u16The default protocol fee rate.
default_liquidation_fee_rate: u32The default liquidation fee rate.
default_rebalance_fee_rate: u32The default rebalance fee rate.
reserved: [u8; 166]Reserved
Implementations§
Trait Implementations§
Source§impl BorshDeserialize for TunaConfigwhere
[u8; 8]: BorshDeserialize,
u16: BorshDeserialize,
u8: BorshDeserialize,
Pubkey: BorshDeserialize,
u32: BorshDeserialize,
bool: BorshDeserialize,
[u8; 166]: BorshDeserialize,
impl BorshDeserialize for TunaConfigwhere
[u8; 8]: BorshDeserialize,
u16: BorshDeserialize,
u8: BorshDeserialize,
Pubkey: BorshDeserialize,
u32: BorshDeserialize,
bool: BorshDeserialize,
[u8; 166]: BorshDeserialize,
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 TunaConfigwhere
[u8; 8]: BorshSerialize,
u16: BorshSerialize,
u8: BorshSerialize,
Pubkey: BorshSerialize,
u32: BorshSerialize,
bool: BorshSerialize,
[u8; 166]: BorshSerialize,
impl BorshSerialize for TunaConfigwhere
[u8; 8]: BorshSerialize,
u16: BorshSerialize,
u8: BorshSerialize,
Pubkey: BorshSerialize,
u32: BorshSerialize,
bool: BorshSerialize,
[u8; 166]: BorshSerialize,
Source§impl Clone for TunaConfig
impl Clone for TunaConfig
Source§fn clone(&self) -> TunaConfig
fn clone(&self) -> TunaConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TunaConfig
impl Debug for TunaConfig
Source§impl PartialEq for TunaConfig
impl PartialEq for TunaConfig
Source§impl<'a> TryFrom<&AccountInfo<'a>> for TunaConfig
impl<'a> TryFrom<&AccountInfo<'a>> for TunaConfig
impl Eq for TunaConfig
impl StructuralPartialEq for TunaConfig
Auto Trait Implementations§
impl Freeze for TunaConfig
impl RefUnwindSafe for TunaConfig
impl Send for TunaConfig
impl Sync for TunaConfig
impl Unpin for TunaConfig
impl UnwindSafe for TunaConfig
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
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<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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
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