> For the complete documentation index, see [llms.txt](https://capricorn-1.gitbook.io/capricorn-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://capricorn-1.gitbook.io/capricorn-docs/documentation/concentrated-liquidity-pools-capricorn-cl.md).

# Concentrated Liquidity Pools (Capricorn CL)

Capricorn’s CLMM follows the same tick math, state layout, and core storage semantics as Uniswap V3. Our contracts are a drop-in replacement at the indexing layer - if your system swaps in the Capricorn Factory and NonFungiblePositionManager addresses, your existing indexer should work without major changes. The pool state, positions, ticks, and liquidity accounting all preserve Uniswap-compatible structures, so most downstream logic can remain the same.

Aggregators can either swap directly through the pool or through swap routers.

#### Example Interfaces

```solidity
interface ICapricornCLPool {
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);
}

interface ICapricornCLSwapCallback{
    function capricornCLSwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external;
}

interface ICapricornCLMintCallback {
    function capricornCLMintCallback(
        uint256 amount0Owed,
        uint256 amount1Owed,
        bytes calldata data
    ) external;
}

interface ICapricornCLFlashCallback {
    function capricornCLFlashCallback(
        uint256 fee0,
        uint256 fee1,
        bytes calldata data
    ) external;
}
```

#### Testnet Deployment

| **Contract**                       | **Address**                                  |
| ---------------------------------- | -------------------------------------------- |
| CapricornCLFactory                 | `0xd0a37cf728CE2902eB8d4F6f2afc76854048253b` |
| TickLens                           | `0x6283251A3a8a0bC453cd1Ac8Db93dCd71d274eD8` |
| SwapRouter (V3)                    | `0xD0B138e03eE785e8C0Af250C1eA5316f43800F46` |
| NftDescriptorLibrary               | `0xccb9F906D4C9934f201139159455F62330a2919C` |
| NonfungibleTokenPositionDescriptor | `0xB7F8dA6EaE8EBf915Ec7c22Ab2eD1353f724c690` |
| NonfungibleTokenPositionManager    | `0x311819d339B87a10cc4Bbf137d5A0F233Ab56Ad7` |
| V3Migrator                         | `0xAf02EfF67979678036fb2267AD484ec5Ed4ae710` |
| QuoterV2                           | `0x4D59c6E4B20bf6164263b36c6CeC328F326Fb2F9` |
| Multicall2                         | `0x0387093ba974dF73Ed70C92ECA5d99d735c9bDA4` |

Init Hash:

```jsx
0x32103411033f4f192bc82f2336cf034c3faf574dfaa3539190239fc1f27ab9fa
```

#### Mainnet Deployment

| **Contract**                       | **Address**                                  |
| ---------------------------------- | -------------------------------------------- |
| CapricornCLFactory                 | `0x6B5F564339DbAD6b780249827f2198a841FEB7F3` |
| TickLens                           | `0x0136B6347509D386c6da3896162BEBaAF19e51c4` |
| SwapRouter (V3)                    | `0xdac97b6a3951641B177283028A8f428332333071` |
| NftDescriptorLibrary               | `0x830b22425257A752314A5f0902559164c84e44A4` |
| NonfungibleTokenPositionDescriptor | `0xEd2850D3704a1a5BcB6158f27deDA3d6FF4C31D9` |
| NonfungibleTokenPositionManager    | `0x4C02af995BB1f574c9bf31F43ddc112414aE0Ac7` |
| V3Migrator                         | `0x53153392D0175D394D721CCF31173a49F7E6Ef53` |
| QuoterV2                           | `0xB430EDD2b54cdB3B25703fb3342ca3a88663A04D` |
| Multicall2                         | `0xEcEB2CfcB38D1f469f55a3E5dc0C950Df8A465c3` |

Init Hash:

```jsx
0x32103411033f4f192bc82f2336cf034c3faf574dfaa3539190239fc1f27ab9fa
```
