Sparkn

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

Protocol is brittle as fixed expiry and close time limits

Summary

Every contest will have the same EXPIRATION_TIME = 7 days and MAX_CONTEST_PERIOD = 28 days

Vulnerability Details

Contests are not going to come in one size fits all so finalizing their logistics, winners may need different timelines
However the values are fixed and apply for all contests/created innovations/projects without differentiation

Impact

The above makes the protocol inflexible and brittle as these values once ProxyFactory is deployed cant be changed. It may be that with learning via experience it may be ideal to have shorter or longer MAX_CONTEST_PERIOD etc
This one size fits all may even not be ideal as it may disincentivise sponsors who wanted a shorter or longer timelines for their specific project they want to fund etc

Tools Used

Manual Analysis

Recommendations

It is recommended either introduce setter functions that can change above values

Ideally each contest must have its own values so these values of closeTime, expirations and timelines can be parameters for each individual contest e.g in setContest(,,,uin256 _maxContestTime, uint256 _expirationTime) so that you set uniquely for each contest maybe withing certain acceptable bounds

Support

FAQs

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