Within the LiquidationPool#distributeAssets()
, there is no validation to check whether or not the price-retrieved via the Chainlink's AggregatorV3Interface#latestRoundData()
, which lead to retrieving a stale
price.
When a liquidator would liquidate a SmartVault, the liquidator would call the LiquidationPoolManager#runLiquidation()
.
Within the LiquidationPoolManager#runLiquidation()
, the LiquidationPool#distributeAssets()
would be called.
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPoolManager.sol#L80
Within the LiquidationPool#distributeAssets()
, the current $EUROs price in $USD (priceEurUsd
) and the current asset price in $USD would be retrieved via the Chainlink's AggregatorV3Interface#latestRoundData()
like this:
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L207
https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L218
However, within the LiquidationPool#distributeAssets()
, there is no validation to check whether or not the returned-price of both $EUROs and asset in $USD via the Chainlink's AggregatorV3Interface#latestRoundData()
would be a stale price.
This lead to retrieving a stale price of both $EUROs and asset in $USD in the LiquidationPool#distributeAssets()
.
Within the LiquidationPool#distributeAssets()
, there is no validation to check whether or not the price-retrieved via the Chainlink's AggregatorV3Interface#latestRoundData()
, which lead to retrieving a stale
price.
Manual review
Within the LiquidationPool#distributeAssets()
, consider adding a validation to check whether or not the returned-price of both $EUROs and asset in $USD via the Chainlink's AggregatorV3Interface#latestRoundData()
would be a stale price like this:
(NOTE:Some acceptable time delay should be set to the maxDelayTime
above in advance)
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.