In the MysteryBox::openBox function, the rewards given to msg.sender are not retrieved from the MysteryBox::rewardPool array, but are hardcoded instead. In addition, the redefined reward values do not match the default rewards added in the constructor.
The MysteryBox::openBox function contains no reference to MysteryBox::rewardPool:
This renders the MysteryBox::addReward and MysteryBox::getRewardPool functions useless and causes confusion about the actual value of the rewards.
Manual Review, Foundry
MysteryBox::openBox should retrieve values from the MysteryBox::rewardPool array.
The MysteryBox::addReward function should either be removed or the rarity of a prize should be calculated in a different way, such as a rarity variable in the MysteryBox::Reward struct and a redesigned MysteryBox::openBox function.
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.