Normally, when a depositor deposits on behalf of another user (a “receiver”), the vault should credit the receiver with both the deposited stake record and the newly minted vault shares.
In this contract, deposit(assets, receiver) records the stake under stakedAsset[receiver] but mints the shares to msg.sender instead of receiver, creating an ownership mismatch between recorded stake and actual tokenized shares.
Likelihood:
This mismatch occurs every time a depositor uses the receiver parameter to deposit on behalf of another address (e.g., gifting or onboarding), because the code always writes stake to receiver but mints to msg.sender.
It also occurs whenever front-end logic or integrators assume receiver receives both stake and shares — their UI and back-end will show inconsistent ownership.
Impact:
Impact 1: The receiver may be recorded as having a stake but will not own the minted shares — only msg.sender holds withdrawable shares. This can permanently lock the receiver out of withdrawals or create theft scenarios.
Impact 2: Refunds, cancellations, or accounting (e.g., cancelParticipation, joinEvent) rely on stakedAsset and balanceOf consistency; the mismatch can cause refunds to go to the wrong party or cause irreconcilable accounting and loss of funds.
Observed effect: After deposit, stakedAsset[receiver] == amt - fee, but vault.balanceOf(msg.sender) == participantShares (shares belong to depositor). The receiver has no minted shares to withdraw.
Explanation: Record and accumulate stake under stakedAsset[receiver] and mint the corresponding shares to the same receiver. This keeps on-chain records and tokenized ownership consistent and prevents accidental loss/theft of shares.
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.