Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

Basic Attention Token (BAT) audit report.

1. Summary

This document is a security audit report performed by danbogd, where Basic Attention Token (BAT) has been reviewed.

2. In scope

3. Findings

In total, 4 issues were reported including:

  • 1 low severity issues.
  • 3 minor observation.

No critical security issues were found.

3.1. Known vulnerabilities of ERC-20 token

Severity: low


  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.


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

require( _to != address(this) );

3.2. Discrepancy with the ERC20 standard

Severity: minor observation


In BAToken.sol, according to the ERC20 standard, the variable decimals should be declared as uint8.

Code snippet

3.3. Meaningless checks.

Severity: minor observation


The msg.value == 0 condition check is meaningless in most cases.

Code snippet

3.4. Consider using latest version of solidity.

Severity: minor observation


The contracts use solidity version 0.4.10. It is suggested to use the latest version and fix all compiler warnings that arise. Compiler version should be fixed to avoid any potential discrepancies in smart contract behavior caused by different versions of compiler.

4. Conclusion

The audited smart contract is safe to deploy. Some low severity issues were found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.