Normal behavior: When a user deposits multiple times before the event starts, their total staked amount should be the sum of all net deposits (after fees), so accounting and later prize distribution reflect the full contribution. Or otherwise multiple deposits should be prohibited and guarded.
Issue: The contract overwrites the previous stake on every deposit by assigning stakedAsset[receiver] = stakeAsset instead of accumulating it. This under-reports the user’s total stake and leads to incorrect outcomes.
Likelihood: High
Happens whenever a participant deposits more than once before event start.
Common behavior for users adjusting their stake; there is no restriction against multiple deposits.
Impact: High
Loss of tokens from user as on a win condition, not all stakes are counted
Results in leftover tokens in the vault and misaligned payouts, as later logic uses incorrect stake-related values, regardless if the user wins or not, there will be leftover tokens in the vault.
Description:
user1 deposits and joins, then deposits and joins again (same country).
stakedAsset[user1] reflects only the last deposit after fee, not the sum of both.
After end and withdrawal, vault shows leftover funds due to mis-accounting. These are locked forever and cannot be claimed anymore.
Accumulate stake across deposits to reflect the total net amount contributed by the receiver.
Consider preventing multiple joinEvent calls per address per event or recomputing recorded shares if business logic requires a fresh snapshot on each join.
Vault tracks only a single deposit slot per user and overwrites it on every call instead of accumulating the total.
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.