> For the complete documentation index, see [llms.txt](https://xave-finance.gitbook.io/general/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xave-finance.gitbook.io/general/product-overview/lending-market.md).

# Lending Market

## Overview&#x20;

Our Lending Market allows users to deposit first ETH, WBTC and popular USD pegged stablecoins as collateral to borrow various local currency pegged stablecoins, in contrast to most lending protocols in the DeFi space that give no focus to regional currencies.&#x20;

Xave's Lending Market implements the utilization curve of Aave V2 (to avoid reinventing the wheel), while adapting its' oracle layer to point to fiat backed stablecoins (via Chainlink) instead of purely tokens that rely on on-chain AMM pools.&#x20;

<figure><img src="/files/A6YDwz5VNHgB50o8GHWb" alt=""><figcaption></figcaption></figure>

## Mechanism

Lenders who supply their tokens to our lending market will receive interest yield according to the current supply APR. The supply tokens are then sent to the protocol and become available for other users to borrow. The smart contract then issues <mark style="color:red;">X-tokens (tentative nomenclature)</mark> that represent a claim on those deposited supply tokens and the interest yielded over time. For example, lenders that supply 1 USDC will receive 1 xUSDC and over time, that 1 xUSDC will be worth more than 1 USDC.&#x20;

Over-collateralization is used to ensure that all positions remain backed. This means that the users who want to borrow funds have to supply tokens in a form of collateral that is worth more than the actual loan that they want to take.

## How much fees can I earn as a lender and how much does the protocol take for itself?

You may refer to [this sheet](https://docs.google.com/spreadsheets/d/11AhWcTp07xM6NmwTN8tz4PIDocFEofTnA3HaFrik-Bs/edit?usp=sharing) (that simplifies Aave's own modeling) that simulates the utilization vs borrow rate for USDT (as example) against data from a liquid lending market (Aave V2). Essentially, Xave's Lending Market is configured to take 10% (reserve factor = 1000) of debt payments upon payment (which can happen at anytime). The initial tokens to be supported on Xave's Lending Market is USDC and XSGD.

### Interest Rate Curves

#### USDC/XSGD

<figure><img src="/files/nX7z08b14bzPEiK1ZWk2" alt=""><figcaption></figcaption></figure>

For further reading on how Aave describe's it's utilization curves that Xave has implemented, refer to <https://docs.aave.com/risk/liquidity-risk/borrow-interest-rate>.&#x20;

## What is the limit of the amount I can borrow?&#x20;

The amount that can be borrowed is dependent on 2 factors:\
\
1\. Amount of supplied tokens in the pool\
2\. Maximum Loan-to-Value (LTV) ratio.

For point 1, it is unlikely to be a huge problem unless the borrower wants to borrow a large sum. As for point 2, the Maximum Loan-to-Value ratio represents the maximum borrowing power of a specific collateral. For example, if a collateral has a LTV of 75%, the user can borrow up to 0.75 worth of ETH in the principal currency for every 1 ETH worth of collateral.

## What happens when the value of the collateral drops?&#x20;

When the value of the collateral falls below the liquidation threshold, the user will have the collateral liquidated as the borrow position will now be considered undercollateralized. For example, if a collateral has a liquidation threshold of 80%, it means that the loan will be liquidated when the debt value is worth 80% of the collateral value.

When liquidation occurs, liquidators repay part or all of the outstanding borrowed amount on behalf of the borrower. In return, they can buy the collateral at a discount and keep the difference as a bonus!

## Audit

Please refer to the audit page here [Lending Market](/general/contract-audits/lending-market.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://xave-finance.gitbook.io/general/product-overview/lending-market.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.
