Normal behavior:
When a user cancels participation, their deposited assets are refunded and their vault shares are burned. The system should also update all related global accounting variables, including totalParticipantShares , numberOfParticipants and per-country user shares, to accurately reflect the current state.
Issue:
The current cancelParticipation() implementation only burns the user’s ERC20 shares and refunds the staked asset. It does not adjust the totalParticipantShares or the userSharesToCountry mapping. This causes misrepresentation of total shares: the contract still counts shares for a user who has exited, leading to potential distortions in reward calculations, winner distributions, and overall vault accounting.
Likelihood:
Occurs every time a participant cancels after joining an event.
Particularly likely in events with multiple participants where some users opt to withdraw early.
Impact:
Total participant shares are inflated, giving a false picture of overall participation.
Winners’ reward calculations based on totalWinnerShares will be incorrect, potentially reducing payouts for legitimate winners.
Misrepresented state may also confuse front-end dashboards or auditing tools, creating a perception of incorrect accounting.
This PoC demonstrates that after a user cancels participation, totalParticipantShares does not decrease, even though the user no longer holds shares. This creates inaccurate accounting for the vault.
Update cancelParticipation() to properly remove the user’s shares from totalParticipantShares
CancelParticipation burns shares but leaves the address inside usersAddress and keeps userSharesToCountry populated.
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.