> For the complete documentation index, see [llms.txt](https://lenfi.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lenfi.gitbook.io/docs/lenfi-v1-protocol/lenfi-p2p-aada-v1/how-does-it-work.md).

# How does it work?

<figure><img src="/files/y52A428fscLqrH2it7wJ" alt=""><figcaption><p>A full walkthrough of the V1 protocol </p></figcaption></figure>

**Liquidity Request** - The **Borrower** creates a **Liquidity Request** with custom parameters such as **Collateral**, **Interest**, **Term**, and type of asset to be borrowed.

The **Borrower** can cancel the request before it is funded.

**Funding the request** - The **Lender** can select a request using the integrated filters.

**Liquidity Desposit** - The **Lender** creates a **Liquidity Deposit** with custom parameters such as **Collateral, Interest, Term**, and **type of asset** on offer.

The **Lender** can cancel the **Lender request** before it is funded.

**Finding a Borrower** - Every **Borrower** can select a deposit to take using the integrated filters.

**Interim period** - The **Borrower** must return the loan + interest before the loan deadline. In the event of failure, the Lender can liquidate the loan and receive the **Collateral** as compensation.

**Post-loan scenarios:**

* The **Borrower** successfully repays the loan, and the Lender claims his **assets + accumulated interest.**&#x20;
* The **Borrower** fails to repay the loan on time, and the **Lender** triggers a liquidation.

Every loan is secured by a **Health Factor** solution implemented to protect lenders against dramatic drops in collateral value. Whenever the **Liquidation Threshold** falls below 1.00, the **Lender** can manually liquidate the loan using the [**Liquidation Oracle**](/docs/lenfi-v1-protocol/lenfi-p2p-aada-v1/liquidation-oracle.md).


---

# 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://lenfi.gitbook.io/docs/lenfi-v1-protocol/lenfi-p2p-aada-v1/how-does-it-work.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.
