MyCut

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

Unsafe ERC20 Operations should not be used in `ContractManager.sol`

Description: ERC20 functions may not behave as expected. For example: return values are not always meaningful.

Impact: If ContractManager::transferFrom fails and doesn't revert, the contract may behave incorrectly, assuming the transfer succeeded and it could lead to incorrect contest funding, loss of funds, or unexpected behavior.

Proof of Concept:

  1. Use a token that doesn't revert or return false on failure.

  2. Call fundContest with insufficient allowance or balance.

  3. Observe that the contract proceeds without reverting, despite the transfer failing.

Recommended Mitigation: Follow the given below mitigation to avoid the problem:

  1. Use OpenZeppelin's SafeERC20 library for safe token operations.

  2. Replace token.transferFrom(...) with token.safeTransferFrom(...).

Updates

Lead Judging Commences

equious Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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