-
Notifications
You must be signed in to change notification settings - Fork 93
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
Hacky native price workaround #3278
Conversation
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.
Thanks for addressing the comments. LGTM.
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.
Lg.
I guess we should prepare the infrastructure PR before merging this PR to main. |
New cli argument field is not mandatory, it can be not specified at all, so I think it is ok to merge it before infra PR ready. |
If that really works, then we are fine to go. |
Description
Implementation of an option to set alternative token price (approximated) for any other native token.
This feature is a workaround for obtaining native price for tokens which are not supported in our currently available sources, and it is safe to use such simple token substitution (like mapping csUSDL to DAI).
Changes
CachingNativePriceEstimator
, usedDashMap
for optimal performance (this will be read only hash map)price_estimation::Arguments
How to test
Newly added tests.