MyCut

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

Contest can only be closed by the owner, which can lead to locked funds if the owner fails to call the function

Description: In ContestManager::closeContest() and Pot::closePot(), the functions can only be called by the owner.

function closeContest(address contest) external onlyOwner {
// ...
}
function closePot() external onlyOwner {
// ...
}

Impact: If the owner fails to call the function, the funds will be locked in the contract, and the claimants will not be able to claim their rewards. This will lead to funds locked in forever.

Recommended mitigation: Make this a public function so that anyone can call the function to close the contest and distribute the rewards. This will ensure that the funds are not locked in the contract and the claimants can claim their rewards.

- function closeContest(address contest) external onlyOwner {}
+ function closeContest(address contest) external {
// ...
}
- function closePot() external onlyOwner {}
+ function closePot() external {
// ...
}
Updates

Lead Judging Commences

equious Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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