Skip to content

ops: Add a deprecation flag for legacy V1 pools #96

@AlAfiz

Description

@AlAfiz

Description

When we eventually launch V2 of the TradeFlow smart contracts, we cannot force users to migrate, but we need to signal that V1 is deprecated.
We need an Admin-only set_deprecated() flag on the pool contracts.
When deprecated is true, swaps should be permanently disabled, but liquidity withdrawals must remain permanently active.
This ensures a safe, non-custodial sunsetting process for older liquidity pairs.

Requirements

  • Add a is_deprecated: bool flag to the pool's instance storage.
  • Create an Admin-only function to toggle this flag to true (it should be an irreversible one-way toggle).
  • Add a require(!is_deprecated) assertion to the swap and provide_liquidity functions.
  • Ensure the remove_liquidity function intentionally bypasses this check so users can always exit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions