Closed code423n4 closed 1 year ago
contested; this is implied by the following description in the natspec for this function, as this check has already been applied "upstream":
Note that this function expects that the startTime parameter of orderParameters is not greater than the current block timestamp and that the endTime parameter is greater than the current block timestamp. If this condition is not upheld, duration / elapsed / remaining variables will underflow.
dup #28
HickupHH3 marked the issue as unsatisfactory: Insufficient proof
Lines of code
https://github.com/ProjectOpenSea/seaport/blob/c30dd90272609677606f03f9c885466f15e891eb/contracts/lib/AmountDeriver.sol#L38
Vulnerability details
Impact
In the _locateCurrentAmount function, there is an unchecked block which skips underflow checks as startTime <= block.timestamp < endTime, but if the condition is not upheld, the duration, elapsed, and remaining variables will underflow and can cause unexpected behavior.
Proof of Concept
function _locateCurrentAmount(
) internal view returns (uint256 amount) {
Tools Used
vs code
Recommended Mitigation Steps