Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for POL withdrawal to omnipool #692

Merged
merged 17 commits into from
Oct 31, 2023
Merged

Conversation

enthusiastmartin
Copy link
Contributor

This PR adds the two following extrinsics:

  • withdraw_protocol_liquidity - adds to support to withdraw protocol liquidity given known price at the time
  • remove_token - removes tokens from omnipool given that only protocol owns shares

This PR also changes remove_liquidity

  • it skips price check and circuit breaker check if withdrawal is safe. Withdrawal is considered safe when asset tradability state is set to only REMOVE_LIQUIDITY or REMOVE_LIQUIDITY | ADD_LIQUIDITY. Basically, when trading is disabled.

@github-actions
Copy link

Crate versions that have been updated:

  • runtime-integration-tests: v1.13.0 -> v1.14.0
  • pallet-omnipool: v3.2.3 -> v3.3.0
  • hydradx-adapters: v0.6.3 -> v0.6.4
  • hydradx-runtime: v183.0.0 -> v184.0.0

Runtime version has been increased.

pallets/omnipool/src/lib.rs Outdated Show resolved Hide resolved
pallets/omnipool/src/lib.rs Show resolved Hide resolved
@mrq1911 mrq1911 merged commit a798076 into master Oct 31, 2023
6 checks passed
@jak-pan jak-pan deleted the feat/pol-withdraw branch February 22, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants