IDiamondSwapV3PoolEvents
DiamondSwap V3 Pool Events Interface (IDiamondSwapV3PoolEvents)
The DiamondSwap V3 Pool Events Interface (IDiamondSwapV3PoolEvents) defines the key events emitted by the DiamondSwap liquidity pools. These events provide transparency and allow users and developers to track important actions and changes within the pools. Below is a detailed breakdown of the events associated with the DiamondSwap V3 Pool Events Interface.
Events
Initialize(uint160 sqrtPriceX96, int24 tick)
Initialize(uint160 sqrtPriceX96, int24 tick)
This event is emitted when a pool is initialized with its initial price.
- sqrtPriceX96: The square root of the initial price of the pool, represented as a Q64.96 number. This value sets the starting point for the pool’s price.
- tick: The initial tick corresponding to the price. The tick is an integer value representing the position of the price within the pool's tick structure.
This event is critical as it marks the beginning of the pool’s life, indicating that the pool is ready for trades and liquidity provision.
Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1)
Mint(address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1)
This event is emitted whenever liquidity is added to the pool.
- sender: The address that initiated the mint (i.e., the addition of liquidity).
- owner: The address that owns the liquidity position.
- tickLower: The lower tick of the liquidity position's price range.
- tickUpper: The upper tick of the liquidity position's price range.
- amount: The amount of liquidity added.
- amount0: The amount of token0 deposited into the pool.
- amount1: The amount of token1 deposited into the pool.
This event is important for tracking liquidity additions and understanding how much liquidity is being provided within specific price ranges.
Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1)
Burn(address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1)
This event is emitted whenever liquidity is removed from the pool.
- owner: The address that owns the liquidity position.
- tickLower: The lower tick of the liquidity position's price range.
- tickUpper: The upper tick of the liquidity position's price range.
- amount: The amount of liquidity removed.
- amount0: The amount of token0 withdrawn from the pool.
- amount1: The amount of token1 withdrawn from the pool.
This event helps track the removal of liquidity from the pool, providing insights into liquidity shifts within the protocol.
Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick)
Swap(address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick)
This event is emitted whenever a swap occurs within the pool.
- sender: The address that initiated the swap.
- recipient: The address receiving the output of the swap.
- amount0: The change in token0 balance due to the swap. A positive value indicates token0 was sent to the pool, while a negative value indicates token0 was sent to the recipient.
- amount1: The change in token1 balance due to the swap. A positive value indicates token1 was sent to the pool, while a negative value indicates token1 was sent to the recipient.
- sqrtPriceX96: The price of the pool after the swap, represented as a Q64.96 number.
- liquidity
Updated 3 months ago