ConcentratedLiquidityPoolFactory
Concentrated Liquidity Pool을 생성하는 팩토리 컨트랙트입니다.
변경 내용
2022년 9월 16일~ : (swapFee, tickSpacing) 조합 변경
-변경 전: (600,6) , (100,1)
-변경 후: (600,2) , (100,2)
Overview

Concentrated Liquidity Pool Factory는 Deployer를 통해 Concentrated Liquidity Pool을 생성하는 데 사용됩니다. 현재는 하나의 팩토리만 존재하지만, 이후에 다양한 프로토콜의 협업에 따라 팩토리 컨트랙트는 늘어날 예정입니다. 두 토큰에 대한 풀은 swapFee, tickSpacing, callbackAddress에 따라 여러 풀을 생성할 수 있습니다.
기본적으로 swapFee와 tickSpacing은 아래의 공식에 따라 만들기를 권장합니다. volatility가 높은 페어일수록 tick spacing과 swap Fee는 높을수록 유리하고, volatility가 낮은 페어일수록 tick spacing과 swap Fee는 낮을수록 유리합니다. Pangea에서는 volatile pair의 경우에는 (swapFee, tickSpacing) = (2000, 20), stable pair의 경우에는 (swapFee, tickSpacing) = (600, 2)을 default로 세팅하고 있습니다. (22년 9월 16일, 신규 stable pair의 tickSpacing 2로 변경)
현재 가능한 swapFee와 tickSpacing 조합은 총 4가지 입니다.
1%
100
0.2%
20
0.06%
2
0.01%
2
Methods
configAddress
function configAddress(bytes32 data) external nonpayable returns (address pool)
Returns the address of the pool created with the given config data
Parameters
Name
Type
Description
data
bytes32
keccak256(abi.encode(address tokenA, address tokenB, uint24 swapFee, uint24 tickSpacing))
deployPool
function deployPool(bytes deployData) external nonpayable returns (address pool)
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)
getPools
function getPools(address token0, address token1, uint256 startIndex, uint256 count) external view returns (address[] pairPools)
Returns the list of pools composed of two tokens
isPool
function isPool(address pool) external nonpayable returns (bool ok)
Returns whether the pool is created by the factory
poolsCount
function poolsCount(address token0, address token1) external view returns (uint256 count)
Returns the number of pools composed of two tokens
Last updated