openBox FunctionThe openBox function uses hardcoded reward values instead of fetching them from the rewardPool array. Additionally, the hardcoded values do not match the intended default reward values. This results in winners receiving larger rewards than specified.
The hardcoded reward values in the openBox function are incorrect. According to the constructor, the correct values for rewards should be:
Silver Coin: 0.25 ether (currently hardcoded as 0.5 ether)
Gold Coin: 0.5 ether (currently hardcoded as 1 ether)
However, in the openBox function, these values are incorrect, as shown below:
Due to these incorrect hardcoded values, winners are receiving higher rewards than intended, which could lead to significant financial loss over time.
Manual Review
Remove hardcoded values from the openBox function and fetch the correct reward values from the rewardPool array to ensure consistency. This way, any reward values set in the constructor or added later will be properly used.
Here is an example of a corrected implementation:
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.