Skip to content

Instantly share code, notes, and snippets.

@MrCrambo
Created June 28, 2019 13:47
Show Gist options
  • Save MrCrambo/19a84875a17f319d19e71a39ffd01aaf to your computer and use it in GitHub Desktop.
Save MrCrambo/19a84875a17f319d19e71a39ffd01aaf to your computer and use it in GitHub Desktop.

Summary

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

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

In scope

  1. https://etherscan.io/address/0x6f259637dcd74c767781e37bc6133cd6a68aa161#contracts

Findings

In total, 3 issue was reported including:

  • 0 high severity issues.

  • 1 medium severity issues.

  • 0 owner privilegies issues.

  • 2 low severity issues.

  • 0 notes.

Security issues

1. Wrong transfer and transferFrom functions

Severity: medium

Description

In functions transfer and transferFrom there are returning false instead of throw when it's not possible to transfer.

Recommendation

Functions transfer and transferFrom should throw in case of not possibility of transfer.

2. 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) );

3. Zero address checking

Severity: low

Description

There is no zero address checking in functions transfer and transferFrom.

Conclusion

Smart contract contains medium severity issues.

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