MyCut

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

`ContestManager::closePot` function doesn't confirm return value in the transfer of the `claimantCut

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 a claimant fails and the transaction is not reverted, the pot is going to be closed but that claimant won't receive their cut.

Proof of Concept:

  1. Owner closes Pot calling ContestManager::closePot.

  2. External call _transferReward(claimants[i], claimantCut) fails and returns false.

  3. There is not return value check so transaction finish and claimant 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.