withdraw() checks eligibleStake[msg.sender] == 0 and reverts with InvalidAmount. The caller passes no amount parameter — the function withdraws their full eligible stake. The actual failure is that the caller has no stake to withdraw. Using InvalidAmount implies the caller passed an invalid parameter value, which is inaccurate. A dedicated error like NothingToWithdraw or NoEligibleStake would be more precise.
Likelihood: Low — only triggers when a user with no stake calls withdraw().
Impact: Low — no funds lost; off-chain debugging is degraded because the error suggests input validation failure rather than state conflict.
File: L21-InvalidAmount-Withdraw-NoStake.poc.t.sol
Run: forge test --match-path 'L21-InvalidAmount-Withdraw-NoStake.poc.t.sol' -vv
Add a dedicated error:
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.
The contest is complete and the rewards are being distributed.