Sparkn

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

Dangling commented out code

Summary

There are two require statements that are commented out in the ProxyFactory.sol deployProxyAndDistributeByOwner function.

if (saltToCloseTime[salt] == 0) revert ProxyFactory__ContestIsNotRegistered();
if (saltToCloseTime[salt] + EXPIRATION_TIME > block.timestamp) revert ProxyFactory__ContestIsNotExpired();
// require(saltToCloseTime[salt] == 0, "Contest is not registered");
// require(saltToCloseTime[salt] < block.timestamp + EXPIRATION_TIME, "Contest is not expired");

Vulnerability Details

The commented out require statements is a repeat of the two if conditionals right above the require statements.

Impact

The second require statement's logic can be confusing for the developer and the user, and this can be uncommented with incorrect logic in the future.

Tools Used

Manual Analysis

Recommendations

Remove the commented code to prevent confusion.

Support

FAQs

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

Give us feedback!