ScoreBoard::isEligibleForReward
does not follow the intended spec, leading to players who only submit one prediction to not receive rewards when they should.
Currently, the isEligibleForReward
function decides if a player is eligible for a reward if:
All matches have a decided outcome (not Pending
)
The Player has a predictionsCount
greater than one (non-inclusive, i.e. two or more)
This differs from the intended spec, as follows:
After the Organizer has entered the result from the last match (the 9th match), Players can take their rewards from the prize pool. Players can receive an amount from the prize fund only if their total number of points is a positive number and if they had paid at least one prediction fee.
As above, this means that predictionsCount
should be compared inclusive, not exclusive.
Include the following test case in ./test/ThePredicter.t.sol
:
Run the test:
In certain circumstances, Players will be unable to claim prizes when they should be able to. This is unintended behavior.
Manual Analysis
Update the isEligibleForReward
function to follow the intended spec:
Players with only one prediction cannot withdraw.
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.