# Reserves

### Why do Reserves exist?

Reserves act as a backstop to the protocol, acting as insurance liquidity for a respective market. The [Reserve Factor](broken://pages/1H2KRDhw019NFZ26QGpf) is the portion of borrower interest paid that is set aside and this number is a parameter set by Ursa. Reserves are stored within each respective lToken contract.

Reserves operate just like any other deposit into the protocol and can be withdrawn by other users or by the protocol with the `reduceReserves` function in the lToken contract. This is the mechanism by which protocol fees will be charged. Reserves can provide extra liquidity in the market in periods of high utilization and help protect the protocol keep bad debt from accruing.

### How do Reserves work?

When a borrower repays a loan and calls the `accrueInterest` function, a portion of interest paid equal to the reserve factor is retained by the lToken contract and the remained of interest paid is accrued as interest to depositors.

Here is a quick example to understand how reserves work inside the protocol:

* A hypothetical account repays a USDC loan and calls the `accrueInterest` function, they are charged $100 in interest. $93 in interest is accrued for depositors of that asset and 7$ of that interest is retained by the protocol in reserves.

The amount of reserves can be viewed in the lToken contract for the respective asset using the `totalReserves` function. This returns a uint representing the total reserves denominated in the underlying asset.


---

# Agent Instructions: 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:

```
GET https://docs.ursa.finance/ursa/documentation/technical-overview/reserves.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
