ConcentratedLiquidityPoolFactory
Factory contract responsible for creating Concentrated Liquidity Pool
Last updated
Factory contract responsible for creating Concentrated Liquidity Pool
Last updated
2022. 9. 16: The (swapFee, tickSpacing) combination was changed
Before: (600, 6), (100,1)
After: (600,2), (100,2)
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)
There are currently 4 possible combinations of swapFee and tickSpacing.
1%
100
0.2%
20
0.06%
2
0.01%
2
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);
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)
Returns the list of pools composed of two tokens
Returns whether the pool is created by the factory
Returns the number of pools composed of two tokens