Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: low

Organizer has no ability to close contest prematurely

Summary

There is a wrong comment in the code stating that the organizer of a contest can set close time to current time and end the contest.

Vulnerability Details

In line #135 of ProxyFactory, a comment states: "can set close time to current time and end it immediately if organizer wish". With the current implementation, this is not possible. setContest is the function responsible for changing the close time of a contest. This function has an onlyOwner modifier, making it impossible for the organizer to change the close time of a contest.

Impact

Incorrect and misleading documentation

Tools Used

Manual review

Recommendations

Allow for the organizer to change the close time of contests that they own.

One option is to remove the onlyOwner modifier, check whether the msg.sender calling the function is the organizer of the contest they are trying to set, and if yes, allow them to change the close time of the contest. The owner should still be able to change the close time of any contest.

Alternatively, remove the comment on Line #135.

Support

FAQs

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