Sparkn

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

Incorrect comment

Summary

Incorrect logic in comment in deployProxyAndDistributeByOwner function

Vulnerability Details

Incorrect require statement in the deployProxyAndDistributeByOwner function.

Instances:

https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/ProxyFactory.sol#L188

    // require(saltToCloseTime[salt] == 0, "Contest is not registered");

Here, the saltToCloseTime[salt] is required to be zero which is incorrect as if it is equal to zero that means the contest is not registered yet.

Impact

Incorrect comment leads to confusion.

Tools Used

Manual review

Recommendations

Add the following comment:

    // require(saltToCloseTime[salt] != 0, "Contest is not registered");

Support

FAQs

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