As just an array is used for players, it can lead to higher gas costs, and sometimes even lead to DoS if the players
array becomes too long.
As an array is used for storing players, in certain cases like finding duplicates, a nested for loop is used which is highly inefficient, which can also lead to DoS if the array grows to a large number.
DoS in certain cases
Increased Gas Cost
Manual Review
Instead of arrays, maybe an array and a mapping (round > address > playerIndex) combination can be used, along with a round detail (uint256). Thus after each round, you can delete the array, and increment the round variable. This will also make the function _isActivePlayer(...)
consume less gas (Will return non-zero value, i.e. the index for active player) and also the function getActivePlayerIndex(...)
.
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.