MyCut

First Flight #23
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Valid

Some funds will be locked in contest manager

Summary

When closing one pot, one part of remaining rewards will be transferred to contest manager. Funds will be locked in contest manager.

Vulnerability Details

When the owner closes one contest, we will check whether all rewards have been claimed. If there are some remaining rewards, one part of remaining rewards will be transferred to contest manager.
The problem is that this part of funds that contest manager receives will be locked in contest manager. Because there is not any withdraw function in contest manager. The actual funder cannot get back this part of funds.

function closePot() external onlyOwner {
if (block.timestamp - i_deployedAt < 90 days) {
revert Pot__StillOpenForClaim();
}
if (remainingRewards > 0) {
uint256 managerCut = remainingRewards / managerCutPercent;
i_token.transfer(msg.sender, managerCut);
uint256 claimantCut = (remainingRewards - managerCut) / i_players.length;
for (uint256 i = 0; i < claimants.length; i++) {
_transferReward(claimants[i], claimantCut);
}
}
}

Impact

Funds will be locked in contest manager.

Tools Used

Manager

Recommendations

Add one onlyOwner withdraw function in contest manager.

Updates

Lead Judging Commences

equious Lead Judge about 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Owner's cut is stuck in ContestManager

Support

FAQs

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