This repository has been archived by the owner on Dec 31, 2023. It is now read-only.
Proxy - D3Oracle will return the wrong price if the Chainlink aggregator returns price outside min/max range #129
Labels
Has Duplicates
A valid issue with 1+ other issues describing the same vulnerability
Medium
A valid Medium severity issue
Reward
A payout will be made for this issue
Won't Fix
The sponsor confirmed this issue will not be fixed
Proxy
medium
D3Oracle will return the wrong price if the Chainlink aggregator returns price outside min/max range
Summary
Chainlink oracles have a min and max price that they return. If the price goes below the minimum price the oracle will not return the correct price but only the min price. Same goes for the other extremity.
Vulnerability Detail
Both
getPrice()
andgetOriginalPrice()
only checkprice > 0
not are they within the correct rangeImpact
The wrong price may be returned in the event of a market crash.
The functions with the issue are used in
D3VaultFunding.sol
,D3VaultLiquidation.sol
andD3UserQuota.sol
Code Snippet
getPrice()
getOriginalPrice()
Tool used
Manual Review
Recommendation
Check the latest answer against reasonable limits and/or revert in case you get a bad price
The text was updated successfully, but these errors were encountered: