One player could register multiple times.
The method ThePredicter::register
is responsible for registering users. It should revert when attempting to register user that already has registered but it does not handle all cases.
It's possible to have a duplicate if organizer approves the registration of a user that was already approved.
Unexpected behaviour of the user's registration
Filling array so less than 30 unique people can participate in the competition
Manual review
Rewrite the logic for ThePredicter::register
in a way that checks if the user is already registered instead of relying on the statuses.
There are 2 variants about it:
Loop through the array ThePredicter::players
to check if the player already exists
Make a storage variable with mapping type which stores registered user and check if user exists using it's as key instead of looping through array.
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.