Obligation

pub struct Obligation

  • description: Lending market obligation state
  • variable:
1
Version of the struct
2
pub version: u8,
3
Last update to collateral, liquidity, or their market values
4
pub last_update: LastUpdate,
5
Lending market address
6
pub lending_market: Pubkey,
7
Owner authority which can borrow liquidity
8
pub owner: Pubkey,
9
Deposited collateral for the obligation, unique by deposit reserve address
10
pub deposits: Vec<ObligationCollateral>,
11
Borrowed liquidity for the obligation, unique by borrow reserve address
12
pub borrows: Vec<ObligationLiquidity>,
13
Market value of deposits
14
pub deposited_value: Decimal,
15
Market value of borrows
16
pub borrowed_value: Decimal,
17
The maximum borrow value at the weighted average loan to value ratio
18
pub allowed_borrow_value: Decimal,
19
The dangerous borrow value at the weighted average liquidation threshold
20
pub unhealthy_borrow_value: Decimal,
Copied!

pub struct ObligationCollateral

  • description: Obligation collateral state
  • variable:
1
/// Reserve collateral is deposited to
2
pub deposit_reserve: Pubkey,
3
/// Amount of collateral deposited
4
pub deposited_amount: u64,
5
/// Collateral market value in quote currency
6
pub market_value: Decimal,
Copied!

pub struct ObligationLiquidity

  • description: Obligation liquidity state
  • variable:
1
/// Reserve liquidity is borrowed from
2
pub borrow_reserve: Pubkey,
3
/// Borrow rate used for calculating interest
4
pub cumulative_borrow_rate_wads: Decimal,
5
/// Amount of liquidity borrowed plus interest
6
pub borrowed_amount_wads: Decimal,
7
/// Liquidity market value in quote currency
8
pub market_value: Decimal,
Copied!
Last modified 11mo ago
Copy link
Contents