Two low-risk issues in the funding and closing flow: fundContest() doesn't check token allowance before transferFrom, and a Pot that's never funded can never be closed.
Finding 1:
fundContest() checks the Owner's token balance but never checks allowance(), if the Owner hasn't approved ContestManager to spend their tokens, transferFrom reverts with a generic error instead of a clear one.
Finding 2:
closePot() assumes a Pot has been funded. If a Pot is created but fundContest() is never successfully called, closePot() will always revert (Pot balance is 0), leaving it permanently stuck open with no way to cancel or recover it.
Likelihood:
Occurs whenever the Owner calls fundContest() without first approving the ContestManager contract, an easy step to forget.
Occurs whenever a Pot is created but never successfully funded, whether by oversight or a failed funding attempt.
Impact:
No funds are lost in either case, both are safe, recoverable states (retry after approving; or the Pot stays open but non-functional).
The main cost is reduced usability, an unclear revert message in Finding 1, and no way to cancel/reset a Pot in Finding 2.
No PoC is required for either finding, both describe standard, well-understood ERC20/EVM revert behavior (missing allowance, and calling transfer() on a zero balance) rather than an exploitable logic bug. The reverts themselves are self-evident from the code and don't require a test to demonstrate.
Add an explicit check in closePot() (or a separate cancelPot() function) confirming the Pot has actually been funded before proceeding, and revert with a clear, specific error (e.g. Pot__NeverFunded()) if not rather than relying on the underlying ERC20 transfer to fail with a generic error.
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.