-
Notifications
You must be signed in to change notification settings - Fork 0
Fixed price never expires #310
Copy link
Copy link
Open
Labels
Q-12QA (Quality Assurance)Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxAssets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxbugSomething isn't workingSomething isn't workingdowngraded by judgeJudge downgraded the risk level of this issueJudge downgraded the risk level of this issuegrade-bsponsor acknowledgedTechnically the issue is correct, but we're not going to resolve it for XYZ reasonsTechnically the issue is correct, but we're not going to resolve it for XYZ reasons
Metadata
Metadata
Assignees
Labels
Q-12QA (Quality Assurance)Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxAssets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntaxbugSomething isn't workingSomething isn't workingdowngraded by judgeJudge downgraded the risk level of this issueJudge downgraded the risk level of this issuegrade-bsponsor acknowledgedTechnically the issue is correct, but we're not going to resolve it for XYZ reasonsTechnically the issue is correct, but we're not going to resolve it for XYZ reasons
Type
Fields
Give feedbackNo fields configured for issues without a type.
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
setPricefunctiongetUnderlyingPriceis 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