-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong Chainlink PriceFeeds implementation - Use of deprecated function and stale prices checks missing #226
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-723
grade-b
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sufficient quality report
This report is of sufficient quality
Comments
c4-submissions
added
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
labels
Nov 13, 2023
c4-pre-sort
added
the
insufficient quality report
This report is not of sufficient quality
label
Nov 16, 2023
raymondfam marked the issue as insufficient quality report |
raymondfam marked the issue as duplicate of #34 |
raymondfam marked the issue as not a duplicate |
raymondfam marked the issue as sufficient quality report |
c4-pre-sort
added
sufficient quality report
This report is of sufficient quality
and removed
insufficient quality report
This report is not of sufficient quality
labels
Nov 17, 2023
raymondfam marked the issue as duplicate of #194 |
raymondfam marked the issue as duplicate of #723 |
c4-judge
added
downgraded by judge
Judge downgraded the risk level of this issue
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
and removed
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
labels
Dec 1, 2023
fatherGoose1 changed the severity to QA (Quality Assurance) |
fatherGoose1 marked the issue as grade-b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-723
grade-b
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2023-11-kelp/blob/f751d7594051c0766c7ecd1e68daeb0661e43ee3/src/oracles/ChainlinkPriceOracle.sol#L38
Vulnerability details
The protocol relies on Chainlink price feeds to retrieve the Asset/ETH price. However, the current implementation of Chainlink within the protocol is poor, leading to potential issues such as zero prices for assets. This is primarily attributed to the utilization of the deprecated
latestAnswer()
function to fetch prices. Additionally, the protocol lacks a mechanism to ensure the timeliness of price data are not stale.Impact
Proof-of-Concept
According to Chainlink's documentation, the
latestAnswer
function is deprecated. This function does not error if no answer has been reached but returns 0.The Dangers of Price Oracles
Tools Used
Shaheeniyat 🦅
Recommended Mitigation Steps
First use
latestRoundData()
:Then add these 5 essential checks to make the system more robust:
Assessed type
Oracle
The text was updated successfully, but these errors were encountered: