> For the complete documentation index, see [llms.txt](https://docs.nectarliquid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nectarliquid.com/adding-liquidity.md).

# Adding Liquidity

Nectar Liquid lets you earn yield by depositing tokens into liquidity pools. These pools back leverage trading and swaps on the platform. Liquidity providers earn the majority of the fees generated from trading, liquidations, borrow fees, and swaps.

#### Nectarliquid Pools

A Nectarliquid Pool consists of three main elements:

* Index price feed: Positions are opened and closed based on this price feed.
* Long token: The token that backs long positions.
* Short token: The token that backs short positions.

For example, a WBTC/USD market uses the WBTC/USD price feed with WBTC backing long positions and USDC backing short positions. For single-token backed pools, both the long and short token are the same. For example, a single-token WETH pool uses WETH for both sides.

#### Single-token vs multi-token pools

Single-token pools differ from multi-token pools in how they handle swaps, price impact, and asset exposure. The differences affect both liquidity providers and traders.

For liquidity providers:

* Zero swap price impact on deposits and withdrawals: In multi-token pools, depositing a single token shifts the balance between the long and short token pools and incurs swap price impact. In single-token pools, both sides of the pool are the same token, so the swap price impact factor is set to zero — deposits and withdrawals have no price impact regardless of size.
* Single-asset exposure: You hold one token instead of two. There is no rebalancing between different assets, so your position tracks the price of a single token rather than a mix.
* No swaps: Single-token pools do not support swap operations — they are used for leverage trading only.

For traders:

* No swap fees on position operations: In multi-token pools, opening or closing a position may require a swap between the collateral token and the PnL token, incurring swap fees and swap price impact. In single-token pools, collateral, PnL, and pool backing all use the same token — no token conversion is needed, so there are no swap fees or swap price impact on any position operation.
* Reduced or zero position price impact: The net price impact based on open interest imbalance is configured per market. The major single-token markets have position impact factors set to zero — meaning no position price impact at all. Smaller single-token markets may have non-zero position impact factors configured based on their liquidity depth.

Each pool is risk-isolated — liquidity providers are only exposed to the markets they deposit into. Profits and losses of traders in one market do not affect pools in other markets.

#### Market types

Pools back two types of markets, which differ in how the pool's tokens cover trader PnL.

Fully backed markets

In a fully backed market, the index token and the long collateral token are the same asset. For example, a WETH/USD perp market backed by a WETH-USDC pool uses WETH as both the index token and the long collateral token. Because long position profits are paid out in WETH and the pool holds WETH directly, the pool's WETH balance can always cover the pending PnL of long positions — as long as open interest caps are respected. The protocol enforces these caps via specific parameters configured per market and per side.

Synthetic markets

In a synthetic market, the index token differs from the long collateral token. For example, a localized CNGN/USD perp market backed by a WETH-USDC pool uses CNGN as the index token but WETH as the long collateral. This means long position profits are denominated in CNGN price terms but paid out from the pool's WETH balance. If the price of CNGN rises faster than the price of WETH, the pending profits of CNGN long positions can grow faster than the value of WETH in the pool.

#### Buying and Selling Pool Tokens

You can buy pool tokens on the Pools page. The native gas token of Asset Chain is required to send the transaction.

To buy tokens, select the market and pool you want to purchase. Review the price impact displayed in the interface. Your purchase has a positive or negative price impact depending on whether it improves or reduces the balance of tokens in the pool. If the pool is mostly balanced, a large purchase may result in a significant negative price impact.

Tokens in a market are reserved based on the total open interest. The reserve factor determines how much of the pool can be committed to backing positions:

Plaintext

```
available liquidity = (pool tokens × reserve factor) − reserved tokens
```

Where reserved tokens are tokens already committed to cover open positions. The reserve factor is a per-market parameter that prevents the pool from being fully drained by trader positions. If the available liquidity for redemption reaches zero, you need to wait for positions to close or for other providers to deposit liquidity before you can sell. The borrow fee rate is also higher in this case, which helps incentivize new deposits.

#### Token pricing

The price of a pool token is:

Plaintext

```
Pool token price = (pool value + net pending PnL) / Pool totalSupply
```

Where pool value includes the fiat worth of deposited long and short tokens plus accumulated borrowing fees, and net pending PnL is the aggregate unrealized profit/loss of all open trader positions in the market. The pending PnL component is capped to prevent extreme trader profits from fully draining pool value during a single deposit or withdrawal.

Fees from trading, swaps, borrowing, and liquidations flow directly into the pool, increasing pool value and the token price over time. There is no separate claim or distribution step — holding the tokens is enough to earn fees.

#### Performance APY calculation

The annualized performance APY for pool tokens measures the excess return compared to a benchmark strategy of holding the underlying tokens in a geometric mean portfolio.

Variable definitions

| **Variable**  | **Definition**                                        |
| ------------- | ----------------------------------------------------- |
| `TokenA_S`    | Token A starting price                                |
| `TokenB_S`    | Token B starting price                                |
| `TokenA_E`    | Token A ending price                                  |
| `TokenB_E`    | Token B ending price                                  |
| `Pool_S`      | Pool token starting price                             |
| `Pool_E`      | Pool token ending price                               |
| `Benchmark_S` | Benchmark investment starting price (equals `Pool_S`) |
| `Benchmark_E` | Benchmark investment ending price                     |
| `duration`    | Number of days in the measurement period              |

Calculation steps

Step 1: Calculate benchmark ending price

The benchmark represents a geometric mean portfolio of the underlying tokens:

Plaintext

```
Benchmark_E = Pool_S × √((TokenA_E × TokenB_E) / (TokenA_S × TokenB_S))
```

Step 2: Calculate annualized performance

The annualized performance APY is the excess return of the Pool token compared to the benchmark, annualized:

Plaintext

```
Annualized Performance (%) = ((Pool_E - Benchmark_E) / Pool_S) × 100 × (365 / duration)
```

#### Protocol protections

Nectar Liquid uses multiple layered mechanisms to keep pools solvent and markets balanced:

* Price impact — Trades that increase the open interest imbalance pay a price impact fee; trades that reduce it receive a better price.
* Adaptive funding — The dominant side pays the minority side. The rate increases over time while the imbalance persists and decreases as it resolves.
* Borrow fees — Only the side with larger open interest pays. The rate increases linearly up to an optimal utilization threshold, then rises steeply above it.
* Open interest caps — Each market has limits that prevent any single market from over-committing pool liquidity.
* Reserve factor — Limits how much of the pool can be committed to backing positions, ensuring liquidity remains available for redemptions.
* PnL factor caps — Limits how much pending trader PnL can affect pool value during deposits, withdrawals, and position closures.
* Auto-Deleveraging (ADL) — Automatically reduces profitable positions when the PnL-to-pool ratio exceeds the market's configured threshold, protecting pool solvency.
* Two-phase execution — Orders are committed on-chain before oracle prices are included, preventing frontrunning and sandwich attacks.

#### Risks

Smart contracts carry inherent risk. A non-exhaustive list of risks includes:

* Smart contract risks: Vulnerabilities in smart contract code despite testing and audits.
* Counterparty risks: The pool is the counterparty to traders. If traders profit, that profit comes from the value of the pool.
* Token risks: Bridged tokens depend on the security of the bridge, and pegged tokens carry the risk of depegging.
* Open interest imbalance: While funding fees and price impact incentivize balanced long and short open interest, positions may not always be balanced.

#### Next steps

* Trade on Nectar Liquid — Open leveraged positions using pool liquidity.
* Contracts — Review smart contract details.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nectarliquid.com/adding-liquidity.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
