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: integrate EMA Oracle #599
Conversation
+ add integration test + adjust xyk pallet to call pass data to the pallet
Crate versions that have been updated:
Runtime version has been increased. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #599 +/- ##
==========================================
- Coverage 43.73% 43.68% -0.05%
==========================================
Files 61 61
Lines 4466 4475 +9
==========================================
+ Hits 1953 1955 +2
- Misses 2513 2520 +7
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This should only need a rebenchmark based on the new max unique entries (now 30). |
5231292
to
9dac5e4
Compare
…o apopiak/oracle-integration
✅ Note: needs update to galacticcouncil/warehouse#188 |
warehouse PRs included:
|
…o apopiak/oracle-integration
…o apopiak/oracle-integration
@@ -494,7 +495,7 @@ impl pallet_xyk::Config for Runtime { | |||
type MaxInRatio = MaxInRatio; | |||
type MaxOutRatio = MaxOutRatio; | |||
type CanCreatePool = pallet_lbp::DisallowWhenLBPPoolRunning<Runtime>; | |||
type AMMHandler = (); | |||
type AMMHandler = pallet_ema_oracle::OnActivityHandler<Runtime>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't be xyk reweighted now with oracle?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah
# Conflicts: # runtime/basilisk/src/lib.rs # runtime/testing-basilisk/src/lib.rs
Integrate the EMA oracle from galacticcouncil/warehouse#76 into the Basilisk runtime.
Description
This PR adds the EMA oracle pallet and configures the runtime to ingest xyk trades and liquidity changes into it.
Supported periods are configured to
LastBlock
,Hour
,Day
andWeek
.The oracle values are not used, yet, to allow for observation.
supersedes #557
Related Issue
https://app.clickup.com/t/2v0w820
How Has This Been Tested?
Includes an integration tests, most of the tests are in the pallet and its corresponding math package.
Checklist: