The vault’s deposit() function overwrites existing entries in stakedAsset[user] instead of accumulating them.
When a user deposits multiple times without canceling participation, their previous deposit record is erased in storage even though the tokens remain in the contract.
As a result, the vault’s internal accounting becomes desynchronized — the vault’s actual token balance is greater than the total represented shares. This breaks withdrawal logic and can lead to an event’s payout failing or miscalculating.
This issue shares the same root cause as the previously reported finding “Potential Share Dilution via stakedAsset[receiver] = stakeAsset”, but the impact here occurs after the event is completed, not when canceling participation.
Likelihood:
Reason 1 // Describe WHEN this will occur (avoid using "if" statements)
Reason 2
Impact:
The vault retains unaccounted tokens, causing inflated balances.
Winners receive incorrect withdrawal amounts.
Losers may be unable to withdraw their full refunds.
Residual unclaimed funds remain locked, potentially causing a Denial of Service (DoS) for future rounds or event settlements.
Steps to Reproduce:
Alice deposits 5 ether and joins Team 1.
Alice deposits another 5 ether and rejoins Team 1 (total 10 ether).
Two other users join and deposit 5 ether each.
The event concludes and Team 1 is set as the winner.
When users withdraw, the vault retains leftover balance due to overwritten accounting for Alice’s first deposit.
Observed output logs:
Vault Balance before withdrawals is 19700000000000000000
Vault Balance after withdrawals is 6566666666666666668
alice Balance after withdrawals is 16566666666666666666
user1 Balance after withdrawals is 18283333333333333333
user2 Balance after withdrawals is 18283333333333333333
Notice the vault still holds ~6.56 ETH even after all winners withdrew — proving funds were left behind because Alice’s first deposit was overwritten and never accounted for.
Accumulate deposits instead of overwriting user state:
This issue shares the same root cause as the “Potential Share Dilution” finding but affects different execution paths.
While the first finding impacts refunds after cancellation, this one affects post-event withdrawals, making it a separate, high-severity systemic flaw.
\
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.