API reference v1.0
Introduction
periphery
tokenomics
IAlgebraPoolEvents

IAlgebraPoolEvents

IAlgebraPoolEvents

Events

Initialize

Initialize(uint160,int24)

Emitted exactly once by a pool when #initialize is first called on the pool

NameTypeDescription
priceuint160The initial sqrt price of the pool, as a Q64.96
tickint24The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool

Mint

Mint(address,address,int24,int24,uint128,uint256,uint256)

Emitted when liquidity is minted for a given position

NameTypeDescription
senderaddressThe address that minted the liquidity
owneraddressThe owner of the position and recipient of any minted liquidity
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
liquidityAmountuint128The amount of liquidity minted to the position range
amount0uint256How much token0 was required for the minted liquidity
amount1uint256How much token1 was required for the minted liquidity

Collect

Collect(address,address,int24,int24,uint128,uint128)

Emitted when fees are collected by the owner of a position

NameTypeDescription
owneraddressThe owner of the position for which fees are collected
recipientaddressThe address that received fees
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
amount0uint128The amount of token0 fees collected
amount1uint128The amount of token1 fees collected

Burn

Burn(address,int24,int24,uint128,uint256,uint256)

Emitted when a position's liquidity is removed

NameTypeDescription
owneraddressThe owner of the position for which liquidity is removed
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
liquidityAmountuint128The amount of liquidity to remove
amount0uint256The amount of token0 withdrawn
amount1uint256The amount of token1 withdrawn

Swap

Swap(address,address,int256,int256,uint160,uint128,int24)

Emitted by the pool for any swaps between token0 and token1

NameTypeDescription
senderaddressThe address that initiated the swap call, and that received the callback
recipientaddressThe address that received the output of the swap
amount0int256The delta of the token0 balance of the pool
amount1int256The delta of the token1 balance of the pool
priceuint160The sqrt(price) of the pool after the swap, as a Q64.96
liquidityuint128The liquidity of the pool after the swap
tickint24The log base 1.0001 of price of the pool after the swap

Flash

Flash(address,address,uint256,uint256,uint256,uint256)

Emitted by the pool for any flashes of token0/token1

NameTypeDescription
senderaddressThe address that initiated the swap call, and that received the callback
recipientaddressThe address that received the tokens from flash
amount0uint256The amount of token0 that was flashed
amount1uint256The amount of token1 that was flashed
paid0uint256The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
paid1uint256The amount of token1 paid for the flash, which can exceed the amount1 plus the fee

CommunityFee

CommunityFee(uint8,uint8)

Emitted when the community fee is changed by the pool

NameTypeDescription
communityFee0Newuint8The updated value of the token0 community fee percent
communityFee1Newuint8The updated value of the token1 community fee percent

Incentive

Incentive(address)

Emitted when new activeIncentive is set

NameTypeDescription
virtualPoolAddressaddressThe address of a virtual pool associated with the current active incentive

Fee

Fee(uint16)

Emitted when the fee changes

NameTypeDescription
feeuint16The value of the token fee

LiquidityCooldown

LiquidityCooldown(uint32)

Emitted when the LiquidityCooldown changes

NameTypeDescription
liquidityCooldownuint32The value of locktime for added liquidity

IAlgebraPoolEvents

Events

Initialize

Initialize(uint160,int24)

Emitted exactly once by a pool when #initialize is first called on the pool

NameTypeDescription
priceuint160The initial sqrt price of the pool, as a Q64.96
tickint24The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool

Mint

Mint(address,address,int24,int24,uint128,uint256,uint256)

Emitted when liquidity is minted for a given position

NameTypeDescription
senderaddressThe address that minted the liquidity
owneraddressThe owner of the position and recipient of any minted liquidity
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
liquidityAmountuint128The amount of liquidity minted to the position range
amount0uint256How much token0 was required for the minted liquidity
amount1uint256How much token1 was required for the minted liquidity

Collect

Collect(address,address,int24,int24,uint128,uint128)

Emitted when fees are collected by the owner of a position

NameTypeDescription
owneraddressThe owner of the position for which fees are collected
recipientaddressThe address that received fees
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
amount0uint128The amount of token0 fees collected
amount1uint128The amount of token1 fees collected

Burn

Burn(address,int24,int24,uint128,uint256,uint256)

Emitted when a position's liquidity is removed

NameTypeDescription
owneraddressThe owner of the position for which liquidity is removed
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
liquidityAmountuint128The amount of liquidity to remove
amount0uint256The amount of token0 withdrawn
amount1uint256The amount of token1 withdrawn

Swap

Swap(address,address,int256,int256,uint160,uint128,int24)

Emitted by the pool for any swaps between token0 and token1

NameTypeDescription
senderaddressThe address that initiated the swap call, and that received the callback
recipientaddressThe address that received the output of the swap
amount0int256The delta of the token0 balance of the pool
amount1int256The delta of the token1 balance of the pool
priceuint160The sqrt(price) of the pool after the swap, as a Q64.96
liquidityuint128The liquidity of the pool after the swap
tickint24The log base 1.0001 of price of the pool after the swap

Flash

Flash(address,address,uint256,uint256,uint256,uint256)

Emitted by the pool for any flashes of token0/token1

NameTypeDescription
senderaddressThe address that initiated the swap call, and that received the callback
recipientaddressThe address that received the tokens from flash
amount0uint256The amount of token0 that was flashed
amount1uint256The amount of token1 that was flashed
paid0uint256The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
paid1uint256The amount of token1 paid for the flash, which can exceed the amount1 plus the fee

CommunityFee

CommunityFee(uint8,uint8)

Emitted when the community fee is changed by the pool

NameTypeDescription
communityFee0Newuint8The updated value of the token0 community fee percent
communityFee1Newuint8The updated value of the token1 community fee percent

Incentive

Incentive(address)

Emitted when new activeIncentive is set

NameTypeDescription
virtualPoolAddressaddressThe address of a virtual pool associated with the current active incentive

Fee

Fee(uint16)

Emitted when the fee changes

NameTypeDescription
feeuint16The value of the token fee

LiquidityCooldown

LiquidityCooldown(uint32)

Emitted when the LiquidityCooldown changes

NameTypeDescription
liquidityCooldownuint32The value of locktime for added liquidity

IAlgebraPoolEvents

Events

Initialize

Initialize(uint160,int24)

Emitted exactly once by a pool when #initialize is first called on the pool

NameTypeDescription
priceuint160The initial sqrt price of the pool, as a Q64.96
tickint24The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool

Mint

Mint(address,address,int24,int24,uint128,uint256,uint256)

Emitted when liquidity is minted for a given position

NameTypeDescription
senderaddressThe address that minted the liquidity
owneraddressThe owner of the position and recipient of any minted liquidity
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
liquidityAmountuint128The amount of liquidity minted to the position range
amount0uint256How much token0 was required for the minted liquidity
amount1uint256How much token1 was required for the minted liquidity

Collect

Collect(address,address,int24,int24,uint128,uint128)

Emitted when fees are collected by the owner of a position

NameTypeDescription
owneraddressThe owner of the position for which fees are collected
recipientaddressThe address that received fees
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
amount0uint128The amount of token0 fees collected
amount1uint128The amount of token1 fees collected

Burn

Burn(address,int24,int24,uint128,uint256,uint256)

Emitted when a position's liquidity is removed

NameTypeDescription
owneraddressThe owner of the position for which liquidity is removed
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
liquidityAmountuint128The amount of liquidity to remove
amount0uint256The amount of token0 withdrawn
amount1uint256The amount of token1 withdrawn

Swap

Swap(address,address,int256,int256,uint160,uint128,int24)

Emitted by the pool for any swaps between token0 and token1

NameTypeDescription
senderaddressThe address that initiated the swap call, and that received the callback
recipientaddressThe address that received the output of the swap
amount0int256The delta of the token0 balance of the pool
amount1int256The delta of the token1 balance of the pool
priceuint160The sqrt(price) of the pool after the swap, as a Q64.96
liquidityuint128The liquidity of the pool after the swap
tickint24The log base 1.0001 of price of the pool after the swap

Flash

Flash(address,address,uint256,uint256,uint256,uint256)

Emitted by the pool for any flashes of token0/token1

