The withdrawFees function (L187-196) has no access control modifier. Any address can call it. While the fees are always transferred to feeAddress (not the caller), this surrenders timing control to arbitrary external actors. The owner cannot control when fees are withdrawn.
The owner intends to accumulate fees across multiple raffle rounds before withdrawing.
After each selectWinner call, a bot immediately calls withdrawFees, transferring fees to feeAddress before the owner chooses to.
No funds are lost, but the owner has no control over withdrawal timing.
Short term: Add the onlyOwner modifier to withdrawFees:
Long term: Consider a more flexible access control scheme if multiple roles need withdrawal authority (e.g., OpenZeppelin's AccessControl).
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.