#[repr(C)]pub struct LendingMarket {Show 51 fields
pub version: u64,
pub bump_seed: u64,
pub lending_market_owner: Pubkey,
pub lending_market_owner_cached: Pubkey,
pub quote_currency: [u8; 32],
pub referral_fee_bps: u16,
pub emergency_mode: u8,
pub autodeleverage_enabled: u8,
pub borrow_disabled: u8,
pub price_refresh_trigger_to_max_age_pct: u8,
pub liquidation_max_debt_close_factor_pct: u8,
pub insolvency_risk_unhealthy_ltv_pct: u8,
pub min_full_liquidation_value_threshold: u64,
pub max_liquidatable_debt_market_value_at_once: u64,
pub reserved0: [u8; 8],
pub global_allowed_borrow_value: u64,
pub emergency_council: Pubkey,
pub reserved1: [u8; 8],
pub elevation_groups: [ElevationGroup; 32],
pub elevation_group_padding: [u64; 90],
pub min_net_value_in_obligation_sf: PodU128,
pub min_value_skip_liquidation_ltv_checks: u64,
pub name: [u8; 32],
pub min_value_skip_liquidation_bf_checks: u64,
pub individual_autodeleverage_margin_call_period_secs: u64,
pub min_initial_deposit_amount: u64,
pub obligation_order_execution_enabled: u8,
pub immutable: u8,
pub obligation_order_creation_enabled: u8,
pub price_triggered_liquidation_disabled: u8,
pub mature_reserve_debt_liquidation_enabled: u8,
pub obligation_borrow_debt_term_liquidation_enabled: u8,
pub borrow_order_creation_enabled: u8,
pub borrow_order_execution_enabled: u8,
pub proposer_authority: Pubkey,
pub min_borrow_order_fill_value: u64,
pub withdraw_ticket_issuance_enabled: u8,
pub withdraw_ticket_redemption_enabled: u8,
pub obligation_borrow_rollover_configuration_enabled: u8,
pub obligation_borrow_migration_to_fixed_execution_enabled: u8,
pub withdraw_ticket_cancellation_enabled: u8,
pub padding2: [u8; 1],
pub reserve_rewards_max_apr_bps: u16,
pub min_withdraw_queued_liquidity_value: u64,
pub fixed_term_rollover_window_duration_seconds: u64,
pub open_term_rollover_window_duration_seconds: u64,
pub min_partial_rollover_value: u64,
pub term_based_full_liquidation_duration_secs: u64,
pub permissioning_authority: Pubkey,
pub permissioned_ops: u64,
pub padding1: [u64; 153],
}Expand description
Lending market account state.
Fields§
§version: u64§bump_seed: u64§lending_market_owner: Pubkey§lending_market_owner_cached: Pubkey§quote_currency: [u8; 32]§referral_fee_bps: u16§emergency_mode: u8§autodeleverage_enabled: u8§borrow_disabled: u8§price_refresh_trigger_to_max_age_pct: u8§liquidation_max_debt_close_factor_pct: u8§insolvency_risk_unhealthy_ltv_pct: u8§min_full_liquidation_value_threshold: u64§max_liquidatable_debt_market_value_at_once: u64§reserved0: [u8; 8]§global_allowed_borrow_value: u64§emergency_council: Pubkey§reserved1: [u8; 8]§elevation_groups: [ElevationGroup; 32]§elevation_group_padding: [u64; 90]§min_net_value_in_obligation_sf: PodU128§min_value_skip_liquidation_ltv_checks: u64§name: [u8; 32]§min_value_skip_liquidation_bf_checks: u64§individual_autodeleverage_margin_call_period_secs: u64§min_initial_deposit_amount: u64§obligation_order_execution_enabled: u8§immutable: u8§obligation_order_creation_enabled: u8§price_triggered_liquidation_disabled: u8§mature_reserve_debt_liquidation_enabled: u8§obligation_borrow_debt_term_liquidation_enabled: u8§borrow_order_creation_enabled: u8§borrow_order_execution_enabled: u8§min_borrow_order_fill_value: u64§withdraw_ticket_issuance_enabled: u8§withdraw_ticket_redemption_enabled: u8§obligation_borrow_rollover_configuration_enabled: u8§obligation_borrow_migration_to_fixed_execution_enabled: u8§withdraw_ticket_cancellation_enabled: u8§padding2: [u8; 1]§reserve_rewards_max_apr_bps: u16Cap (in basis points; FULL_BPS = 10_000 = 100%) on reserve rewards distribution APR
min_withdraw_queued_liquidity_value: u64§fixed_term_rollover_window_duration_seconds: u64§open_term_rollover_window_duration_seconds: u64§min_partial_rollover_value: u64§term_based_full_liquidation_duration_secs: u64§permissioned_ops: u64§padding1: [u64; 153]Implementations§
Source§impl LendingMarket
impl LendingMarket
Sourcepub fn is_emergency_mode(&self) -> bool
pub fn is_emergency_mode(&self) -> bool
Whether the market is in emergency mode.
Sourcepub fn is_borrow_disabled(&self) -> bool
pub fn is_borrow_disabled(&self) -> bool
Whether borrowing is globally disabled.
Sourcepub fn is_autodeleverage_enabled(&self) -> bool
pub fn is_autodeleverage_enabled(&self) -> bool
Whether autodeleverage is enabled.
Sourcepub fn liquidation_max_debt_close_factor_pct(&self) -> u8
pub fn liquidation_max_debt_close_factor_pct(&self) -> u8
Max percentage of debt that can be closed in a single liquidation.
Sourcepub fn min_full_liquidation_value_threshold(&self) -> u64
pub fn min_full_liquidation_value_threshold(&self) -> u64
Minimum value threshold for full liquidation.
Sourcepub fn max_liquidatable_debt_market_value_at_once(&self) -> u64
pub fn max_liquidatable_debt_market_value_at_once(&self) -> u64
Maximum liquidatable debt market value at once.
Sourcepub fn referral_fee_bps(&self) -> u16
pub fn referral_fee_bps(&self) -> u16
Referral fee in basis points.
Sourcepub fn elevation_group(&self, index: usize) -> Option<&ElevationGroup>
pub fn elevation_group(&self, index: usize) -> Option<&ElevationGroup>
Get an elevation group by index (0-31). Returns None if out of bounds.
Sourcepub fn is_immutable(&self) -> bool
pub fn is_immutable(&self) -> bool
Whether the market is immutable (no more config changes).
Sourcepub fn is_withdraw_ticket_cancellation_enabled(&self) -> bool
pub fn is_withdraw_ticket_cancellation_enabled(&self) -> bool
Whether withdraw ticket cancellation is enabled.
Sourcepub fn is_obligation_borrow_migration_to_fixed_execution_enabled(&self) -> bool
pub fn is_obligation_borrow_migration_to_fixed_execution_enabled(&self) -> bool
Whether migration-to-fixed rollover execution is enabled.
Trait Implementations§
Source§impl Clone for LendingMarket
impl Clone for LendingMarket
Source§fn clone(&self) -> LendingMarket
fn clone(&self) -> LendingMarket
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LendingMarket
Source§impl Debug for LendingMarket
impl Debug for LendingMarket
impl Pod for LendingMarket
Source§impl SplDiscriminate for LendingMarket
impl SplDiscriminate for LendingMarket
Source§const SPL_DISCRIMINATOR: ArrayDiscriminator
const SPL_DISCRIMINATOR: ArrayDiscriminator
The 8-byte discriminator as a
[u8; 8]Source§const SPL_DISCRIMINATOR_SLICE: &'static [u8] = _
const SPL_DISCRIMINATOR_SLICE: &'static [u8] = _
The 8-byte discriminator as a slice (
&[u8])Auto Trait Implementations§
impl Freeze for LendingMarket
impl RefUnwindSafe for LendingMarket
impl Send for LendingMarket
impl Sync for LendingMarket
impl Unpin for LendingMarket
impl UnsafeUnpin for LendingMarket
impl UnwindSafe for LendingMarket
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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>,
Casts the value.
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
If this function returns true, then it must be valid to reinterpret
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>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
impl<T> NoUninit for Twhere
T: Pod,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.