Skip to content

Instantly share code, notes, and snippets.

@yuriy77k
Forked from MrCrambo/0xBTC.md
Created November 26, 2018 12:23
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/8cacfd5523627493fd74f308d909d43b to your computer and use it in GitHub Desktop.
Save yuriy77k/8cacfd5523627493fd74f308d909d43b to your computer and use it in GitHub Desktop.

Summary

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

The audit focused primarily on the security of 0xBTC smart contracts.

In scope

  1. https://github.com/0xbitcoin/0xbitcoin-token/blob/master/contracts/_0xBitcoinToken.sol

Findings

In total, 2 issue were reported including:

  • 0 high severity issues.

  • 0 medium severity issues.

  • 2 low severity issues.

Security issues

1. Zero address checking required

Severity: low

Description

In functions transfer and transferFrom there are no zero address checking. Because of this also totalSupply function will return wrong value with subtracting of zero address balance, where could be tokens losed by users.

Recommendation

Add zero address checking

require(to != address(0));

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

Conclusion

Smart contract has only low severity issues.

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