-
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
mintAndAuction
can't be called for collections that are using sales model 1
#285
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-1980
edited-by-warden
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Comments
c4-submissions
added
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
labels
Nov 4, 2023
code4rena-admin
changed the title
Nov 4, 2023
mintAndAuction
can't be called for on collections that are using sales model 1mintAndAuction
can't be called for collections that are using sales model 1
code4rena-admin
added
the
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
label
Nov 5, 2023
141345 marked the issue as duplicate of #1278 |
141345 marked the issue as duplicate of #962 |
141345 marked the issue as not a duplicate |
141345 marked the issue as duplicate of #1278 |
alex-ppg marked the issue as duplicate of #1980 |
c4-judge
added
duplicate-1980
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
and removed
duplicate-1278
labels
Dec 6, 2023
alex-ppg marked the issue as unsatisfactory: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
duplicate-1980
edited-by-warden
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/main/hardhat/smart-contracts/MinterContract.sol#L292
Vulnerability details
Impact
mintAndAuction
allows admins to mint a token, in a collection, per period and then start an auction on it. This ability should always be available to admins, regardless of the sales model used by the collection.From the docs:
So if a collection is using sales model 1, the
timePeriod
should be set to 0. WhenmintAndAuction
is called on a collection that uses sales model 1, it will revert onuint tDiff = (block.timestamp - timeOfLastMint) / collectionPhases[_collectionID].timePeriod;
as it will be diving by 0. Blocking admins from the ability to "mint and auction".Proof of Concept
Tools Used
Manual review + vscode
Recommended Mitigation Steps
Have a fallback time period or make collection time period a require (>0) parameter.
Assessed type
DoS
The text was updated successfully, but these errors were encountered: