MasterDeployer

Concentrated Liquidity Pool을 배포하는 컨트랙트로, 풀을 생성하는 팩토리의 권한을 관리합니다.

Overview

Pangea는 Trident가 제시한 방향인 Pool을 생성하는 Factory와 배포하는 Deployer를 분리하는 설계를 채택하였습니다. 이렇게 함으로써 향후 Pool의 스펙을 변경함에 있어서 자유로워지고, 더 나아가 다른 DAPP의 요구사항에 따라 맞춤형 Pool을 구현할 수 있습니다.

예를 들어, 시간에 따라 total Supply가 변화하는 Ampleforth와 같은 Rebasing Token 토큰들은 기존의 Pool spec으로서는 수용하기 어려웠습니다. 하지만 Deployer와 Factory를 분리한 Pangea에서는 프로토콜의 요청 사항에 따라 맞춤형으로 Pool Factory를 개발하여 맞춤형 Pool들을 배포할 수 있습니다.

Methods

airdropDistributor

function airdropDistributor() external nonpayable returns (address)

Returns Airdrop Distributor address

deployPool

function deployPool(address factory, bytes deployData) external nonpayable returns (address)

Creates pool through factory

getFactoryAddress

function getFactoryAddress(address pool) external view returns (address factory)

Returns the address of the Factory which deployed the pool

getPoolAddress

function getPoolAddress(uint256 idx) external view returns (address pool)

Return the address of the pool by index

pools

function pools(address pool) external view returns (bool)

Returns whether the pool was deployed via a deployer

protocolFeeTo

Returns the address receiving protocol fees from Pool

function protocolFeeTo() external view returns (address)

totalPoolsCount

function totalPoolsCount() external view returns (uint256 total)

Returns the number of pools deployed from the masterDeployer

Events

AddToWhitelistFactory

event AddToWhitelistFactory(address indexed factory)

DeployPool

event DeployPool(address indexed factory, address indexed pool, bytes deployData)

ProtocolFeeToUpdated

event ProtocolFeeToUpdated(address protocolFeeTo)

RemoveFromWhitelistFactory

event RemoveFromWhitelistFactory(address indexed factory)

Last updated