Closed c4-submissions closed 11 months ago
141345 marked the issue as duplicate of #478
alex-ppg marked the issue as not a duplicate
alex-ppg marked the issue as primary issue
alex-ppg marked issue #588 as primary and marked this issue as a duplicate of 588
alex-ppg changed the severity to QA (Quality Assurance)
alex-ppg marked the issue as grade-c
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/main/smart-contracts/MinterContract.sol#L170
Vulnerability details
Impact
IN the function
setCollectionPhases
, there is no time check for if_allowlistStartTime < _allowlistEndTime
and_allowlistStartTime < _publicEndTime
as it is used for comparisons in many placedProof of Concept
In the function
mint
in same contract, there is a check forif (block.timestamp >= collectionPhases[col].allowlistStartTime && block.timestamp <= collectionPhases[col].allowlistEndTime) {
and same also in theburnOrSwapExternalToMint
and this means wrong input of data can cause DOS for functions whereallowlistStartTime > allowlistEndTime and allowlistStartTime > publicEndTime
Tools Used
Manual Review
Recommended Mitigation Steps
Add check for times, to ensure, the
allowlistStartTime
andpublicStartTime
are always less than bothallowlistEndTime
andpublicEndTime
.Assessed type
DoS