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

adding confidence and status checks for pyth #52

Merged
merged 2 commits into from
Dec 15, 2021

Conversation

nope-finance
Copy link
Member

@nope-finance nope-finance commented Dec 9, 2021

ran tests for token-lending locally (i know the git hooks dont work not but are resolved in other branch)

@nope-finance nope-finance force-pushed the pyth_confidence_and_status branch from 0207445 to 7d931e0 Compare December 9, 2021 11:22
@nope-finance nope-finance force-pushed the pyth_confidence_and_status branch from 7d931e0 to 5c2f84f Compare December 9, 2021 11:24
if conf.checked_mul(confidence_ratio).unwrap() > price {
msg!(
"Oracle price confidence is too wide: {}",
pyth_price.agg.status as u8

Choose a reason for hiding this comment

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

Isn't this always just going to be pyth::PriceStatus::Trading?

Seems better to log conf and price

Copy link
Member Author

Choose a reason for hiding this comment

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

ah yeah meant to do that

@oxrooter
Copy link
Member

lgtm

@nope-finance nope-finance merged commit 12ea2cd into mainnet Dec 15, 2021
@nope-finance nope-finance deleted the pyth_confidence_and_status branch December 20, 2021 09:28
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