Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 956 Bytes

Tokens with more than 18 decimal points will cause issues.md

File metadata and controls

27 lines (22 loc) · 956 Bytes

It is assumed that the maximum number of decimals for each token is 18.

However uncommon, it is possible to have tokens with more than 18 decimals, as an example YAMv2 has 24 decimals.

This can result in broken code flow and unpredictable outcomes

Recommendation:

Make sure the code won’t fail in case the token’s decimals is more than 18


Slide Screenshot

003.jpg


Slide Text

  • ConsenSys DeFi Save Finding 5.2
  • Input Validation
  • Major Severity
  • Tokens w/ > 18 Decimals
  • Use SafeMath

References


Tags