IAlgebraPoolEvents
Events emitted by a pool
Developer note: Credit to Uniswap Labs under GPL-2.0-or-later license: https://github.com/Uniswap/v3-core/tree/main/contracts/interfaces
Events
Initialize
event Initialize(uint160 price, int24 tick)
Emitted exactly once by a pool when #initialize is first called on the pool Developer note: Mint/Burn/Swap cannot be emitted by the pool before Initialize
price
uint160
The initial sqrt price of the pool, as a Q64.96
tick
int24
The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
Mint
event Mint(address sender, address owner, int24 bottomTick, int24 topTick, uint128 liquidityAmount, uint256 amount0, uint256 amount1)
Emitted when liquidity is minted for a given position
sender
address
The address that minted the liquidity
owner
address
The owner of the position and recipient of any minted liquidity
bottomTick
int24
The lower tick of the position
topTick
int24
The upper tick of the position
liquidityAmount
uint128
The amount of liquidity minted to the position range
amount0
uint256
How much token0 was required for the minted liquidity
amount1
uint256
How much token1 was required for the minted liquidity
Collect
event Collect(address owner, address recipient, int24 bottomTick, int24 topTick, uint128 amount0, uint128 amount1)
Emitted when fees are collected by the owner of a position Developer note: Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
owner
address
The owner of the position for which fees are collected
recipient
address
The address that received fees
bottomTick
int24
The lower tick of the position
topTick
int24
The upper tick of the position
amount0
uint128
The amount of token0 fees collected
amount1
uint128
The amount of token1 fees collected
Burn
event Burn(address owner, int24 bottomTick, int24 topTick, uint128 liquidityAmount, uint256 amount0, uint256 amount1)
Emitted when a position's liquidity is removed Developer note: Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
owner
address
The owner of the position for which liquidity is removed
bottomTick
int24
The lower tick of the position
topTick
int24
The upper tick of the position
liquidityAmount
uint128
The amount of liquidity to remove
amount0
uint256
The amount of token0 withdrawn
amount1
uint256
The amount of token1 withdrawn
Swap
event Swap(address sender, address recipient, int256 amount0, int256 amount1, uint160 price, uint128 liquidity, int24 tick)
Emitted by the pool for any swaps between token0 and token1
sender
address
The address that initiated the swap call, and that received the callback
recipient
address
The address that received the output of the swap
amount0
int256
The delta of the token0 balance of the pool
amount1
int256
The delta of the token1 balance of the pool
price
uint160
The sqrt(price) of the pool after the swap, as a Q64.96
liquidity
uint128
The liquidity of the pool after the swap
tick
int24
The log base 1.0001 of price of the pool after the swap
Flash
event Flash(address sender, address recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1)
Emitted by the pool for any flashes of token0/token1
sender
address
The address that initiated the swap call, and that received the callback
recipient
address
The address that received the tokens from flash
amount0
uint256
The amount of token0 that was flashed
amount1
uint256
The amount of token1 that was flashed
paid0
uint256
The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
paid1
uint256
The amount of token1 paid for the flash, which can exceed the amount1 plus the fee
CommunityFee
event CommunityFee(uint8 communityFee0New, uint8 communityFee1New)
Emitted when the community fee is changed by the pool
communityFee0New
uint8
The updated value of the token0 community fee percent
communityFee1New
uint8
The updated value of the token1 community fee percent
TickSpacing
event TickSpacing(int24 newTickSpacing)
Emitted when the tick spacing changes
newTickSpacing
int24
The updated value of the new tick spacing
Incentive
event Incentive(address virtualPoolAddress)
Emitted when new activeIncentive is set
virtualPoolAddress
address
The address of a virtual pool associated with the current active incentive
Fee
event Fee(uint16 feeZto, uint16 feeOtz)
Emitted when the fee changes
feeZto
uint16
The value of the token fee for zto swaps
feeOtz
uint16
The value of the token fee for otz swaps
LiquidityCooldown
event LiquidityCooldown(uint32 liquidityCooldown)
Emitted when the LiquidityCooldown changes
liquidityCooldown
uint32
The value of locktime for added liquidity