-
Notifications
You must be signed in to change notification settings - Fork 33
ops: Add a deprecation flag for legacy V1 pools #96
Copy link
Copy link
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
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: boolflag 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 theswapandprovide_liquidityfunctions. - Ensure the
remove_liquidityfunction intentionally bypasses this check so users can always exit.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program