MyCut

AI First Flight #8
Beginner FriendlyFoundry
EXP
View results
Submission Details
Impact: high
Likelihood: low
Invalid

Calling `renounceOwnership` on `ContestManager` (inherited and not disabled) makes every Pot impossible to close, locking all their leftover funds

Root + Impact

Description

  • The owner should always be able to close pots once the claim period is over.

  • ContestManager inherits OpenZeppelin Ownable without overriding renounceOwnership. Every Pot is owned by ContestManager, and closing goes through ContestManager.closeContest, which is onlyOwner. If ownership is renounced, by mistake or when handing off the protocol, no one can ever call closeContest, and no pot can ever be closed.

contract ContestManager is Ownable { // renounceOwnership() inherited, not disabled
...
function closeContest(address contest) public onlyOwner {
_closeContest(contest);
}

Risk

Likelihood:

  • When the admin renounces ownership by mistake or while "decentralizing" the protocol.

  • When the admin key is lost, which has the same effect since there's no fallback.

Impact:

  • No Pot can ever be closed again, across every contest.

  • All unclaimed rewards and manager cuts in live pots are locked forever.

Proof of Concept

function testRenounceOwnershipBricksAllPots() public mintAndApproveTokens {
vm.startPrank(user);
address pot = ContestManager(conMan).createContest(players, rewards, IERC20(address(weth)), 4);
ContestManager(conMan).fundContest(0);
ContestManager(conMan).renounceOwnership();
vm.stopPrank();
vm.warp(block.timestamp + 91 days);
vm.prank(user);
vm.expectRevert();
ContestManager(conMan).closeContest(pot);
assertEq(weth.balanceOf(pot), 4); // nobody claimed, funds can never be distributed
}

Recommended Mitigation

+ error ContestManager__CannotRenounce();
+
+ function renounceOwnership() public view override onlyOwner {
+ revert ContestManager__CannotRenounce();
+ }
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 4 hours ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!