-
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
Can not make sure 1 mint/period
when mint at saleoption
3
#688
Comments
141345 marked the issue as sufficient quality report |
141345 marked the issue as primary issue |
a2rocket (sponsor) disputed |
From docs: Let's assume that the minting sale starts at 24/07/2023 14:00. The first minting takes place at 24/07/2023 14:03. Users will be able to mint again after the time period has elapsed so after 24/07/2023 14:10. In case they try to mint prior that time their transaction will be reverted. |
The Warden specifies that it is possible to mint more than one token in a single period of a periodic sale. As the Sponsor correctly cites, the documentation of NextGen permits this and the one-per-period restriction refers to an "allowance" rather than a true restriction. In detail, one-per-period allowances are meant to accumulate permitting a user to f.e. ignore period 1 and period 2 while minting three tokens in period 3. As such, I consider the submission invalid as it describes the project's intended operation. |
alex-ppg marked the issue as unsatisfactory: |
alex-ppg marked the issue as unsatisfactory: |
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/2467db02cc446374ab9154dde98f7e931d71584d/smart-contracts/MinterContract.sol#L252
Vulnerability details
Impact
Can not make sure
1 mint/period
when minting atsaleoption
3. If there is no user mint at the start of mint, the user is able to mint multiple nft at one period which breaks the limit of1 mint/period
.Proof of Concept
In thefunction
mint
, if the option is 3, there is a limit of1 mint/period
.The issue is, if no user mint at start time, thelastMintDate
the be set to the start of the aution, which allow user to mint multiple nfts at one period.poc:
get log , notice this poc doesn't change time,these nfts are minted at same time
Tools Used
hardhat
Recommended Mitigation Steps
consider modify this line
lastMintDate[col] = collectionPhases[col].allowlistStartTime + (collectionPhases[col].timePeriod * (gencore.viewCirSupply(col) - 1));
compare
lastMintDate[col]
with currenttimeAssessed type
Timing
The text was updated successfully, but these errors were encountered: