Description:
This part of code misses to verify the return value of the external transfer call, this is risky because not all the token transfer functions revert on fail, some tokens return false if the transfer fails.
Impact:
If for any reason the transfer external call to send the cut of the manager fails and the transaction is not reverted, the pot is going to be closed but the manager won't receive their cut which is the main incentive.
Proof of Concept:
Owner closes Pot calling ContestManager::closePot
.
External call i_token.transfer(msg.sender, managerCut)
fails and returns false.
There is not return value check, so transaction finishes and manager doesn't receive their cut😞.
Recommended Mitigation:
Use SafeERC20, or ensure that the transfer/transferFrom return value is checked.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.