Submitted by shw
The SafeERC20 library is used in the RCTreasury contract to handle the transfer of tokens that are not compliant with the ERC20 specification. However, in line 347, the approve function is used instead of the safeApprove function. Tokens not compliant with the ERC20 specification could return false from the approve function call to indicate the approval fails, while the calling contract would not notice the failure if the return value is not checked.
Recommend using the safeApprove function instead, which reverts the transaction with a proper error message when the return value of approve is false. A better approach is to use the safeIncreaseAllowance function, which mitigates the multiple withdrawal attack on ERC20 tokens.
Splidge (Reality Cards) disputed:
0xean (judge) commented:
Splidge (Reality Cards) acknowldeged:
