PriceOracle.getPrice doesn't check for stale price
The price oracle contract does not check whether the price returned by Chainlink is stale. An attacker could exploit this to cause the protocol to make decisions based on outdated prices, potentially leading to bad debt.
This function doesn't check that prices are up to date. Because of that it's possible that price is not outdated which can cause financial loses for protocol.
Impact
Protocol can face bad debt.
Code Snippet
Provided above
Tool used
Manual Review
Recommendation
You need to check that price is not outdated by checking round timestamp.
Discussion
ibsunhub
Same with the answer to #25.
It's not practical to setup different heartbeat for individual markets. And we have a backend to monitor the price deviation.
0xffff11
Due to the off-chain system by Iron, issue can be a low. (Does not really affect the current state of the contracts) @ibsunhub Is it the right resolution, or thinking more about invalid?
ib-tycho
We still think this is invalid, thanks
0xffff11
Because Iron's off-chain safeguard, invalid
bzpassersby
Escalate for 10 USDC
I think this is wrongly classified as invalid.
(1) It's impossible for Watsons to know that the protocol has off-chain safeguards because the protocol explicitly said there are no off-chain mechanisms in the contest info. It's unfair for Watsons who might be misled by this answer.
Q: Are there any off-chain mechanisms or off-chain procedures for the protocol (keeper bots, input validation expectations, etc)?
nope
(2)It's right and should be encouraged for Watsons to point-out insufficient on-chain checks. The current code ignores any data freshness-related variables when consuming chainlink data, which is clearly not the best practice.
And it's understandable that the protocol chose to implement such checks off-chain. But since Watsons wouldn't have known about this and that the code itself clearly has flaws. This should be at least low/informational. It's unfair for Watsons to be punished because of this.
sherlock-admin
Escalate for 10 USDC
I think this is wrongly classified as invalid.
(1) It's impossible for Watsons to know that the protocol has off-chain safeguards because the protocol explicitly said there are no off-chain mechanisms in the contest info. It's unfair for Watsons who might be misled by this answer.
Q: Are there any off-chain mechanisms or off-chain procedures for the protocol (keeper bots, input validation expectations, etc)?
nope
(2)It's right and should be encouraged for Watsons to point-out insufficient on-chain checks. The current code ignores any data freshness-related variables when consuming chainlink data, which is clearly not the best practice.
And it's understandable that the protocol chose to implement such checks off-chain. But since Watsons wouldn't have known about this and that the code itself clearly has flaws. This should be at least low/informational. It's unfair for Watsons to be punished because of this.
You've created a valid escalation for 10 USDC!
To remove the escalation from consideration: Delete your comment.
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
hrishibhat
Result:
Medium
Has Duplicates
Considering this a valid medium
Issue was labeled "Won't Fix" by protocol team. Categorizing as an acknowledged issue.
The original report as published on Sherlock, by 0x3b. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Generating the AI write-up for this report.
This usually takes about a minute. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
How it worked
Root cause
Likely the getPriceFromChainlink function does not verify the timestamp of the price data returned by Chainlink, so it may use stale prices.
Impact
The protocol could face bad debt if it uses stale prices for financial decisions.
What the attacker needed
None
The fix
The recommendation is to check that the price is not outdated by checking the round timestamp.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Generating the AI write-up for this report.
This usually takes about a minute. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
A price oracle is a service that provides current prices for assets. This report says the protocol's oracle does not check if the price it gets is old, so it might use an outdated price. That could cause the protocol to make bad financial decisions, like lending money based on a wrong price.