Skip to content

Instantly share code, notes, and snippets.

@danbogd
Created June 27, 2019 17:04
Show Gist options
  • Select an option

  • Save danbogd/d1c3d936defedf2daea7f70be3177bc0 to your computer and use it in GitHub Desktop.

Select an option

Save danbogd/d1c3d936defedf2daea7f70be3177bc0 to your computer and use it in GitHub Desktop.

Huobi Token audit report.

1. Summary

This document is a security audit report performed by danbogd, where Huobi Token has been reviewed.

2. In scope

Сommit hash .

3. Findings

In total, 2 issues were reported including:

  • 1 medium severity issues
  • 1 low severity issues
  • 0 owner privileges (ability of owner to manipulate contract, may be risky for investors)..
  • 0 notes.

No critical security issues were found.

3.1 Non-compliance with ERC-20 Token Standard.

Severity: medium

Description

ERC-20 Token Standard specifies for functions transfer and transferFrom:

The function SHOULD throw if the _from account balance does not have enough tokens to spend. But in this implementation it just returns false. This can lead to serious consequences. Because checking the return value of this function is rare.

Code snippet

Lines 46,56, 94.

3.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. WARNING! This is a very common issue and it already caused millions of dollars losses for lots of token users! More details here.

Recommendation

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

require( _to != address(this) );

4. Conclusion

The review did not show any critical issues, some of medium and low severity issues were found.

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