The decimals property of chainlink feeds are not validated #492
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-479
grade-b
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
satisfactory
satisfies C4 submission criteria; eligible for awards
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2023-11-kelp/blob/f751d7594051c0766c7ecd1e68daeb0661e43ee3/src/oracles/ChainlinkPriceOracle.sol#L47
https://github.com/code-423n4/2023-11-kelp/blob/f751d7594051c0766c7ecd1e68daeb0661e43ee3/src/LRTDepositPool.sol#L109
Vulnerability details
Impact
The ChainlinkPriceOracle incorrectly assumes that the decimal places in Chainlink price feeds are always set to 18. While this is a common standard for ETH-feeds, it is not a rule enforced on-chain by Chainlink feeds. This assumption can lead to critical miscalculations in functions that rely on these feeds, potentially resulting in the incorrect minting amount of rsETH.
Recommended Mitigation Steps
Implement a check to retrieve and validate the decimals property from Chainlink when creating new or updating feeds.
Assessed type
Oracle
The text was updated successfully, but these errors were encountered: