Closed sherlock-admin2 closed 3 months ago
Spare Chrome Oyster
Low/Info
https://github.com/sherlock-audit/2024-08-sentiment-v2/blob/main/protocol-v2/src/oracle/ChainlinkUsdOracle.sol#L86
if (decimals <= 18) return (amt * 10 ** (18 - decimals)).mulDiv(uint256(assetUsdPrice), uint256(ethUsdPrice)); - else return (amt / (10 ** decimals - 18)).mulDiv(uint256(assetUsdPrice), uint256(ethUsdPrice)); + else return (amt / (10 ** (decimals - 18))).mulDiv(uint256(assetUsdPrice), uint256(ethUsdPrice));
Spare Chrome Oyster
Low/Info
ChainlinkUsdOracle incorrectly handles tokens with > 18 decimals
Summary
https://github.com/sherlock-audit/2024-08-sentiment-v2/blob/main/protocol-v2/src/oracle/ChainlinkUsdOracle.sol#L86
Mitigation