Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Valid

Wrong logic leads to unfair token distribution

Summary

Wrong logic in MondrianWallet::tokenURI leads to unfair token distribution.

Vulnerability Details

Quoting sponsors:

You'll see the tokenURI function returns one of 4 random Mondrian art paintings. Each should have equal distribution and be random.

MondrianWallet::tokenURI gives 70% chance of getting ART_FOUR contradicting the earlier statement, reference.

Impact

Unfair token distribution.

Tools Used

Manual review.

Recommendations

Change the code to:

+ uint256 modNumber = tokenId % 4;
- uint256 modNumber = tokenId % 10;
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

NFT's should have equal distribution

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.