The BriVault contract enables users to deposit assets via the overridden deposit function, which sets the stakedAsset mapping to track participation eligibility. Users must then call joinEvent before eventStartDate to select a country and participate in the tournament. Before the event starts, users can call cancelParticipationto refund their staked assets, burn shares, and reset the mapping.
However, if a user deposits but fails to call joinEvent before eventStartDate, after the event begins, joinEvent reverts due to the timestamp check, and cancelParticipation also reverts for the same reason, regardless of whether the user joined, permanently locking the user's funds in the vault with no way to withdraw or participate.
Likelihood:
Users deposit during the pre-event period but overlook or delay calling joinEvent due to UI/UX issues or misinformation.
The event starts on schedule, triggering the timestamp checks that block both joining and canceling.
Impact:
Users suffer permanent loss of deposited funds, as they cannot access or recover assets post-event start without participation.
Protocol faces denial of service complaints, reduced user trust, and potential legal/regulatory scrutiny for locked funds.
Add the following code snippet to the briVault.t.sol test file.This test verifies that user cannot join the tournament if the eventStarted nor cancel the participation.
Possible mitigation is to allow users to cancel participation if they have not joined the event.
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.