# How ZLP Works

### Liquidity Pool

The ZO Perpetuals exchange uses a trader-to-LP model, meaning traders borrow tokens from the ZLP Pool to open leveraged positions.

Instead of periodic funding payments between long and short traders, ZO implements an hourly borrow fee mechanism.

Traders pay these fees to the pool based on the amount of tokens they’ve borrowed. This helps secure the balance of the pool’s assets and compensates liquidity providers for the use of their capital.

***

## Add / Remove Liquidity to ZLP

### Adding Liquidity

Liquidity providers can acquire ZLP by contributing supported assets via ZO Swap.

* Increases Total Value Locked (TVL), which boosts trading liquidity.
* Deposited assets are allocated to the appropriate pool.
* TVL is re-priced in USD at the time of deposit.
* ZLP is minted and distributed based on the current price determined by underlying assets.

### Removing Liquidity

* ZLP can be redeemed into supported tokens.
* This burns the ZLP token and releases assets from the pool.
* Alternatively, ZLP can be transferred or traded on secondary markets.

***

### Yield Generation

| Action                   | Fee                         |
| ------------------------ | --------------------------- |
| Opening a Position       | 20-40 BPs                   |
| Closing a Position       | 20-40 BPs                   |
| Swap Fee (Mint/Burn ZLP) | 0–100 BPS (based on weight) |
| Borrow Rate              | Dynamic                     |

* 75% of fees go into the pool.
* Fees are settled when position is opened or closed.<br>

ZO generates yield for ZLP holders through fees collected from trading activity.

### Yield Calculation Example

Assumptions:

* Daily Trading Volume = $50M
* Fee Rate = 0.06%
* Revenue Share to Pool = 75%

$50,000,000 x 0.06% x 75% = $22,500/day in pool fees

### &#x20;Your share:

* Contribution = $1,000
* Pool TVL = $4,000,000
* Pool Share = 0.025%

$22,500 x 0.025% = $5.625/day

### ZLP Fee Distribution & APR

<br>

**Fee Distribution**

* Occurs when position is opened or closed
* 75% of realized fees are added to the pool.
* 25% is retained as a protocol fee.

**Weekly APR Calculation**

APR is updated weekly using the following logic:

if current\_time > (last\_updated + 1 week):\
time\_diff = current\_time - last\_updated\
apr\_bps = (realized\_fee\_usd \* YEAR\_IN\_SECONDS \* 10,000) / (pool\_usd\_value \* time\_diff)

APR is expressed in basis points (BPS).

### Risks of Holding ZLP

1\. **Bull Market Performance**

ZLP may underperform assets like SOL, ETH, or BTC due to the mixed asset nature of the pool (stable + volatile).

2\. **Trader PnL**

Trader profits and losses affect the pool:<br>

**Long Profitable Trade**

* Pool loses token quantity, but underlying token price rises (USD value remains stable).

**Short Profitable Trade**

* Pool loses stable coins without offsetting token appreciation (USD value drops).

> ⚠️ Yes, ZLP can go down in value. If trader profits + asset depreciation > fees generated, the pool’s value decreases.

3\. **Token Volatility & Fees**

* ZLP includes both stable and volatile tokens.
* Value of withdrawn tokens may be less than deposited.
* Entry/exit fees can reduce returns, especially for short-term holdings.

***

### Pool Weightage & Rebalancing

Each token has a target weight, which helps balance the pool.

**Maintaining Target Weight**

Swap (mint/redeem) fees adjust dynamically:

| Token > target weight | Deposit fee ↑, Withdraw fee ↓ |
| --------------------- | ----------------------------- |
| Token < target weight | Deposit fee ↓, Withdraw fee ↑ |

> 🧮 Goal: Encourage actions that return the pool closer to target weights.

***

### Weighted Swap Fees Mechanism

A token’s weight can deviate from its target, but it may incur high fees

**Example:**

Target USDC Weight = 26%

Allowed Range = 20.8% to 31.2%

* Above 31.2% → USDC deposits incurs high fees (\~100bps)
* Below 20.8% → USDC withdrawals incurs high fees (\~100bps)

<br>

> 🛡️ Purpose: Prevent destabilization during black swan events or depegs.


---

# 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.zofinance.io/liquidity-providers/how-zlp-works.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.
