Sparkn

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

Remove commented code which is incorrect.

Summary

The deployProxyAndDistributeByOwner() of ProxyFactory.sol contract has commented code which is incorrect.

Vulnerability Details

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

This code snippet is the commented incorrect code which needs to be removed.

Impact

If this commented code is use, the deployProxyAndDistributeByOwner() can be seriously expoited. The correct would be:

require(saltToCloseTime[salt] != 0, "Contest is not registered");
require(saltToCloseTime[salt] >= block.timestamp + EXPIRATION_TIME, "Contest is not expired");

Tools Used

Manual Review

Recommendations

Remove all the commented code which has no functionality.

Support

FAQs

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