MyCut

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

`ContestManager::closePot` function doesn't check return value in the transfer of the `managerCut`

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:

  1. Owner closes Pot calling ContestManager::closePot.

  2. External call i_token.transfer(msg.sender, managerCut) fails and returns false.

  3. 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.

Updates

Lead Judging Commences

equious Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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