Open c4-bot-9 opened 7 months ago
ADD-01: Improper return of chainlinkReferencePriceX96 in V3Oracle._getReferenceTokenPriceX96()
In certain situations, cachedChainlinkReferencePriceX96 did not prevent the reevaluation of the price of referenceToken in V3Oracle.getValue().
cachedChainlinkReferencePriceX96
V3Oracle.getValue()
PR-13 successfully mitigates the original issue by introducing the following change:
function _getReferenceTokenPriceX96(address token, uint256 cachedChainlinkReferencePriceX96) internal view returns (uint256 priceX96, uint256 chainlinkReferencePriceX96) { if (token == referenceToken) { - return (Q96, chainlinkReferencePriceX96); + return (Q96, cachedChainlinkReferencePriceX96); } [...] }
Mitigation Confirmed
jhsagd76 marked the issue as satisfactory
jhsagd76 marked the issue as confirmed for report
Lines of code
Vulnerability details
C4 Issue
ADD-01: Improper return of chainlinkReferencePriceX96 in V3Oracle._getReferenceTokenPriceX96()
Issue Details
In certain situations,
cachedChainlinkReferencePriceX96
did not prevent the reevaluation of the price of referenceToken inV3Oracle.getValue()
.Mitigation
PR-13 successfully mitigates the original issue by introducing the following change:
Conclusion
Mitigation Confirmed