# Liquidity and Yield farming

### V3

#### How does V3 manual mode function?

{% hint style="info" %}
V3 Concentrated liquidity allows liquidity providers on Camelot to set custom price ranges for their tokens instead of evenly distributing them across the entire price range. This means that liquidity providers can concentrate their capital on specific price ranges where they believe there will be more trading activity, while still providing liquidity across a broader range of prices rather than the entire price range
{% endhint %}

{% hint style="success" %}
In other words, concentrated liquidity allows providing liquidity for specific prices you like, instead of sharing all your liquidity across the whole range. It's like only sharing your favourite toys, instead of sharing all of your toys, with your friends
{% endhint %}

#### **Example of the mechanics**

{% hint style="warning" %}
For <mark style="color:orange;">volatile pair</mark>, an LP could provide liquidity for a price range of $1.10 - $1.30. This means that liquidity would only be used within that price range, allowing for more targeted liquidity provision\
\
In a <mark style="color:orange;">stable pair</mark>, a liquidity provider may opt to allocate their capital only to the range of $0.995-$1.005. This can result in deeper liquidity for traders around the mid-price, and the LP can earn more trading fees using their capital
{% endhint %}

*If you would like to learn how to use V3, refer to the following* [*guide*](/get-started/castle-tutorials/step-by-step-guides/v3-v4-add-liquidity-concentrated.md)

#### What is the difference between Auto mode and Manual mode?

* Manual mode is designed for experienced liquidity providers, giving them control over the price ranges of the liquidity they offer
* Auto mode utilizes focused liquidity management strategies, handling the intricate task of adjusting price ranges for users

From the user's point of view, the process is quite simple - If the pair of your position is incentivized with market maker rewards, you will receive additional rewards on top of the trading fees that are harvestable in the positions section of the dapp's interface.

{% hint style="info" %}
For traders and liquidity providers, what improvements does v3 bring?
{% endhint %}

Through V2, liquidity providers deposit equal amounts of two assets (50:50) in a liquidity pool, which is then used to facilitate trades between those assets. This can lead to idle capital, as the liquidity provider's funds may not always be utilized fully. Additionally, the fixed ratios of the deposited assets can limit trading flexibility and result in higher fees for traders

{% hint style="info" %}
V3 benefits liquidity providers and traders by allowing for more efficient trading and reducing slippage costs. Traders can now swap tokens at prices closer to market rates, while liquidity providers can earn higher fees for providing liquidity at the specific price points where there is higher demand
{% endhint %}

#### How does V3 enhance the protocol?

{% hint style="info" %}

* Attracting more liquidity providers: The benefits of V3 CL, such as higher APRs, make providing liquidity more attractive for potential LPs
* Increased trading volume: CL leads to tighter spreads and improved capital efficiency. This attracts more traders to the platform, resulting in higher trading volume which simply means more fee revenues for the protocol
  {% endhint %}

#### What are the main differences between V2 and V3?

{% hint style="info" %}
The main differences between V2 and V3 are the introduction of concentrated liquidity, directional & dynamic volatility fees, limit orders, rebasing tokens, custom tick spacing and improved capital efficiency in V3 as well as significant UI updates. These new features allow LPs to customise their exposure and potentially earn higher returns from trading fees compared to the previous version.

* V2 = 50/50 ratio between assets bundled into LP

* V3 = Custom range
  {% endhint %}

* V3 allows liquidity providers to concentrate their liquidity at specific price points, leading to more efficient use of capital and higher capital efficiency

* V3 concentrated liquidity model allows for more precise pricing and lower slippage for traders, especially in volatile markets

* V3 liquidity range orders can help traders execute trades more efficiently, as they can specify the price range they want to trade in ranges and adjust positions as market conditions change

* V3 offers more granular control over liquidity positions, with the ability to create custom tick

* V3 has lower gas costs and is more gas-efficient than V2

#### Does Camelot charge higher fees for swaps that use concentrated liquidity, and if not, how can the APR be higher when using concentrated liquidity?

{% hint style="info" %}
The swap fees themselves may not necessarily change based on whether the liquidity is concentrated or not, but the benefits of concentrated liquidity come into play for LPs. By focusing your capital in specific price ranges, as an LP you can potentially earn a higher share of fees relative to contributed capital. <br>

