Skip to content

Instantly share code, notes, and snippets.

@MrCrambo
Last active May 23, 2019 14:17
Show Gist options
  • Save MrCrambo/4af5d31230d11529af28747ab49df2cf to your computer and use it in GitHub Desktop.
Save MrCrambo/4af5d31230d11529af28747ab49df2cf 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: medium

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