Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 992 Bytes

Unhandled return values of `transfer` and `transferFrom`.md

File metadata and controls

27 lines (22 loc) · 992 Bytes

ERC20 implementations are not always consistent.

Some implementations of transfer and transferFrom could return ‘false’ on failure instead of reverting.

It is safer to wrap such calls into require() statements to these failures.

Recommendation:

Check the return value and revert on 0/false or use OpenZeppelin’s SafeERC20 wrapper functions


Slide Screenshot

001.jpg


Slide Text

  • ConsenSys Audit Aave V2 Finding 5.4
  • Error Handling
  • Medium Severity
  • transfer/transferFrom Return Values
  • Use SafeERC20 Wrappers

References


Tags