The distributeAssets()
function lacks checks for stale or zero price data from Chainlink oracles, risking inaccurate distributions and blocking liquidations.
The distributeAssets()
function in the LiquidationPool
contract uses Chainlink's latestRoundData()
to fetch the latest price data for asset distribution calculations. However, the function does not perform checks to ensure that the price data is not stale. Stale data can result from various issues, such as oracle downtime, data source errors, or network congestion.
Using stale data for price calculations can lead to incorrect distributions of assets to stakers, potentially causing halt of liquidation process in case zero eur/usd price return because the revert deu zero division :
Stale price data may cause incorrect asset distributions and, if priceEurUsd
is zero, could halt liquidations due to transaction reversion.
manual review
It is recommended to use Chainlink’s latestRoundData() function with
checks on the return data for example:
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.