Puppy Raffle

AI First Flight #1
Beginner FriendlyFoundrySolidityNFT
EXP
View results
Submission Details
Impact: high
Likelihood: high
Invalid

`withdrawFees()` lacks access control → anyone can trigger fee withdrawal

Description

  • Normal: Fee withdrawal should be restricted to the protocol owner.

  • Bug: withdrawFees() at line 157 has no access control modifier. Anyone can call it and send fees to feeAddress.

// src/PuppyRaffle.sol:157
function withdrawFees() external { //@> No onlyOwner — anyone can call
// ...
}

Risk

Likelihood: Any external account can call withdrawFees() at any time.

Impact: Unscheduled fee withdrawals disrupt protocol revenue management. While funds go to feeAddress (not the caller), the timing is uncontrolled.

Recommended Mitigation

- function withdrawFees() external {
+ function withdrawFees() external onlyOwner {
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 2 hours ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!