Skip to content

Disable user liquidity completely #2374

@gztensor

Description

@gztensor
  • Make swap::add_liquidity extrinsic to always return UserLiquidityDisabled
  • In disable_lp function do not stop early if do_dissolve_all_liquidity_providers returns error.

Acceptance criteria:

Setup: Create subnet on devnet with Charlie (sn4).

  • Extrinsic swap::add_liquidity(4, 100000) called by Charlie returns UserLiquidityDisabled
  • Extrinsic swap::add_liquidity(4, 100000) called by Alice returns UserLiquidityDisabled
  • Extrinsic swap::toggle_user_liquidity(4, True) called by Charlie succeeds, but has no effect (swap::enabledUserLiquidity(4) map remains False).
  • The Positions map only returns protocol liqudity positions (to ensure do_dissolve_all_liquidity_providers will have no effect even if it fails)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions