in the makeprediction
function, since the matchNumber
is not explicitly defined, if a player
uses natural(countng) numbers to represent the matches she wants to predict, it will cause a mismatch in the scoreBoard.sol
contract since matchNumbers
are directly used as the array indexes of the matches they represent in the array.
Assuming a player
enters numbers ranging from 1-9
as the matchNumbers
, in the scoreBoard.sol
, those numbers will not correspond to the right matches in the PlayerPredictions.predictions
array.
matches | matchNumber | array index |
---|---|---|
match-1 | 1 | 0 |
match-2 | 2 | 1 |
match-3 | 3 | 2 |
match-4 | 4 | 3 |
wrong predictions recorded for matches hence wrong score
calculation and consequently loss of funds for players
and loss of trust for the protocol
manual review
use enum
to explicitly define the matchNumber
i.e in ThePredicter.sol
effect the following changes as indicated below. Then do the same thing in scoreBoard.sol
but apply the modification to setPrediction
and setResult
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.