# Obligation

#### pub struct Obligation

* description: Lending market obligation state
* variable:&#x20;

> ```rust
> 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:&#x20;

> ```rust
> /// 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:&#x20;

> ```rust
> /// 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,
> ```
