Unfair distribution of tokenURI due to current logic
The current logic flaw lies in the tokenURI
function. The function uses the modulus operator (%) to determine which art to return based on the tokenId. However, this approach does not ensure an equal chance for each art piece.
The tokenId % 10 operation will result in a number between 0 and 9. The function only checks for values 0, 1, and 2 to return ART_ONE, ART_TWO, and ART_THREE respectively. For all other values (3 to 9), it returns ART_FOUR. This means ART_FOUR has a 70% chance of being selected, while the other three art pieces only have a 10% chance each.
That simply means that ART_FOUR will have 70% chance, so most of the users gonna get ART_FOUR.
Unfair distribution of nft's to users
Manual Review
Use tokenId % 4 to get mod number, to ensure equal distribution.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.