Imagine two pools, one with concentrated liquidity 'V3' and another with a full range of liquidity 'V2'. Both pools facilitate the same volume of swaps and collect the same fees. In the CL pool 'V3', since there's less idle capital, the fees are distributed among a smaller amount of provided capital. This means that liquidity providers in the concentrated pool may receive a higher return even though the fees from each swap remain the same.
{% endhint %}

#### How should price ranges be selected?

* Consider how much prices are likely to move during the lifetime of your position
* Be willing to actively manage the position as the market changes
* Take into account the economics of the transactions required to manage the position
* If prices move outside your specified range, your position will be concentrated in one asset and you won't earn trading fees until prices return to the range
* Providing liquidity across the full range is an option, but it will result in a lower rate of return than a narrower range

#### Range presets

<figure><img src="/files/IKqDtsiVq1gUEhRBw9w3" alt=""><figcaption></figcaption></figure>

1. **Full range**\
   \- Liquidity is provided across the entire price range of the asset being traded. This can be useful for assets that have a wide trading range or are subject to high volatility
2. **Wide range**\
   \- Liquidity is concentrated in a wider price range. This can be useful for assets with moderate volatility, as it provides sufficient liquidity across a range of prices
3. **Common range**\
   \- Liquidity is concentrated in both the buy and sell range around the current market price
4. **Narrow range**\
   Liquidity is concentrated in a specific price range, usually close to the current market price. This can be useful for assets that have relatively stable prices, as it reduces the amount of capital required to provide liquidity while still maintaining efficient trading

#### Is my position liquidated if the price exceeds my price range?

If the price of a trading pair goes beyond the range that you set for your LP, then your position will only consist of the less valuable asset in that pair

{% hint style="warning" %}
For instance, if your price range for ETH/USDC is 555-1555, and ETH drops to 550, then your balance will only be in ETH. On the other hand, if ETH increases to 1560, then your balance will only be in USDC
{% endhint %}

When the price remains outside of your specified range, your position will be in an <mark style="color:red;">out of range</mark> mode, which means that you will not earn any fees until the price returns to your set range

#### How APR for trading fees is calculated?

{% hint style="info" %}
To calculate the APR for trading fees, we collect the total active TVL and fees made approximately every 10 minutes. We then determine the average active TVL for the past 7 days (or since the pool went live if it has been live for less than 7 days)\
\- Using the fees earned during this period, we calculate the APR
{% endhint %}

#### Can I create a custom token pair in V3?

{% hint style="info" %}
Yes, you can create a custom token pair by providing liquidity to a new combination of tokens that do not have an V3 existing pool. To do so, you will need to select the tokens, set a price range, and deposit the required amounts of both tokens. Once the pool is created, others can also provide liquidity to that token pair
{% endhint %}

#### Can I withdraw my concentrated liquidity at any time?

{% hint style="info" %}
Yes, you can withdraw your position at any time
{% endhint %}

<figure><img src="/files/VNNgoeendWaIsfGIJqeK" alt=""><figcaption></figcaption></figure>

#### How are fees earned and distributed in concentrated liquidity pools?

{% hint style="info" %}
Fees are earned from swap transactions that occur within the specified price range set by the liquidity providers. These fees are automatically distributed proportionally to the liquidity providers based on the amount of liquidity they have contributed and the time they have been in the pool. For manual mode, pending rewards are harvestable on the V3 position management panel - when it comes to auto mode the LP fees auto-compounding in the LP
{% endhint %}

#### Will V2 pools ever be discontinued?

{% hint style="info" %}
We have no intention of discontinuing V2. Due to the technical complexities associated with concentrated liquidity, some users/protocols may opt for V2 over V3
{% endhint %}

### V2 and Exchange

#### Why am I unable to set the amount in the top box on the frontend exchange page?

{% hint style="info" %}
This limitation arises due to the stable logic in place, which precludes calculations in the reverse direction
{% endhint %}


---

# 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.camelot.exchange/get-started/faqs/liquidity-and-yield-farming.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.
