https://github.com/code-423n4/2024-05-predy/blob/a9246db5f874a91fb71c296aac6a66902289306a/src/PriceFeed.sol#L45-L58
This function returns the square root of the baseToken price quoted in quoteToken, and this data is queried when checking if the vault is in danger in order to liquidate it, with needing a confirmation via PositionCalculator.isLiquidatable().
The problem, however, is that Chainlinks latestRoundData is being queried, but this call lacks a check to see the amount of decimals the feed has, unlike the require(basePrice.expo == -8, "INVALID_EXP"); check applied for the pyth Oracle which ensures that the decimal is indeed 8.
This then means that in the case where a feed like AMPL/USD is integrated that has a different amount of decimals compared to its pairs the price calculated is going to be massively inaccurate in our case here it is going to be heavily inflated as the price returned from chainlink is used as the numerator in the operation.
Seems to be QA considering one would assume the protocol to do all the vetting before integrating a pricefeed.
Consider calling AggregatorV3Interface.decimals() to get the exact number of decimals for the price feed being called.
