Skip to content

Latest commit

 

History

History
23 lines (21 loc) · 860 Bytes

`swapExactTokensForETH` checks the wrong return value.md

File metadata and controls

23 lines (21 loc) · 860 Bytes

Instead of checking that the amount of tokens received from a swap is greater than the minimum amount expected from this swap, it calculates the difference between the initial receiver’s balance and the balance of the router

Recommendation:

Check the intended values


Slide Screenshot

007.jpg


Slide Text

  • ConsenSys Audit DAOfi Finding 4.4
  • Error Handling
  • Major Severity
  • Incorrect Check
  • Swap Tokens
  • Use Correct Check

References


Tags