Factory
This documentation provides an overview of the IFactory.sol. This contract defines the functions and events for creating and managing pools on Maverick AMM.
Last updated
This documentation provides an overview of the IFactory.sol. This contract defines the functions and events for creating and managing pools on Maverick AMM.
Last updated
Name : IFactory
Solidity Version : ^0.8.0
SPDX License-Identifier : GPL-2.0-or-later
Factory
is Deployed to
Ethereum:
ZKSync Era:
Code:
Event emitted when a new pool is created.
Parameters :
poolAddress
: The address
of the created pool
fee
: The rate in prbmath 60x18
decimal format
tickSpacing
: The bin width represented as 1.0001^tickSpacing
activeTick
: The initial active tick of the pool
lookback
: The time-weighted average price (TWAP) lookback in whole seconds
protocolFeeRatio
: The ratio of the swap fee that is kept for the protocol
tokenA
: The ERC20
token A used in the pool
tokenB
: The ERC20
token B used in the pool
Event emitted when the protocol fee ratio is updated.
Parameters :
protocolFeeRatio
: The new protocol fee ratio
Event emitted when the owner of the factory is updated.
Parameters :
owner
: The new owner address
Creates a new pool.
Parameters :
_fee
: The rate in prbmath 60x18
decimal format
_tickSpacing
: The bin width represented as 1.0001^tickSpacing
_lookback
: The time-weighted average price (TWAP) lookback in whole seconds
_activeTick
: The initial active tick of the pool
_tokenA
: The ERC20 token A to be used in the pool
_tokenB
: The ERC20 token B to be used in the pool
Returns :
IPool
: An instance of the IPool
interface representing the created pool
Looks up an existing pool based on the specified parameters.
Parameters :
fee
: The rate in prbmath 60x18
decimal format
tickSpacing
: The bin width represented as 1.0001^tickSpacing
lookback
: The time-weighted average price (TWAP) lookback in whole seconds
tokenA
: The ERC20
token A used in the pool
tokenB
: The ERC20
token B used in the pool
Returns :
IPool
: An instance of the IPool
interface representing the found pool, or a zero
address if no pool matches the parameters
Retrieves the address of the factory owner.
Returns :
address
: The address
of the factory owner
Retrieves the IPosition interface associated with the factory.
Returns :
IPosition
: An instance of the IPosition
interface associated with the factory
Retrieves the current protocol fee ratio.
Returns :
The current protocol fee ratio in uint64
.
Checks if a pool is owned by the factory.
Parameters :
pool
: An instance of the IPool
interface representing the pool to check.
Returns :
A boolean
indicating whether the pool is owned by the factory.