Larix
  • Who is Larix
  • Community
  • Roadmap
  • Product Update
  • Monthly Report
    • Larix Monthly Report [Oct]2021
    • Larix Monthly Report [Nov]2021
    • Larix Monthly Report [Dec]2021
    • Larix Monthly Report [Jan ]2022
    • Larix Monthly Report [Feb] 2022
    • Larix Monthly Report [Mar] 2022
    • Larix Monthly Report [April] 2022
    • Larix Monthly Report [May] 2022
  • FAQ
    • General FAQ
    • Raydium LPs FAQ
    • Error Explanation
    • Trouble shooting
    • Liquidation
  • PROTOCOL
    • Mainnet
      • Main Pool
        • Addresses
      • Lending Launchpad
        • Bonfida Pool
        • xSOL Pool
        • LARIX Pool
        • Step Pool
        • Stepn Pool
    • Devnet
  • Larix Guide
    • Step 1: Get Wallet
    • Step 2: Connect Wallet
    • Step 3: Deposit
    • Step 4: Borrow
    • Step 5: Repay
    • Step 6: Withdraw
    • Step 7: Claim rewards
  • Interest Rate Model
  • Mathematics
    • APY
    • Mining
    • Price Feed
    • Obligation Health
  • Function
  • Design and Principle of the Liquidation
  • Access Controls
  • Security
    • Bug Bounty Reward
    • Audit
    • Oracles
  • Tokenomics
    • LARIX
    • Buy LARIX
      • b30LARIX
    • Larix Distribution
    • LARIX Token Distribution Rate Model
  • Risk
    • Risk Framework
    • Asset Risk
    • Liquidity Risk
    • External Audits & Analysis
  • API
    • Instruction
    • Function
    • Query
      • Logo
      • State
      • Reserve
      • Mining
      • Obligation
      • SDK
Powered by GitBook
On this page

Was this helpful?

  1. API
  2. Query

Obligation

pub struct Obligation

  • description: Lending market obligation state

  • variable:

Version of the struct
pub version: u8,
Last update to collateral, liquidity, or their market values
pub last_update: LastUpdate,
Lending market address
pub lending_market: Pubkey,
Owner authority which can borrow liquidity
pub owner: Pubkey,
Deposited collateral for the obligation, unique by deposit reserve address
pub deposits: Vec<ObligationCollateral>,
Borrowed liquidity for the obligation, unique by borrow reserve address
pub borrows: Vec<ObligationLiquidity>,
Market value of deposits
pub deposited_value: Decimal,
Market value of borrows
pub borrowed_value: Decimal,
The maximum borrow value at the weighted average loan to value ratio
pub allowed_borrow_value: Decimal,
The dangerous borrow value at the weighted average liquidation threshold
pub unhealthy_borrow_value: Decimal,

pub struct ObligationCollateral

  • description: Obligation collateral state

  • variable:

/// Reserve collateral is deposited to
pub deposit_reserve: Pubkey,
/// Amount of collateral deposited
pub deposited_amount: u64,
/// Collateral market value in quote currency
pub market_value: Decimal,

pub struct ObligationLiquidity

  • description: Obligation liquidity state

  • variable:

/// Reserve liquidity is borrowed from
pub borrow_reserve: Pubkey,
/// Borrow rate used for calculating interest
pub cumulative_borrow_rate_wads: Decimal,
/// Amount of liquidity borrowed plus interest
pub borrowed_amount_wads: Decimal,
/// Liquidity market value in quote currency
pub market_value: Decimal,
PreviousMiningNextSDK

Last updated 3 years ago

Was this helpful?