API reference v1.0
Introduction
periphery
tokenomics
IAlgebraFactory

IAlgebraFactory

IAlgebraFactory

The interface for the Algebra Factory

Events

Owner

Owner(address)

Emitted when the owner of the factory is changed

NameTypeDescription
newOwneraddressThe owner after the owner was changed

VaultAddress

VaultAddress(address)

Emitted when the vault address is changed

NameTypeDescription
newVaultAddressaddressThe vault address after the address was changed

Pool

Pool(address,address,address)

Emitted when a pool is created

NameTypeDescription
token0addressThe first token of the pool by address sort order
token1addressThe second token of the pool by address sort order
pooladdressThe address of the created pool

FarmingAddress

FarmingAddress(address)

Emitted when the farming address is changed

NameTypeDescription
newFarmingAddressaddressThe farming address after the address was changed

FeeConfiguration

FeeConfiguration(uint16,uint16,uint32,uint32,uint16,uint16,uint32,uint16,uint16)

NameTypeDescription
alpha1uint16
alpha2uint16
beta1uint32
beta2uint32
gamma1uint16
gamma2uint16
volumeBetauint32
volumeGammauint16
baseFeeuint16

Functions

owner

owner() view external

Returns the current owner of the factory

Returns:

NameTypeDescription
[0]address

poolDeployer

poolDeployer() view external

Returns the current poolDeployerAddress

Returns:

NameTypeDescription
[0]address

farmingAddress

farmingAddress() view external

Returns:

NameTypeDescription
[0]address

vaultAddress

vaultAddress() view external

Returns:

NameTypeDescription
[0]address

poolByPair

poolByPair(address,address) view external

Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist

NameTypeDescription
tokenAaddressThe contract address of either token0 or token1
tokenBaddressThe contract address of the other token

Returns:

NameTypeDescription
pooladdress

createPool

createPool(address,address) external

Creates a pool for the given two tokens and fee

NameTypeDescription
tokenAaddressOne of the two tokens in the desired pool
tokenBaddressThe other of the two tokens in the desired pool

Returns:

NameTypeDescription
pooladdress

setOwner

setOwner(address) external

Updates the owner of the factory

NameTypeDescription
_owneraddressThe new owner of the factory

setFarmingAddress

setFarmingAddress(address) external

NameTypeDescription
_farmingAddressaddressThe new tokenomics contract address

setVaultAddress

setVaultAddress(address) external

NameTypeDescription
_vaultAddressaddressThe new vault contract address

setBaseFeeConfiguration

setBaseFeeConfiguration(uint16,uint16,uint32,uint32,uint16,uint16,uint32,uint16,uint16) external

Changes initial fee configuration for new pools

NameTypeDescription
alpha1uint16max value of the first sigmoid
alpha2uint16max value of the second sigmoid
beta1uint32shift along the x-axis for the first sigmoid
beta2uint32shift along the x-axis for the second sigmoid
gamma1uint16horizontal stretch factor for the first sigmoid
gamma2uint16horizontal stretch factor for the second sigmoid
volumeBetauint32shift along the x-axis for the outer volume-sigmoid
volumeGammauint16horizontal stretch factor the outer volume-sigmoid
baseFeeuint16minimum possible fee