Platform: Code4rena
Start Date: 27/01/2022
Pot Size: $90,000 USDC
Total HM: 21
Participants: 33
Period: 7 days
Judge: Jack the Pug
Total Solo HM: 14
Id: 78
League: ETH
Rank: 30/33
Findings: 1
Award: $17.33
🌟 Selected for report: 0
🚀 Solo Findings: 0
cmichel
The ERC20.transfer()
and ERC20.transferFrom()
functions return a boolean value indicating success. This parameter should be checked for success.
Some tokens do not revert if the transfer failed but return false
instead.
Occurrences:
FlanBackstop.purchasePyroFlan
: IERC20(stablecoin).transferFrom(msg.sender, flanLP, amount / 2)
:Tokens that don't actually perform the transfer and return false
are still counted as a correct transfer.
We recommend either checking the success
boolean or using OpenZeppelin’s SafeERC20
versions with the safeTransfer
and safeTransferFrom
functions that handle the return value check as well as non-standard-compliant tokens.
#0 - gititGoro
2022-02-09T23:05:52Z
duplicate of issue 43
#1 - jack-the-pug
2022-02-16T14:22:13Z
Dup #37