Skip to content

Conversation

@SynnekOG
Copy link

PR Description

Summary

This PR extends LiquidityManagerV2 with new internal functions to manage user positions and simplify liquidity handling, while improving event consistency.

Changes

  • Internal Functions

    • Added _createPosition:
      • Records user liquidity positions with full metadata (tokens, fee tier, ticks, liquidity, amounts, timestamp).
    • Added _calculateLiquidity:
      • Provides a simplified liquidity calculation for deposited token amounts.
  • Event Updates

    • Updated emitted events to unwrap Currency types for clarity and consistency.
  • Refactoring

    • Adjusted _setupVesting to unwrap currency0 before use.

Impact

  • Enables proper tracking of user liquidity positions for analytics and withdrawals.
  • Establishes groundwork for integrating with Uniswap V4 liquidity math in the future.
  • Improves event readability for off-chain indexers and dashboards.

Next Steps

  • Integrate real Uniswap V4 math libraries for liquidity calculations.
  • Add events for position creation and updates.
  • Expand _createPosition to support position removal/updates.

@2PykeETH 2PykeETH self-requested a review September 23, 2025 17:06
@2PykeETH 2PykeETH added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 23, 2025
@2PykeETH 2PykeETH merged commit cf27919 into CraftMeme:main Sep 23, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants