You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.
sherlock-admin opened this issue
May 24, 2023
· 0 comments
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
in StableOracleWBTC.sol:
// @audit Not enough checks
(, int256price, , , ) = priceFeed.latestRoundData();
// chainlink price data is 8 decimals for WETH/USDreturnuint256(price) *1e10;
in StableOracleWETH.sol:
// @audit Not enough checks
(, int256price, , , ) = priceFeed.latestRoundData();
// chainlink price data is 8 decimals for WETH/USDreturnuint256(price) *1e10;
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
DuplicateA valid issue that is a duplicate of an issue with `Has Duplicates` labelMediumA valid Medium severity issueRewardA payout will be made for this issue
SaharDevep
medium
Stale or incorrect price return from Chainlink's latestRoundData
SaharDevep
Medium
Stale or incorrect collateral price return from Chainlink's
latestRoundData
Summary
latestRoundData
is used, but there is no check to see if the returned value indicates stale data.Vulnerability Detail
Impact
This could lead to stale prices according to the Chainlink documentation:
https://docs.chain.link/data-feeds/price-feeds/historical-data
Related report:
sherlock-audit/2023-02-blueberry-judging#94
Code Snippet
https://github.com/sherlock-audit/2023-05-USSD/blob/6d7a9fdfb1f1ed838632c25b6e1b01748d0bafda/ussd-contracts/contracts/oracles/StableOracleDAI.sol#L48
https://github.com/sherlock-audit/2023-05-USSD/blob/6d7a9fdfb1f1ed838632c25b6e1b01748d0bafda/ussd-contracts/contracts/oracles/StableOracleWBTC.sol#L23
https://github.com/sherlock-audit/2023-05-USSD/blob/6d7a9fdfb1f1ed838632c25b6e1b01748d0bafda/ussd-contracts/contracts/oracles/StableOracleWETH.sol#L23
Tool used
Manual Review
Recommendation
Consider adding these checks:
Duplicate of #31
The text was updated successfully, but these errors were encountered: