We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
code-423n4/2023-06-angle-findings#40
LibHelpers.piecewiseLinear() reverts when the value is less than the first element of the array.
LibHelpers.piecewiseLinear()
PR: AngleProtocol/angle-transmuter@5f7635c
function piecewiseLinear(uint64 x, uint64[] memory xArray, int64[] memory yArray) internal pure returns (int64) { uint256 indexLowerBound = findLowerBound(true, xArray, 1, x); if (indexLowerBound == 0 && x < xArray[0]) return yArray[0]; else if (indexLowerBound == xArray.length - 1) return yArray[xArray.length - 1]; return yArray[indexLowerBound] + ((yArray[indexLowerBound + 1] - yArray[indexLowerBound]) * int64(x - xArray[indexLowerBound])) /
During the mitigation, it outputs the first value of the y array when the value is less than the first element of the x array.
y
x
This issue was mitigated properly.
The text was updated successfully, but these errors were encountered:
auditor0517 issue #25
a99e1a5
hansfriese marked the issue as satisfactory
Sorry, something went wrong.
No branches or pull requests
Lines of code
Vulnerability details
Original Issue
code-423n4/2023-06-angle-findings#40
Details
LibHelpers.piecewiseLinear()
reverts when the value is less than the first element of the array.Mitigation
PR: AngleProtocol/angle-transmuter@5f7635c
During the mitigation, it outputs the first value of the
y
array when the value is less than the first element of thex
array.Conclusion
This issue was mitigated properly.
The text was updated successfully, but these errors were encountered: