Root Cause
In Pot.sol line 55, the token transfer to fund the pot at deployment is commented out:
Impact Assessment
| Dimension | Assessment |
|---|---|
| Fund Loss | None directly (tokens stay with owner) |
| Functionality | Complete failure - no claims possible |
| User Experience | All claims revert with transfer error |
| Protocol State | Broken - pots appear funded but aren't |
The Pot contract constructor has the token transfer line commented out, preventing the contract from receiving its initial funding at deployment time.
This means every deployed Pot starts with zero token balance, making all claimCut() calls fail unless the owner manually calls fundContest() via ContestManager.
Likelihood:
Reason 1 // Describe WHEN this will occur (avoid using "if" statements)
Reason 2
Impact:
Every deployed Pot starts with 0 token balance despite remainingRewards being set to totalRewards
All claimCut() calls revert because _transferReward() calls i_token.transfer() on empty contract
Protocol is completely non-functional without manual fundContest() call
Owner must remember to call fundContest() for every pot - easy to miss
Creates confusing UX where contract state says "300 tokens available" but balance is 0
Test: test_POC_ConstructorMissingTokenTransfer()
Result: ✅ PASSED - Confirms pot balance = 0, claim reverts
The constructor has been updated to replace a direct transfer call with transferFrom.
Original issue: Using transfer(address(this), totalRewards) assumed the Pot contract itself already held the required tokens or that the tokens were sent beforehand, which is error-prone and could lead to deployment succeeding without the contract actually being funded.
Mitigation: The transferFrom(msg.sender, address(this), totalRewards) call pulls the exact reward tokens directly from the caller (msg.sender) at deployment time. This guarantees that the Pot contract is fully funded immediately upon creation, provided that the caller (e.g., ContestManager) has previously approved the Pot contract to spend the required token amount. This approach enforces a secure, atomic funding mechanism and prevents deployment with insufficient or missing funds.
Note: Caller (ContestManager.createContest) must approve the Pot contract for totalRewards before deployment, or use transferFrom from the owner.
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.