Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: medium
Invalid

`PuppyRaffle` uses single-step ownership for the `changeFeeAddress()` function

Summary

PuppyRaffle uses single-step ownership for the changeFeeAddress() function

Vulnerability Details

The PuppyRaffle::changeFeeAddress() function is used to change and set the feeAddress to the newly passed fee address from the function parameter. The problem is that there is a change in passing the wrong address as a function parameter, which will result in transferring the fees from the contract to the wrong address.

Impact

There is a posibility of passing the wrong feeAddress as a function parameter

Tools Used

Manual Review

Recommendations

One best practice here is to use a two-step ownership transfer pattern, which simply means that the transfer of the feeAddress will get to pending status, and then the new feeAddress owner should accept that, otherwise the address won't change. Also, the current owner can approve the 'newFeeAddress', and then the newFeeAddress can claim the pending ownership.

Updates

Lead Judging Commences

Hamiltonite Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: User experience and design improvement

Support

FAQs

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