Closed code423n4 closed 1 year ago
raymondfam marked the issue as low quality report
periodLength is an immutable variable assigned at the constructor. The contract would have been unusable with zero assigned to it.
HickupHH3 marked the issue as unsatisfactory: Invalid
Lines of code
https://github.com/GenerationSoftware/pt-v5-cgda-liquidator/blob/7f95bcacd4a566c2becb98d55c1886cadbaa8897/src/LiquidationPair.sol#L377-L383
Vulnerability details
Impact
_computePeriod()
will revert because lack of check input validationProof of Concept
In
LiquidationPair.sol
,_computePeriod()
is used to computes the current auction period: see here. It is called in functions likegetPeriodStart()
and_checkUpdateAuction()
.In L382,
_computePeriod()
will revert ifperiodLength == 0
lead to DosTools Used
Manual review
Recommended Mitigation Steps
if (periodLength == 0) revert()
(_timestamp < periodOffset)
to(_timestamp <= periodOffset)
Assessed type
Invalid Validation