Closed sherlock-admin closed 10 months ago
1 comment(s) were left on this issue during the judging contest.
auditsea commented:
The issue describes about not checking min/max value from Chainlink for data staleness, but this is not required
1 comment(s) were left on this issue during the judging contest.
auditsea commented:
The issue describes about not checking min/max value from Chainlink for data staleness, but this is not required
cducrest-brainbot
medium
Chainlink oracle prices can be stale or incorrect
Summary
There is no check if the data received from Chainlink's price feed is carried over or fresh. The price could be outdated.
Vulnerability Detail
The function to update the collateral price via Chainlink checks that
updatedAt
is not more thanthreshold
in the past to avoid stale data:This check is insufficient as data could be carried over from previous rounds and be stale anyway as there is no check for round ID.
See: https://docs.chain.link/data-feeds/historical-data and https://github.com/sherlock-audit/2023-02-blueberry-judging/issues/94 or https://github.com/code-423n4/2022-04-backd-findings/issues/17
Impact
A stale price of the collateral is highly detrimental to the protocol. Users will be able to mint more Ubiquity dollars than they should be allowed to or redeem more collateral when burning their Ubiquity dollars.
Code Snippet
https://github.com/sherlock-audit/2023-12-ubiquity/blob/main/ubiquity-dollar/packages/contracts/src/dollar/libraries/LibUbiquityPool.sol#L523-L562
Tool used
Manual Review
Recommendation
Check that the data from the oracle is not carried over from previous rounds:
Duplicate of #133