The Auction contract constructor lacks several critical input validations that could lead to contract malfunction, underflows, and division by zero errors:
Missing validation that _startTime is in the future
Missing validation that _endTime is greater than _startTime
Missing validation that _reservePrice is less than or equal to _startingPrice
In the constructor:
While there is validation that _endTime must be greater than _startTime, there is no check to ensure _startTime is greater than block.timestamp. This allows the auction to be immediately active upon deployment if _startTime is set to a past timestamp.
These missing validations can lead to several critical issues:
If _startTime is set to a past timestamp, the auction becomes instantly active
If _endTime <= _startTime, the price calculation in getPrice() will result in division by zero:
If _reservePrice > _startingPrice, price calculations will underflow due to unsigned arithmetic:
Results in Complete dysfunction of the auction mechanics
Add comprehensive validation checks in the constructor:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.