# How It Works

SRWA Lending is a overcollateralized, flexible type of lending...

Every time the user interacts with the protocol (Deposit, Borrow, Withdraw, Repay), many things are happening in the background in order for the protocol to work as intended.&#x20;

The whole process can be described in three basic steps that are done on every interaction:

**Validation** - every interaction has to be validated to check if it can be done. More details on that can be found in the description of basic operations below. \
**Calculation** - every time the user interacts with the protocol, set of calculations is being done, in order to for it to function as intended. Those calculations include pool utilization, borrow rate, borrow APR, accrued interest and pool reserves. more details can be found in [core calculations](/srwa-docs/core-calculations/utilization.md) section of the docs. \
**Update** - when the protocol has all of the relevant calculations ready, then it can update the SRWA Badge with the users current deposit and borrow states, as well as the Lending Protocol total deposits, borrows and reserve states.

After that the protocol waits for the next interaction to go through the process again.


---

# 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://srwa.gitbook.io/srwa-docs/getting-started/how-it-works.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.
