rarity = hash % 100 gives values 0..99, but the branches use <=, so the boundary values fall into the wrong bucket: rarity 70 (the 71st outcome) is still COMMON, and legendary only covers 96..99 (4 outcomes). The real distribution is 71/25/4, not the intended 70/25/5.
Likelihood: High — the wrong split applies to every single mint; it is deterministic, not probabilistic.
Impact: Low — legendary puppies are 20% rarer than advertised (4% instead of 5%) and common puppies are 71% instead of 70%. No funds are at risk, but the documented 70/25/5 split is wrong.
The tests brute-force a caller whose rarity hash lands exactly on the boundary values and show where they map: rarity 70 → COMMON (proving common covers 71 outcomes), rarity 96 → LEGENDARY (proving legendary covers only 4 outcomes, 96..99).
Use < instead of <= so the buckets are exactly 0..69 (70), 70..94 (25), and 95..99 (5).
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.