The distributeAssets
function in the provided Solidity contract raises concerns regarding the potential usage of stale or outdated price data obtained from Chainlink's latestRoundData
. The absence of explicit checks for data freshness could lead to inaccurate asset valuations during fee distribution.
In the distributeAssets
function, the code snippet below relies on Chainlink's latestRoundData
to fetch asset prices for valuation. However, it lacks checks for stale data, potentially resulting in incorrect asset valuations.
The code directly uses the latest data from Chainlink without checking its freshness.
Stale data could lead to inaccurate asset valuations and impact the fairness of fee distribution
The potential impact is the usage of stale prices, leading to inaccurate asset valuations during fee distribution.
Manual
Include a mechanism to check the freshness of the data obtained from Chainlink, taking into consideration the guidelines provided in the Chainlink documentation on historical data. Historical-data
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.