NameTypeDescription
senderaddressThe address that initiated the swap call, and that received the callback
recipientaddressThe address that received the tokens from flash
amount0uint256The amount of token0 that was flashed
amount1uint256The amount of token1 that was flashed
paid0uint256The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
paid1uint256The amount of token1 paid for the flash, which can exceed the amount1 plus the fee

CommunityFee

CommunityFee(uint8,uint8)

Emitted when the community fee is changed by the pool

NameTypeDescription
communityFee0Newuint8The updated value of the token0 community fee percent
communityFee1Newuint8The updated value of the token1 community fee percent

Incentive

Incentive(address)

Emitted when new activeIncentive is set

NameTypeDescription
virtualPoolAddressaddressThe address of a virtual pool associated with the current active incentive

Fee

Fee(uint16)

Emitted when the fee changes

NameTypeDescription
feeuint16The value of the token fee

LiquidityCooldown

LiquidityCooldown(uint32)

Emitted when the LiquidityCooldown changes

NameTypeDescription
liquidityCooldownuint32The value of locktime for added liquidity

IAlgebraPoolEvents

Events

Initialize

Initialize(uint160,int24)

Emitted exactly once by a pool when #initialize is first called on the pool

NameTypeDescription
priceuint160The initial sqrt price of the pool, as a Q64.96
tickint24The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool

Mint

Mint(address,address,int24,int24,uint128,uint256,uint256)

Emitted when liquidity is minted for a given position

NameTypeDescription
senderaddressThe address that minted the liquidity
owneraddressThe owner of the position and recipient of any minted liquidity
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
liquidityAmountuint128The amount of liquidity minted to the position range
amount0uint256How much token0 was required for the minted liquidity
amount1uint256How much token1 was required for the minted liquidity

Collect

Collect(address,address,int24,int24,uint128,uint128)

Emitted when fees are collected by the owner of a position

NameTypeDescription
owneraddressThe owner of the position for which fees are collected
recipientaddressThe address that received fees
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
amount0uint128The amount of token0 fees collected
amount1uint128The amount of token1 fees collected

Burn

Burn(address,int24,int24,uint128,uint256,uint256)

Emitted when a position's liquidity is removed

NameTypeDescription
owneraddressThe owner of the position for which liquidity is removed
bottomTickint24The lower tick of the position
topTickint24The upper tick of the position
liquidityAmountuint128The amount of liquidity to remove
amount0uint256The amount of token0 withdrawn
amount1uint256The amount of token1 withdrawn

Swap

Swap(address,address,int256,int256,uint160,uint128,int24)

Emitted by the pool for any swaps between token0 and token1

NameTypeDescription
senderaddressThe address that initiated the swap call, and that received the callback
recipientaddressThe address that received the output of the swap
amount0int256The delta of the token0 balance of the pool
amount1int256The delta of the token1 balance of the pool
priceuint160The sqrt(price) of the pool after the swap, as a Q64.96
liquidityuint128The liquidity of the pool after the swap
tickint24The log base 1.0001 of price of the pool after the swap

Flash

Flash(address,address,uint256,uint256,uint256,uint256)

Emitted by the pool for any flashes of token0/token1

NameTypeDescription
senderaddressThe address that initiated the swap call, and that received the callback
recipientaddressThe address that received the tokens from flash
amount0uint256The amount of token0 that was flashed
amount1uint256The amount of token1 that was flashed
paid0uint256The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
paid1uint256The amount of token1 paid for the flash, which can exceed the amount1 plus the fee

CommunityFee

CommunityFee(uint8,uint8)

Emitted when the community fee is changed by the pool

NameTypeDescription
communityFee0Newuint8The updated value of the token0 community fee percent
communityFee1Newuint8The updated value of the token1 community fee percent

Incentive

Incentive(address)

Emitted when new activeIncentive is set

NameTypeDescription
virtualPoolAddressaddressThe address of a virtual pool associated with the current active incentive

Fee

Fee(uint16)

Emitted when the fee changes

NameTypeDescription
feeuint16The value of the token fee

LiquidityCooldown

LiquidityCooldown(uint32)

Emitted when the LiquidityCooldown changes

NameTypeDescription
liquidityCooldownuint32The value of locktime for added liquidity