Open code423n4 opened 2 years ago
cmichel
The ThreePieceWiseLinearPriceCurve.adjustParams function does not check that _cutoff1 <= _cutoff2 and also does not revert in this case. However, this always indicates an error in how this function should be used.
ThreePieceWiseLinearPriceCurve.adjustParams
_cutoff1 <= _cutoff2
Add a _cutoff1 <= _cutoff2 check.
Fixed in line 45.
Handle
cmichel
Vulnerability details
The
ThreePieceWiseLinearPriceCurve.adjustParams
function does not check that_cutoff1 <= _cutoff2
and also does not revert in this case. However, this always indicates an error in how this function should be used.Recommended Mitigation Steps
Add a
_cutoff1 <= _cutoff2
check.