Sparkn

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

the contestId make cause user trapped when setContest

Summary

the contestId make cause user trapped when setContest

Vulnerability Details

there should be a scenario:
the implementation address is stable, one organizer has created many contest, and he doesn't remember what contestId he has used, he tried again and again, but he always got an error tips triggered by code in line114. how can he create a new contest now?
although he can use a function to generate random number as contestId, but we can't assume every organizer is wise.

Impact

the organizer may be puzzle when setting contest.
other functions that using contestId have the same potential problem

Tools Used

Recommendations

Rewrite the map of saltToCloseTime, mark one saltToCloseTime is true, once it expires, set its value as false, or just delete it.

Support

FAQs

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