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: liquidity mining for xyk pallet #798

Merged
merged 16 commits into from
Apr 9, 2024
Merged

Conversation

martinfridrich
Copy link
Contributor

Description

This PR adds liquidity mining support for xyk pools.

Copy link

github-actions bot commented Apr 8, 2024

New crates:

  • pallet-xyk-liquidity-mining: v1.1.10

Crate versions that have been updated:

  • runtime-integration-tests: v1.19.12 -> v1.20.0
  • hydradx: v12.1.0 -> v12.2.0
  • pallet-asset-registry: v3.1.1 -> v3.2.0
  • pallet-bonds: v2.2.0 -> v2.2.1
  • pallet-circuit-breaker: v1.1.20 -> v1.1.21
  • pallet-dca: v1.4.1 -> v1.4.2
  • pallet-liquidity-mining: v4.3.0 -> v4.3.1
  • pallet-omnipool: v4.1.4 -> v4.1.5
  • pallet-omnipool-liquidity-mining: v2.1.2 -> v2.1.3
  • pallet-otc: v1.1.0 -> v1.1.1
  • pallet-route-executor: v2.2.0 -> v2.2.1
  • pallet-stableswap: v3.5.0 -> v3.5.1
  • pallet-xcm-rate-limiter: v0.1.5 -> v0.1.6
  • pallet-xyk: v6.4.0 -> v6.4.1
  • hydradx-adapters: v1.2.5 -> v1.3.0
  • hydradx-runtime: v225.0.0 -> v226.0.0
  • hydradx-traits: v3.1.1 -> v3.2.0

Runtime version has been increased.

@mrq1911 mrq1911 requested review from jak-pan and mrq1911 April 8, 2024 13:57
vec,
};

const INSSUFFICIENT_ASSET_ED_MULTIPLIER: u8 = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need this multiplier

let ed =
T::AssetRegistry::existential_deposit(reward_currency).ok_or(Error::<T>::AssetNotRegistered)?;

let pot = T::LiquidityMiningHandler::pot_account().ok_or(Error::<T>::FailToGetPotId)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

As I understand we need to seed the pot with ED on farm creation. We have two pots though, the first one is seeded on transfer by the farm creator. We could put some comment about this fact.

/// Pallet id.
type PalletId: Get<PalletId>;

/// NFT collection id for liq. mining deposit nfts. Has to be within the range of reserved NFT class IDs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// NFT collection id for liq. mining deposit nfts. Has to be within the range of reserved NFT class IDs.

Copy link
Contributor

@jak-pan jak-pan left a comment

Choose a reason for hiding this comment

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

Just small stuff otherwise LGTM.
Did we do benchmarks yet?

@martinfridrich
Copy link
Contributor Author

Just small stuff otherwise LGTM. Did we do benchmarks yet?

Yes, committed weights are from new benchmarks with insufficient assets

@martinfridrich martinfridrich requested a review from jak-pan April 9, 2024 11:04
@mrq1911 mrq1911 merged commit ad6046e into master Apr 9, 2024
4 checks passed
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.

3 participants