Tame Foggy Pony
High
No response
Upon fetching a price from Pyth, we call the following code:
function currentValue() external view override returns (uint256) {
IPyth.Price memory price = pythOracle.getPriceUnsafe(tokenId);
require(price.publishTime < block.timestamp - noOlderThan, "Stale Price");
return uint256(uint64(price.price));
}
Pyth provides exponents so the price can be brought into the correct decimals. However, this is not done here, resulting in using different decimals for different assets.
No response
No response
- Price is fetched from Pyth when getting the exchange rate for tokens
- One asset has an exponent of 5 while another one has an exponent of 6
- This results in wrong exchange rate due to not considering the exponents
Wrong exchange rate calculation causing all kinds of serious issues across the protocol such as filling orders when they shouldn't be
No response
Consider the exponents