Assessment reports>Awaken Swap>Discussion>Additional token-sanity checks

Additional token-sanity checks

We recommend adding some missing checks to the token contract:

  • The DoTransfer method should check whether To is null in case anyone attempts to burn tokens by sending them to the null address, rather than calling Burn.

  • The Create method should check that Decimals is nonnegative and not too large. User-interface denial-of-service issues may arise if the number of decimals is not within a reasonable logarithm of the range of the token balances.

  • The AddMinter and RemoveMinter methods should have null checks on the addresses added/removed.

Zellic © 2024Back to top ↑