Expected behavior: After depositing funds and joining an event via joinEvent(), a user should not be able to call joinEvent() again unless they deposit more funds to gain additional shares.
Actual issue: A user can call joinEvent() multiple times after a single deposit, resulting in:
The same address being pushed multiple times into usersAddress[]
numberOfParticipants being artificially inflated
totalParticipantShares double-counting the user's shares
Location: joinEvent() function (lines 243-269)
Likelihood: High – any user can exploit this after one deposit.
Impact:
Inflated participant count
Incorrect share calculations in _getWinnerShares()
Winners receive less than they should (due to inflated totalWinnerShares in withdrawal calculation)
Potential DoS if array grows too large
Example Attack:
User deposits 10 ether, gets 9.85 shares
User calls joinEvent(10) → added to array, totalParticipantShares += 9.85
User calls joinEvent(10) again → added again, totalParticipantShares += 9.85 (now 19.7, but user only has 9.85 shares)
If country 10 wins, _getWinnerShares() counts the user twice
Prevent multiple joins per user using a boolean flag:
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.