Skip to content

Conversation

malgus01
Copy link
Contributor

Pull Request

Summary

This PR enhances the LiquidityManagerV2 contract with additional administrative controls. These functions give the owner the ability to update critical contracts, pause/unpause protocol operations, and enable emergency mode for pools when necessary.

Changes

  • LiquidityManagerV2
    • Added updateVestingContract(newVestingContract):
      • Updates the vesting contract reference.
      • Includes zero address validation.
    • Added updateFactoryContract(newFactory):
      • Updates the factory contract reference.
      • Includes zero address validation.
    • Added pause():
      • Pauses contract operations using OpenZeppelin’s Pausable.
    • Added unpause():
      • Resumes contract operations.
    • Added enableEmergencyMode(poolId):
      • Enables emergency mode for a given pool.
  • Added full Natspec comments for all new functions.
  • Ran forge fmt for consistent formatting.

Motivation

  • Provides flexibility to upgrade critical external contracts (vesting/factory).
  • Improves protocol safety with the ability to pause/unpause operations in case of emergencies.
  • Introduces emergency mode at the pool level for granular response to crises.
  • Strengthens overall governance and operational resilience.

Next Steps

  • Emit dedicated events for each admin action to improve transparency.
  • Introduce role-based access (e.g., AccessControl) instead of onlyOwner for better governance distribution.
  • Consider timelock or multisig for critical admin operations to reduce centralization risks.

@tyranis0x01 tyranis0x01 self-requested a review September 20, 2025 18:36
@tyranis0x01 tyranis0x01 added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 20, 2025
@tyranis0x01 tyranis0x01 merged commit 60a5802 into CraftMeme:main Sep 21, 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