Sparkn

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

Missing implementation in `deployProxyAndDistribute` function

Summary

The following comment in the ProxyFactory.sol deployProxyAndDistribute function suggests the organizer can an option to update the contest close time and distribute, but there is no implementation for that in the code:

// can set close time to current time and end it immediately if organizer wish

Vulnerability Details

function deployProxyAndDistribute(bytes32 contestId, address implementation, bytes calldata data)
public
returns (address)
{
bytes32 salt = _calculateSalt(msg.sender, contestId, implementation);
if (saltToCloseTime[salt] == 0) revert ProxyFactory__ContestIsNotRegistered();
// can set close time to current time and end it immediately if organizer wish
if (saltToCloseTime[salt] > block.timestamp) revert ProxyFactory__ContestIsNotClosed();
address proxy = _deployProxy(msg.sender, contestId, implementation);
_distribute(proxy, data);
return proxy;
}

Impact

It's unclear to the non-technical user if they have an option to set close time and end a contest immediately.

Tools Used

Manual Analysis

Recommendations

Several options

  • Add TODO to clarify that the option will be available for the future.

  • Remove the comment if this option is no longer considered.

  • Keep the comment and implement the feature.

Support

FAQs

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

Give us feedback!