-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The absence of sanity checks in the MinterContract#mintAndAuction()
function can lead to avoidable error scenarios.
#1980
Comments
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 |
alex-ppg marked the issue as unsatisfactory: |
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: |
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
The text was updated successfully, but these errors were encountered: