Skip to content

fix: use ema-oracle instead of spot price to calc. valued shares in xyk-liquidity-mining - #1153

Merged
martinfridrich merged 20 commits into
masterfrom
fix/xyk-lm-use-oracle-to-value-shares
Jul 14, 2025
Merged

fix: use ema-oracle instead of spot price to calc. valued shares in xyk-liquidity-mining#1153
martinfridrich merged 20 commits into
masterfrom
fix/xyk-lm-use-oracle-to-value-shares

Conversation

@martinfridrich

@martinfridrich martinfridrich commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

This PR changes xyk-liquidity-mining shares valuation to use ema-oracle pallet instead of spot price.

This PR depends on #1152

@github-actions

github-actions Bot commented Jul 10, 2025

Copy link
Copy Markdown

Crate versions that have been updated:

  • runtime-integration-tests: v1.45.3 -> v1.45.4
  • pallet-xyk: v6.10.0 -> v7.0.0
  • pallet-xyk-liquidity-mining: v1.5.0 -> v1.6.0
  • hydradx-runtime: v328.0.0 -> v329.0.0

Runtime version has been increased.

@martinfridrich
martinfridrich requested review from dmoka and jak-pan July 10, 2025 13:38
Comment thread pallets/xyk-liquidity-mining/src/lib.rs Outdated
type OraclePeriod: Get<OraclePeriod>;

/// XYK assets' liquidity oracle.
type LiquidityOracle: AggregatedOracle<AssetId, Balance, BlockNumberFor<Self>, pallet_ema_oracle::Price>;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

instead of price from ema oracle pallet. you can use EmaPrice from math package.

this way , you dont need to be dependent on pallet-ema-oracle.

@martinfridrich
martinfridrich changed the base branch from feat/ema-oracle-track-shares-issuance to master July 14, 2025 15:18
@github-actions

Copy link
Copy Markdown

Quick benchmark at commit 908bcce has been executed successfully.
View results

@martinfridrich
martinfridrich merged commit 2aeba07 into master Jul 14, 2025
9 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