# AMM Strategy

## Overview

Perpetual liquidity pool's AMM quoting strategy is based on parameters that are carefully selected and assigned to perp markets based on their underlying risk profile.

Markets with similar market cap, liquidity, volatility, and price correlations will be grouped and assigned a quote strategy with parameters appropriate for that market.

This helps liquidity providers (LPs) achieve a few goals:&#x20;

1. **Balance Risk & Reward for LPs:** Having different quote strategies for different market groups minimizes the risk for LPs while still providing an attractive spread for traders so that fees can be earned.
2. **Simplify Choices for LPs**: By grouping similar markets, we enable liquidity providers (LPs) to easily select pools that match their risk profiles, eliminating the complexity of analyzing each market individually. This creates a more coherent and predictable environment for LPs.
3. **Efficient Portfolio Management**: Grouping similar markets allows LPs to manage their portfolios more effectively, balancing risk and potential returns without needing constant adjustments.
4. **Adapt to Market Dynamics**: Our pools can be adjusted to ensure they remain aligned with the changing market conditions and preserve their relevance and effectiveness.

## Quoting Strategy

### Base Strategy

Perp Pool employs different quoting strategies based on the market's underlying asset risk to balance market liquidity and spread to protect liquidity providers. The base strategy is defined by a quote shape given by:

* **Price Ticks**: Denominated in $1 increments.
* **Ratio**: Denominated in percentage (%).

Each quote value represents the distance from the previous quote, with the first quote being set relative to the oracle price. The 'quote amount ratio' dictates the proportion of liquidity allocated to each quote.

Let's take a look at an example below.&#x20;

The first quote will be $1 away from the oracle price with 30% of the liquidity, while the second quote will be $3 away from the previous quote with 70% of the liquidity. &#x20;

Example:&#x20;

| Quote Strategy                           | Details      |
| ---------------------------------------- | ------------ |
| Quote                                    | 1            |
| Quote price type (price\_ticks or ratio) | price\_ticks |
| Quote price value                        | $1.00        |
| Quote amount ratio                       | 0.3          |
| Quote                                    | 2            |
| Quote price type (price\_ticks or ratio) | price\_ticks |
| Quote price value                        | $3.00        |
| Quote amount ratio                       | 0.7          |

### Volatility Skew

To ensure liquidity providers do not take unnecessary losses during volatile market periods, the quote shape is further skewed by historical volatility (HV). The protocol tracks the market's past 20-day, 1-hour, and 1-minute HVs and skews the quotes away from the spread based on the assigned weights and thresholds of each HV bucket.

### Position Skew

On top of using the funding (borrow) rate, the pool also skews the quote strategy based on its current position, making it more attractive to trade against the pool's position and vice versa when it's position size is large. This keeps the pool more delta-neutral, reducing the LP's market risk.

## Notice Period

Demex adheres to a transparent and predictable approach for **adding or removing markets** as well as any changes in **parameters** linked to Perpetual Liquidity Pools.

Demex aims to provide notice to all liquidity providers by issuing a **48-hour notice** via app notifications, community channels, and within the Demex application before any of the above changes are enacted.

This notice period helps to ensure that LPs have adequate time to adjust their liquidity provision in response to any upcoming changes.

## Quick Links

All perp pool details, such as the denom, vault address, supply cap, borrow fee, and quote strategy, can be found here: <https://api.carbon.network/carbon/perpspool/v1/pools>

The fee structure of the pool can be found here: <https://api.carbon.network/carbon/market/v1/fee_structures/>\[SWTH address of the pool]

Example for Celestia ecosystem perp pool: <https://api.carbon.network/carbon/market/v1/fee_structures/swth1hf6ngj0t76tl45hnjy5zcjzj4wcnuvcwj580uf>


---

# 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://guide.dem.exchange/earn/liquidity-pools/perp-pools/amm-strategy.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.
