Skip to content

Instantly share code, notes, and snippets.

@yuriy77k
Forked from MrCrambo/ETH_Axmtoken_report.md
Created May 23, 2019 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuriy77k/bc828af53b91334d42579395ead78615 to your computer and use it in GitHub Desktop.
Save yuriy77k/bc828af53b91334d42579395ead78615 to your computer and use it in GitHub Desktop.

Summary

This is the report from a security audit performed on Axmtoken by MrCrambo.

The audit focused primarily on the security of Axmtoken smart contract.

In scope

  1. https://github.com/mahamihirion/axmtoken/blob/master/axm.sol

Findings

In total, 2 issues were reported including:

  • 0 high severity issues.

  • 1 medium severity issues.

  • 0 owner privilegies issues.

  • 1 low severity issues.

Security issues

1. Known vulnerabilities of ERC-20 token

Severity: low

Description

  1. It is possible to double withdrawal attack. More details here
  2. Lack of transaction handling mechanism issue. More details here

Recommendation

Add into a function transfer(address _to, ... ) following code:

require( _to != address(this) );

2. Wrong buying mechanism

Severity: high

Description

In constrcutor totalSupply_ set as tokenReserve which equals to cap, that means it could not be more than this value. But when someone will buy tokens, this bought tokens will be added to totalSupply_, which means that it will be greater than cap.

Recommendation

Set cap more than totalSupply_, or set tokenReserve smaller.

Conclusion

Smart contracts contain medium severity issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment