> For the complete documentation index, see [llms.txt](https://docs.projectlarix.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.projectlarix.com/contract/technical-resources/position.md).

# 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,
> ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.projectlarix.com/contract/technical-resources/position.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
