Here is the report of the Binance Token (BNB) Security Audit performed by the Callisto Network security department in March 2019.
About Callisto Network and the security department
Utilizing Callisto Network capabilities, we have established a free-for-all system of smart-contracts auditing, to this end, Callisto Network has founded the Callisto security department and deploys treasury funds to pay security auditors for auditing smart-contracts, to reduce risk/flaw in smart-contracts and improve the adoption of programmable blockchains for the whole crypto industry.
Binance Token (BNB) specificities
Number of lines
Binance Token (BNB) Security Audit Report
2. In scope
In total, 5 issues were reported including:
- 5 low severity issues.
No critical security issues were found.
3.1. Known vulnerabilities of ERC-20 token
- It is possible to double withdrawal attack. More details here.
- 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 the following code to the
transfer(_to address, ...) function:
require( _to != address(this) );
3.2. ERC20 Compliance — event missing
According to ERC20 standard when coins are minted a
Transferevent should be emitted.
There is no
Approvalevent call at
approvefunction. And EIP20 says:
MUST trigger on any successful call to approve(address _spender, uint256 _value).
burnfunction also should emit the
3.3. ERC20 Compliance — zero-value transfers rejecting
EIP20 says that:
Transfers of 0 values MUST be treated as normal transfers and fire the Transfer event.
But in this contract, function
transferhas a condition:
if (_value <= 0) throw;
3.4. ERC20 Compliance —
- There is no way to reset approved value to 0, because
if (_value <= 0) throw;
- Also, it breaks the EIP20 security recommendation:
To prevent attack vectors like the one described here and discussed here, clients SHOULD make sure to create user interfaces in such a way that they set the allowance first to 0 before setting it to another value for the same spender. THOUGH The contract itself shouldn’t enforce it, to allow backwards compatibility with contracts deployed before
3.5. Fallback Function
Any ether sent directly to the contract through the fallback function will not result in an automatic buy of tokens but instead is directly sent to the contract balance.
The audited smart contract can be deployed. Only low severity issues were found during the audit.