The BriVault contract, building on ERC4626, restricts withdrawals after the event starts via cancelParticipation, which refunds full staked amounts only before eventStartDate. Post-event, after the owner calls setWinner at or after eventEndDate, non-winning participants should have their funds locked to maintain the reward pool integrity for winners, with withdrawals or claims handled through dedicated functions.
However, the standard ERC4626::withdraw function remains unoverridden and publicly accessible, allowing any user to withdraw assets based on their share balance at any time, including after setWinner if their chosen team is not the winner, bypassing protocol-specific locks and enabling premature exits that undermine the tournament's reward distribution.
Likelihood:
Owner executes setWinner after eventEndDate to conclude the tournament.
Not-satisfied non-winning users or MEV bots detect the transaction and call withdraw immediately to extract funds before reward claims.
Impact:
Reward pool for winners is depleted by unauthorized withdrawals, resulting in reduced or zero payouts and unfair distribution.
Protocol's post-event logic is circumvented, leading to potential disputes, loss of user trust, and incentives for exploitative behavior like backrunning winner announcements.
Add the following code snippet to the briVault.t.sol test file.This test verifies that user can withdraw funds calling ERC4626::withdraw after ERC4626::setWinner.
Possible mitigation to override the standard function ERC4626::withdraw with similar to cancelParticipation logic or revert, preserving ERC4626 standard withdraw arguments.
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.