ContestManager.createContest() deploys a Pot and later calls pot.closePot() via _closeContest(). The closePot function is restricted to the Pot owner, so ContestManager must be the owner for closure to work.
Pot uses Ownable(msg.sender) in its contract-level declaration. When ContestManager.createContest() executes new Pot(...), msg.sender inside that constructor call is the EOA that called createContest — not address(ContestManager). The Pot owner becomes the EOA directly, meaning every ContestManager._closeContest() call reverts with OwnableUnauthorizedAccount, permanently breaking contest closure.
Likelihood:
Every contest deployed through ContestManager exhibits this bug — it is not conditional on any external factor. The ownership mismatch is baked into the deployment sequence.
The existing test testCanCloseContest passes only because it calls pot.closePot() directly as the EOA user, bypassing ContestManager entirely and masking the production failure.
Impact:
ContestManager.closeContest() is permanently non-functional for every pot deployed through the system. All contest closure logic — manager cut distribution and claimant bonus distribution — is permanently locked.
Users interacting with the system as designed (through ContestManager) can never trigger closure. The only workaround is for the EOA to call pot.closePot() directly, which bypasses the abstraction layer entirely.
Place this test in test/ and run forge test --match-test testCloseContestRevertsViaContestManager. The test demonstrates that ContestManager.closeContest() always reverts because Pot.closePot() uses onlyOwner and ownership was never transferred to ContestManager at deployment.
Pass address(this) (the ContestManager address) as the owner argument when deploying Pot so ContestManager holds the onlyOwner role and can successfully call 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.