Skip to content

Make liquidity events consistent#1814

Merged
sam0x17 merged 1 commit intoopentensor:devnet-readyfrom
tensorplex-labs:features/more-liquidity-events
Jul 3, 2025
Merged

Make liquidity events consistent#1814
sam0x17 merged 1 commit intoopentensor:devnet-readyfrom
tensorplex-labs:features/more-liquidity-events

Conversation

@axionyu
Copy link
Contributor

@axionyu axionyu commented Jul 3, 2025

Description

The goal of this fix is to make the liquidity events more consistent - liquidity, tick_low and tick_high will be emitted for LiquidityAdded (Mint), LiquidityRemoved (Burn) and LiquidityModified. This is to ensure that the event emission logic is similar to Uniswap V3 (https://docs.uniswap.org/contracts/v3/reference/core/interfaces/pool/IUniswapV3PoolEvents#burn)

Referencing the Burn and Mint event there.

Note: I have also moved the UpdateLiquidityResult from the swap-interface pallet to the swap pallet. The reason is that the TickIndex is in the swap pallet. If I add the swap pallet as a dependency, it would result in a circular dependency so thus I decided to move it.

Related Issue(s)

  • Closes #[issue number]

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Breaking Change

If this PR introduces a breaking change, please provide a detailed description of the impact and the migration path for existing applications.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • [x ] I have run cargo fmt and cargo clippy to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • [x ] New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if applicable)

Please include any relevant screenshots or GIFs that demonstrate the changes made.

Additional Notes

Please provide any additional information or context that may be helpful for reviewers.

@ales-otf ales-otf added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Jul 3, 2025
ales-otf
ales-otf previously approved these changes Jul 3, 2025
@axionyu axionyu force-pushed the features/more-liquidity-events branch from 8d17825 to e1d3800 Compare July 3, 2025 21:50
@sam0x17 sam0x17 merged commit 8c2eb91 into opentensor:devnet-ready Jul 3, 2025
58 of 61 checks passed
@sam0x17 sam0x17 mentioned this pull request Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants