# Lending Pools

The uDEX protocol features lending pools for leveraged trading, where users can contribute any asset.

* By providing assets to these pools, users are rewarded with LTokens, representing their stake in the pool, along with token incentives.
* Lenders earn interest when trading pairs involve borrowing from these pools. The distribution of this interest, alongside LTokens and token rewards, is proportional to the lender's contribution compared to the pool's total assets.

To safeguard against flash loan attacks, the uDEX protocol mandates that lending and repayment cannot be executed within the same block, necessitating users to open and close their positions across different blocks.

### Risk Considerations&#x20;

Contributing assets to the uDEX protocol's lending pools carries risks. In adverse scenarios, the equity in traders' accounts may become negative, potentially resulting in losses for lenders. To address these situations, the uDEX protocol maintains a risk protection pool, managed by the DAO, which provides a certain percentage of coverage for these extreme cases.

### Customized Lending Pools&#x20;

The uDEX protocol allows anyone to create a lending pool for a trading pair, provided there's existing liquidity for that pair on a DEX.&#x20;

> For instance, someone interested in leverage trading for the SHIB/USDT pair could establish a lending pool for it, where lenders can supply SHIB solely to purchase USDT or vice versa.

### LToken Overview&#x20;

LTokens represent a key method of engagement with uDEX's lending pools, serving as interest-accumulating tokens.&#x20;

When a user deposits assets into a lending pool, they are issued LTokens in return. These tokens enable the holder to accumulate interest over time, not through direct distribution but through their intrinsic value growth. The exchange rate of LTokens increases, meaning the underlying asset value they represent grows, while the quantity of LTokens in one's possession remains constant.

In addition, various projects might offer LTokens via their yield farming programs. This strategy is designed to encourage fund providers to deposit assets, thereby facilitating leveraged trading for borrowers using these tokens.


---

# 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.xei.finance/feature-description/lending-pools.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.
