The deposit() function mints ERC4626 shares to msg.sender but records the deposited tokens under stakedAsset[receiver].
This creates a logical inconsistency between who holds the vault shares and who owns the recorded assets. It directly breaks functions like joinEvent() that depend on stakedAsset[msg.sender] being non-zero, even when the user actually holds valid shares.
Likelihood:
This issue occurs whenever a depositor provides a receiver different from themselves — an entirely valid use case allowed by the ERC4626 standard.
The bug doesn’t require any special timing or permissions; it happens every time a third-party deposit (e.g., depositing for a friend or referral system) is executed.
Impact:
Users may lose access to event participation logic that depends on stakedAsset[msg.sender].
Can cause failed withdrawals, broken events, and incorrect reward distribution.
Explanation
The PoC demonstrates that when msg.sender deposits for another user (receiver),
Shares are minted to the depositor (msg.sender)
But assets are credited to the receiver (stakedAsset[receiver])
Later, joinEvent() checks stakedAsset[msg.sender] and reverts, because it never got updated for the depositor. This proves broken ownership consistency.
Explanation
This change ensures both share minting and asset tracking are tied to the same address (receiver).
It preserves ERC4626 compliance
Prevents broken participation logic
Ensures reward and share accounting remain accurate
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.