# Providing Liquidity

{% hint style="warning" %}
**Note!**

TON Hedge perpetual DEX is currently in its testnet phase. Its functionality is a subject of change.&#x20;
{% endhint %}

Liquidity for perpetual trading comes from users staking USDT in the liquidity pool, earning rewards from selling perpetuals. The pool grows from borrowing fees and trader losses, including liquidated position collateral.

Stakers receive LP tokens representing their share in the pool. **APY** depends on trading volume and total pool size.

In rare cases, withdrawals may be delayed if the request is too large relative to available liquidity. Funds unlock when enough perpetuals are closed or liquidated.

## Risk Management

Here, we outline key mechanics aimed at minimizing impermanent losses in the liquidity pool.

### Open Interest Limits

Open interest represents the total size of all open positions. To manage risk, open interest limits cap the total per pair relative to the liquidity pool, preventing imbalances that could affect PnL coverage and settlements, ensuring stability for liquidity providers.

The open interest limit is evenly divided between longs and shorts, with the total maximum open interest for a pair calculated as:

$$
MaxOI = PoolSize / PairCount
$$

### Auto Deleveraging (ADL)

If total pair PnL becomes too large, net exposure may exceed available liquidity. To ensure settlements, excess positions must be reduced, maintaining balance between the pool size and total pair PnL.

The **ADL factor** is **80%**, meaning if total PnL for a pair exceeds 80% of its max open interest, ADL is triggered and runs a loop:

1. The position with the highest PnL is automatically closed.
2. The process repeats until total PnL drops below 80% of max open interest.


---

# 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://ton-hedge.gitbook.io/ton-hedge-docs/providing-liquidity.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.
