Skip to content

Conversation

@SynnekOG
Copy link

Pull Request

Summary

This PR enhances LiquidityManagerV2 with token claiming and pool inspection capabilities. It introduces a new function to allow liquidity providers to claim vested tokens, as well as view functions for pool state and threshold checks.

Changes

  • Added
    • claimVestedTokens external function:
      • Allows users to release vested tokens via the vestingContract.
      • Secured with nonReentrant modifier.
    • isThresholdMet external view function:
      • Simplified implementation returning true (placeholder).
      • Provides a mechanism to verify liquidity thresholds per user and token.
    • getPoolInfo external view function:
      • Returns structured pool state:
        • initialized
        • totalLiquidity
        • liquidityThreshold
        • vestingDuration
        • providersCount
  • Organizational
    • Added View Functions section header for readability.
  • Formatting
    • Applied forge fmt for consistent styling.

Motivation

  • claimVestedTokens: Enables providers to access rewards once vesting periods are satisfied.
  • isThresholdMet: Placeholder check for liquidity threshold compliance, paving the way for vesting/reward logic.
  • getPoolInfo: Improves protocol transparency by exposing key pool parameters for dApp integrations and analytics.

Next Steps

  • Implement actual threshold checking logic in isThresholdMet.
  • Expand getPoolInfo to include more pool metadata (e.g., creator, emergencyMode).
  • Add unit tests for:
    • Successful token claim flow.
    • Pool info retrieval.
    • Threshold edge cases once implemented.

@2PykeETH 2PykeETH self-requested a review September 17, 2025 17:09
@2PykeETH 2PykeETH added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 17, 2025
@2PykeETH 2PykeETH merged commit b062144 into CraftMeme:main Sep 17, 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