Describe the normal behavior in one or more sentences
The pot should be closed once after 90 days and funds distributed exactly once.A fundamental principle of smart contract security is the Checks-Effects-Interactions (CEI) pattern. This function performs the "Interaction" (transferring tokens) without ever recording the "Effect" (updating the state to reflect that funds have been distributed).
Explain the specific issue or problem in one or more sentences
There is no closed flag or state update preventing repeated calls. remainingRewards is not zeroed after distribution. The owner can call closePot() multiple times and repeatedly extract managerCut.
Even though the admin is "Trusted," the protocol's safety should not rely on the admin's restraint. If the admin's private key is compromised, or if an automated script malfunctions, the entire contract balance—including funds belonging to other active pots—could be drained.
No state update occurs afterward
Likelihood:
Occurs whenever owner calls closePot() more than once
Occurs naturally due to lack of state transition protection
Impact:
Manager can repeatedly drain funds
Contract accounting becomes inconsistent
Severe trust and financial failure
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.