Skip to content

Conversation

@dmoka
Copy link
Contributor

@dmoka dmoka commented Dec 19, 2025

Fixes: #1294

TODOS:

  • add new extrinsic
  • review
  • test by FE on PASEO as we have PAPI there. We should do this when current release is done, as we dont want to add anytgin to paseo till then
  • add benchmark tests and rebench

@github-actions
Copy link

github-actions bot commented Dec 19, 2025

Crate versions that have not been updated:

  • pallet-omnipool: v5.1.11

Crate versions that have been updated:

  • runtime-integration-tests: v1.61.1 -> v1.62.0
  • pallet-liquidity-mining: v4.4.8 -> v4.4.9
  • pallet-omnipool-liquidity-mining: v2.7.1 -> v2.8.0
  • pallet-stableswap: v7.0.0 -> v7.1.0
  • pallet-xyk: v8.0.0 -> v8.0.1
  • pallet-xyk-liquidity-mining: v1.6.1 -> v1.6.2
  • hydradx-runtime: v377.0.0 -> v378.0.0
  • hydradx-traits: v4.4.3 -> v4.5.0

Runtime version has been increased.

@dmoka dmoka requested a review from martinfridrich December 22, 2025 20:56
@github-actions
Copy link

Quick benchmark at commit e1e25b3 has been executed successfully.
View results

[package]
name = "pallet-omnipool-liquidity-mining"
version = "2.7.1"
version = "2.8.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be really be 3.0.0 because it breaks the api by adding extra parameter.

Copy link
Contributor Author

@dmoka dmoka Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it really break the API? I mean, it is just an optional param in the end, AFAIK it doesn't break API.

/// other pallets to call it and receive the transferred amount.
#[require_transactional]
pub fn do_remove_liquidity_with_limit(
origin: OriginFor<T>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

account instead of origin. origin can be ensured just before.
also usage of this in the omnipool-lm favors this approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the thing is that on_liquidity_changed requires origin, so i think we need to keep it as is, unfortunately.

Comment on lines +13 to +26
fn remove_liquidity_one_asset(
who: AccountId,
pool_id: AssetId,
asset_id: AssetId,
share_amount: Balance,
min_amount_out: Balance,
) -> Result<Balance, DispatchError>;

fn remove_liquidity(
who: AccountId,
pool_id: AssetId,
share_amount: Balance,
min_amounts_out: Vec<AssetAmount<AssetId>>,
) -> Result<(), DispatchError>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not make much sense here. the trait is called AddLiquidity.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. Since this trait is only used in omnipool liqudity mining, i would rename it to "StableswapLiquidityMutation'

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.

add new extrinsic for removing stableswap liquidity from omnipool lp/omnipool lp in farm

3 participants