> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aultblockchain.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lending

> Supply assets, post collateral, borrow, and monitor your position.

> [!NOTE]
>
> **Testnet-Only.** Lending is available on Ault Testnet. Mainnet currently supports Spot DEX only.

Lending connects suppliers with borrowers who post collateral. Each pool has its own assets, available cash, interest settings, caps, and risk rules.

## Three separate balances

| Balance | What it is |
| - | - |
| Supply shares | Your claim on supplied assets and the interest they earn. It can be reduced by losses. |
| Collateral | Assets you post so you can borrow |
| Debt shares | What you owe, including interest |

Supplying assets does not post them as collateral. Collateral does not earn the supply rate. Collateral in one pool does not support debt in another.

## Key rules

1. **Caps limit supply and borrowing.** The asset must allow the action, the pool must have the action enabled, and the amount must fit within the cap. A cap of zero allows no more.
2. **You can only withdraw available cash.** If the pool lacks cash, the withdrawal fails. There is no automatic partial withdrawal or waiting queue.
3. **Interest changes your balance over time.** Borrow rates change with pool usage and are not fixed.
4. **Anyone can repay a debt.** Repayment comes from a wallet, is limited to the current debt, and needs no health check, but the pool must have repayment enabled.
5. **Each action has its own price checks.** Borrowing, collateral withdrawal, liquidation, and Margin settlement can apply different oracle checks. A good health value alone does not mean the action will succeed.

## Borrowing capacity and health

LTV sets how much you can borrow or withdraw. The liquidation threshold sets your health factor.

```text theme={null}
Borrowing capacity = sum(collateral value * LTV)
Health factor = sum(collateral value * liquidation threshold) / debt value
```

A position with debt can be liquidated when health is below `1`. Exactly `1` cannot be liquidated. A debt-free account reports a health of `0` and cannot be liquidated.

For example, collateral worth 10,000 with an LTV of `0.70`, a liquidation threshold of `0.80`, and debt worth 6,000 has a borrowing capacity of 7,000 and a health of about `1.333`. Price moves or interest can reduce this buffer.

## Liquidation

A liquidator repays part of a borrower's debt and receives collateral plus a bonus that depends on health. The protocol's liquidation fee comes out of that bonus.

If debt remains after all collateral is gone, the insurance fund for that debt asset pays first. Any remaining loss either reduces suppliers' value or is recorded as a deficit, depending on the pool. A deficit limits the cash available in the pool. Neither the insurance fund nor deficit settlement guarantees reimbursement.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.