Sparkn

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

The setContest function would forever revert because "salt" would never be zero.

Summary

The use of "!=" in if (saltToCloseTime[salt] != 0) would cause the function to revert.

Vulnerability Details

salt stores this - _calculateSalt(organizer, contestId, implementation). Therefore, it would never be zero.

The condition check in the if statement that if (saltToCloseTime[salt] != 0), it should revert. And salt can't be zero based on what it stores. So, setContest would always revert.

Impact

It's impossible to use setContest function.

Tools Used

Manual review

Recommendations

Change if (saltToCloseTime[salt] != 0) to if (saltToCloseTime[salt] == 0)

Support

FAQs

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

Give us feedback!