The specification states that three NFTs are awarded with probabilities of 70%, 25%, 5%. However, with the current contract implementation, NFTs are drawn with equal probability.
According to the specification, the three winner NFTs vary in their rarity (Brown - 70%, Jungle - 25%, Cosmic - 5%).
The rarity of the winner NFT is determined in the function fulfillRandomWords
:
random_words[0] % 3
leads to the three possible outcomes 0 (COMMON), 1 (RARE), 2 (LEGEND) with equal probability.
High: While protocol funds are not at risk from this incorrect implementation, the varying rarity of the winner NFTs is a major feature of the protocol; therefore, its incorrect implementation is a severe disruption to protocol functionality.
Manual code inspection.
Implement the correct assignment random number to rarity. Replace:
with:
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.