ConcentratedLiquidityPoolFactory

Factory contract responsible for creating Concentrated Liquidity Pool

Updates

  • 2022. 9. 16: The (swapFee, tickSpacing) combination was changed

    Before: (600, 6), (100,1)

    After: (600,2), (100,2)

Overview

Concentrated Liquidity Pool Factory is used to create Concentrated Liquidity Pool via Deployer. Currently, there is only one factory, but in the future, the number of factory contracts will increase in accordance with the collaboration with various protocols. Multiple pools for a token pair can be created based on swapFee, tickSpacing, and callbackAddress.

It is recommended to set swapFee and tickSpacing according to the formula below. A pair with high volatility is advantageous when tick spacing and swap fee are high, and a pair with low volatility is advantageous when tick spacing and swap fee are low. In Pangea, by default, (swapFee, tickSpacing) are set (2000, 40) for a volatile pair and (600, 2) for a stable pair. (On Sep 16, 2022, the default tickSpacing of a stable pair was changed to 2)

tickSpacing=Math.round(swapFee0.02)tickSpacing = Math.round(swapFee * 0.02)

There are currently 4 possible combinations of swapFee and tickSpacing.

swapFee
tickSpacing

1%

100

0.2%

20

0.06%

2

0.01%

2

Methods

configAddress

Returns the address of the pool created with the given config data

Parameters

Name

Type

Description

data

bytes32

abi.encode(address tokenA, address tokenB, uint24 swapFee, uint24 tickSpacing);

deployPool

Creates and deploys a pool. if exists, revert.

Parameters

Name

Type

Description

deployData

bytes

abi.encode(address tokenA, address tokenB, uint24 swapFee, uint160 price, uint24 tickSpacing, address callback)

getPools

Returns the list of pools composed of two tokens

isPool

Returns whether the pool is created by the factory

poolsCount

Returns the number of pools composed of two tokens

Last updated