The ContestManager.closeContest(address contest) function accepts an arbitrary address parameter and casts it to a Pot type without validating that the address is actually a registered contest. The function then calls pot.closePot() on this unvalidated address, executing an external call to any contract the owner supplies. While the function is restricted to onlyOwner, the lack of validation means the owner can accidentally (or intentionally on a compromised key) invoke closePot() on a non-contest address, leading to unexpected behavior.
The contests array tracks all created Pot addresses, but closeContest() never checks that the supplied contest parameter exists in this array. A typo or malicious key compromise could direct the call to a honey-pot contract, a contract with a closePot() selector collision that drains the caller, or simply revert unexpectedly. Additionally, calling closePot() on a Pot that belongs to a different ContestManager instance would bypass ownership assumptions.
Likelihood: Low
Impact: Low
Severity: Low
The owner calls closeContest() with an address that is not a registered contest. The function executes without reverting at the ContestManager level — it either calls a valid closePot() on a foreign Pot (which may or may not revert depending on ownership), or hits a selector collision on a different contract.
Add a mapping to track registered contests and validate the address before calling closePot().
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.