# Concentrated Liquidity

CarrotSwap is at the forefront of decentralized finance innovation, adopting the Concentrated Liquidity Automated Market Maker (AMM) model from Uniswap V3. This adoption marks a significant leap in capital efficiency, boasting an improvement of over 4000 times compared to the traditional V2 AMM model.

**1. Targeted Liquidity Provision**\
Liquidity providers in CarrotSwap have the flexibility to supply liquidity within their chosen price range. This strategic approach not only reduces impermanent loss but also enables them to earn higher fees.

**2. Enhanced Trading Experience**\
For traders, CarrotSwap offers the ability to execute transactions at more favorable prices and with reduced slippage. This enhanced trading efficiency is a crucial advantage for users seeking optimal trading conditions.

**3. Advanced Security with MEV Resistance**\
Built on the Neo EVM, CarrotSwap inherently resists Maximal Extractable Value (MEV) attacks. This security feature provides traders with a safer and more reliable trading environment, safeguarding their interests against potential vulnerabilities.

## What is Concentrated Liquidity?

{% hint style="info" %}
**Сoncentrated liquidity** — is the liquidity allocated within a custom price range.&#x20;
{% endhint %}

Concentrated Liquidity represents a groundbreaking liquidity solution that enables liquidity providers (LPs) to **maximize their capital efficiency** and **mitigate impermanent loss** by concentrating their liquidity within a specific price range. This innovative feature allows LPs to stake a specific token pair within a defined price range.

{% hint style="success" %}
The APR is dependent on the TVL of the position, the amount of time that the position has been active, and the width of the range.
{% endhint %}

## v2 vs v3

Earlier implementations of AMMs used the so-called XYK model, based on the x\*y=k price curve. The idea was to maintain constant balance within a liquidity pool so that the total value of one token would always equal the total value of the other token in the pool; regardless of their current price against each other.

With the XYK model, the liquidity in the pool is spread across all possible price ranges. As a result, the liquidity providers (LPs) are earning far smaller trading fee bonuses — which is their compensation for the risk they take. They also suffer from higher slippage, because the majority of their liquidity never gets used in pools of this type at all.

Concentrated liquidity tries to boost capital efficiency, and to make up for the inadequacy of the original formula. Within the new model, liquidity can be allocated to a price interval, resulting in what is called a concentrated liquidity position. LPs can open as many positions in the pool as they wish, thereby creating unique price curves aligned with their personal needs and preferences.

When the price enters a specific range, the liquidity aggregated for that range starts collecting trading fees, with each LP receiving their slice of the fee pie, proportionally to their contribution to the total liquidity inside of that price range alone.

As the price moves up and down, liquidity from different LPs is used to execute the swaps. Consequently, users are making trades against the aggregated liquidity from all liquidity positions covering the current price, and there is no difference for those whose liquidity their swaps are utilizing.

There are a number of benefits and advantages that the new model of pooling liquidity offers both LPs and traders. Now, LPs can allocate their capital to the preferred price intervals, consolidating their funds to earn more fees and using liquidity more efficiently. At the same time, traders enjoy deeper liquidity when and where it’s needed most, as well as profiting greatly from reduced slippage.

{% hint style="info" %}
[References and more details.](https://help.algebra.finance/en/liquidity/what-is-concentrated-liquidity)
{% 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://guide.carrot-fi.xyz/porject-info/concentrated-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.
