Fixed price never expires #310
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-b
Q-12
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/code-423n4/2023-01-ondo/blob/main/contracts/lending/OndoPriceOracle.sol#L64
Vulnerability details
Impact
Once a fixed price has been set by owner, it never expires until owner explicitly sets it to 0. This could be risky where contract might be working with an obsolete price, if Owner failed to update price timely
Proof of Concept
setPrice
functiongetUnderlyingPrice
is retrieved then price P1 will be returned for fToken F. This shows that fixed price which was set X days ago still works and never expiresRecommended Mitigation Steps
Fixed price must expire after x seconds of addition. This will prevent contract from using obsolete prices
The text was updated successfully, but these errors were encountered: