-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should check return data from Chainlink aggregators #70
Labels
Comments
This was referenced May 30, 2021
Fixed in PR#7. |
Labeling this as medium risk as stale ether price could put funds at risk. |
This was referenced May 23, 2023
This was referenced Jun 29, 2023
This was referenced Aug 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Handle
shw
Vulnerability details
Impact
The
getEtherPrice
function in the contractFSDNetwork
fetches the ETH price from a Chainlink aggregator using thelatestRoundData
function. However, there are no checks onroundID
nortimeStamp
, resulting in stale prices.Proof of Concept
Referenced code:
FSDNetwork.sol#L376-L381
Recommended Mitigation Steps
Add checks on the return data with proper revert messages if the price is stale or the round is uncomplete, for example:
The text was updated successfully, but these errors were encountered: