Closed c4-submissions closed 12 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
The Warden and all duplicate exhibits specify that the absence of a time period would cause certain functionality of the protocol to be inoperable that directly relies on its presence.
The time period can be arbitrarily re-configured and may not be necessary depending on the sale type of the collection, meaning that this exhibit is invalid.
This particular Warden also specifies that a zero value allowListStartTime
would cause failures and the same as above applies.
alex-ppg marked the issue as unsatisfactory: Invalid
Based on the judgment of #2033, I consider submissions #1980 and #1831 to be of QA (NC) rather than invalid and am marking them with the correct overinflated severity tag given that they would be graded C.
To note, #2033 was marked as QA before going through the QA reports and would have been marked with overinflated severity as well given that all collection misconfiguration submissions have been marked as NC due to the possibility of reconfiguration.
alex-ppg marked the issue as unsatisfactory: Overinflated severity
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/MinterContract.sol#L285-L292
Vulnerability details
Impact
The
setCollectionCosts()
function within theMinterContract
is utilized to establish the collection costs and sales model for an upcoming collection sale. As outlined in the documentation, the expectation is that one token can be minted and auctioned during each time period. Therefore, it is crucial to invoke thesetCollectionCosts()
function and specify a non-zero time period before executingmintAndAuction()
.However, a vulnerability exists in the
mintAndAuction()
contract as it fails to ensure that the time period is greater than zero. This flaw can result in a division by zero error when the time period is zero. Additionally, an arithmetic underflow error may occur if theallowlistStartTime
is not set in thesetCollectionPhases()
function.Proof of Concept
allowlistStartTime
is not settime period
is zerohttps://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/MinterContract.sol#L285C9-L292C102
Test Result
Tools Used
Manual Review and Foundry
Recommended Mitigation Steps
Implement necessary sanity checks to avoid error and unnecessary situations.
Assessed type
Other