According to the ERC4626 standard, deposit(assets, receiver) should: charge the fee and transfer assets minus fee to the vault from msg.sender, and mint shares to the receiver proportional to the assets deposited.
stakedAsset[receiver] is correctly set for the receiver.
But the shares are minted to msg.sender:
Likelihood: High
Occurs every time someone deposits on behalf of another address (receiver != msg.sender), a typical ERC4626 functionality.
Impact: High
“Ghost bet”: the receiver can join but with 0 shares → does not participate in the winners pool.
The depositor (msg.sender) keeps the shares but cannot join (does not have stakedAsset) → cannot withdraw as a winner.
Calculation mismatches (totalParticipantShares, totalWinnerShares), which can affect other users (e.g., withdrawal proportions).
user1 deposits 10 tokens but specifies alice as the receiver.
Calculate the fee and expected shares.
Verify the inconsistency.
Alice joins a team.
The bet registered for alice is ZERO, even though a deposit was made on her behalf.
Other users deposit and join a country.
The event ends and the winner is set (alice's team).
Alice tries to withdraw. Since userSharesToCountry[alice][winner]
was 0 (because she had no shares), the calculation makes alice receive 0 tokens.
The deposit() function should mint shares to the receiver as defined by ERC4626.
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.