Rare Fuchsia Orangutan
Medium
Pyth price feeds specify uncertainty of the returned price. As per the official docs of Pyth Price Feeds, utilizing this confidence interval is recommended for enhanced security.
Confidence of Pyth price feed is ignored:
PythStructs.Price memory pythPrice = pyth.getPriceUnsafe(priceFeedId);
uint256 price = uint256(uint64(pythPrice.price));
uint256 expo = uint256(uint32(-pythPrice.expo));
return (price, expo);
No response
No response
No response
A malicious user could exploit invalid prices for particular tokens OR an honest user could suffer due to utilizing a Pyth oracle with poor confidence suffering a loss of funds.
Even though the owner can change the order of the oracles in tokenToOracleSources
when Pyth oracle returns an incorrect price, users before this change will suffer losses before that happens.
No response
Verify the confidence interval as advised in the [docs](https://docs.pyth.network/price-feeds/best-practices#confidence-intervals