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

Shaggy Lava Mustang - Confidence intervals of Pyth Oracle prices are ignored #34

Open
sherlock-admin2 opened this issue Dec 21, 2024 · 0 comments

Comments

@sherlock-admin2
Copy link
Contributor

Shaggy Lava Mustang

Medium

Confidence intervals of Pyth Oracle prices are ignored

Summary

The prices in Pyth Network have an important parameter, the 'confidence interval'. Ignoring it may result in invalid prices.

Vulnerability Detail

The Pyth documentation suggests some ways to leverage confidence intervals to avoid relying on prices that come with an increased level of uncertainty and thus could be invalid at the given moment of time.

However, this is completely ignored in the PythOracle.sol contract.

Impact

The contract accepts any price even if its likelihood of validity is low.

Code Snippet

https://github.com/sherlock-audit/2024-12-mach-finance/blob/main/contracts/src/Oracles/Pyth/PythOracle.sol#L93-L104

Recommendation

Implement the logic with threshold-based checks to ensure the confidence level meets at least the minimum acceptable value.

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

No branches or pull requests

1 participant