Expected behaviourAfter joining an event with a deposit, a user should only allocate newly acquired shares when depositing again and joining another country. When a user deposits and joins an event, if the user deposits again, the new shares gotten should be used to join any other event of their choice
Actual behaviour: joinEvent() uses balanceOf(msg.sender)— the total shares — every time, even if some were already allocated to prior countries. This results in over-allocation of previously used shares.
Location: joinEvent() function (line 260)
Likelihood: High – any user can exploit this after making multiple deposits.
Impact:
Users can allocate same shares to multiple countries
Incorrect winner share calculations
Winners may receive incorrect payouts
Example Attack:
If user deposits, joins country A, then deposits again, joins country B:
userSharesToCountry[user][countryA] = first deposit shares
userSharesToCountry[user][countryB] = total shares (includes first deposit)
User's shares are double-counted for country B
Add this piece of code to the joinEvent() function to track incremental shares per country for a user.
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.