Skip to content

Instantly share code, notes, and snippets.

@yuriy77k
Forked from danbogd/0xBTC_audit_report.md
Created December 13, 2018 19:31
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/b8380047f1f6d4da86d121c2d854537d to your computer and use it in GitHub Desktop.
Save yuriy77k/b8380047f1f6d4da86d121c2d854537d to your computer and use it in GitHub Desktop.

0xBTC Smart Contract Audit Report.

1. Summary

This document is a security audit report performed by danbogd, where 0xBTC Smart Contract has been reviewed.

2. In scope

3. Findings

In total,2 issues were reported including:

  • 2 low severity issues.
  • 2 minor observation

No critical security issues were found.

3.1. Known vulnerabilities of ERC-20 token

Severity: low

Description

  1. It is possible to double withdrawal attack. More details here.

3.2. No checking for zero address.

Severity: low

Description

Transfer & transferFrom functions do not prevent from sending tokens to address 0x0.

Recommendation

Add zero address checking

require(to != address(0));

3.3. Redundant function().

Severity: minor observation

Description

We believe that function () with revert was a pattern used to prevent implicit acceptance of ether in Solidity versions older than 0.4.0, but today this is unneeded.

Code snippet

https://github.com/0xbitcoin/0xbitcoin-token/blob/ec69855517142c2acbb32a976d0d6febb5df0c10/contracts/_0xBitcoinToken.sol#L642-L646

3.4. Consider using latest version of solidity.

Severity: minor observation

Description

The contracts use solidity version 0.4.18. It is suggested to use the latest version and fix all compiler warnings that arise.

4. Conclusion

No critical vulnerabilities were detected,but we highly recommend to complete this bugs before use.

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