> For the complete documentation index, see [llms.txt](https://srwa.gitbook.io/srwa-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://srwa.gitbook.io/srwa-docs/getting-started/publish-your-docs/components/lending-protocol.md).

# Lending Protocol

Lending Protocol is a component that is used for communication between the users and the pools. It is the place where all of the business logic is stored. It is highly customizable with a built in set of parameters that serve as security measures and as risk management tools.

Lending Protocol is built with users and maintainers in mind, which means that it should be easy to set up, easy to use and with flexible settings so it can follow the changes in the markets.

Most used (and most important) parts of the Lending Protocol are so-called user methods, which serve for the Users interaction with the protocol. Those are:

**Deposit:** User can deposit an asset to any pool that is open for depositing and can then use that deposit to accrue interest and as collateral for borrowing.

**Borrow:** User can borrow any asset that is open for borrowing using deposit as collateral.

**Withdraw:** User can withdraw their deposit as well as accrued interest if it's not locked as collateral for a loan.

**Repay:** User can repay their loan and accrued interest at any time.

You can find more details about them in the[ how it works section](/srwa-docs/getting-started/how-it-works.md).

As part of the risk management, every user method can be locked by the admins if needed.


---

# 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://srwa.gitbook.io/srwa-docs/getting-started/publish-your-docs/components/lending-protocol.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.
