Sparkn

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

Potential Arithmetic Over/Underflows `ProxyFactory.sol`

Summary

Mathematical operations on uint256 without overflow checks could cause unexpected behaviors.
Vulnerability Details

Operations like closeTime > block.timestamp + MAX_CONTEST_PERIOD in setContest do not have overflow checks when doing math on uint256.

Impact

Potential arithmetic over/underflows leading to incorrect contest period validation.

Tools Used

Manual

Recommendations

Use SafeMath libraries or add manual overflow validation when doing math.

function setContest(/*...*/) {
// With SafeMath
if (closeTime > block.timestamp.add(MAX_CONTEST_PERIOD)) {
revert("Close time too long");
}
// Rest of function...
}

Support

FAQs

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