BNB project favicon

BNB

Multi-Chain
Last audited on 2023/02/03
No active critical issues

Last Issues (10)

Low
Medium
High
Critical
Total
Not fixed
9-1-10
Fixed
----0
Total901010
Centralization Related Risks
not_fixed/high

In the contract `BNB`, the role `owner` has authority over the function. Any compromise to the `owner` account may allow a hacker to take advantage of this authority and withdraw all BNB stored in the contract. It is worth mentioning that no function to update the owner's address was found to be implemented.
Deprecated standards
not_fixed/low

Usage of `throw` should be replaced with `revert()`.
Function And Variable Naming Doesn't Match The Op
not_fixed/low

The `BNB` contract has some references to `ETH` instead of `BNB` even though it is deployed on the Binance Smart Chain (BSC).
Missing Emit Events
not_fixed/low

Functions that update state variables should emit relevant events as notifications.
Redundant Code Components
not_fixed/low

The linked statements do not affect the functionality of the codebase and appear to be either leftovers from test code or older functionality.
Shadowing Built-in Symbol
not_fixed/low

A user-defined component is shadowing a built-in symbol. ```solidity=31 function assert(bool assertion) internal { ``` - Function `assert` is shadowing a built-in symbol.
Solidity Version Not Recommended
not_fixed/low

Solidity frequently releases new compiler versions. Using an old version prevents access to new Solidity security features. We also recommend avoiding complex `pragma` statements. The pragma statement in use allows old versions and it is not locked: ```solidity=1 pragma solidity ^0.4.8; ```
Unused Return Variable
not_fixed/low

```solidity=89 returns (bool success) { ``` - The function `approve` implicitly returns and never writes the return variable `success`. --- ```solidity=97 function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { ``` - The function `transferFrom` implicitly returns and never writes the return variable `success`. --- ```solidity=110 function burn(uint256 _value) returns (bool success) { ``` - The function `burn` implicitly returns and never writes the return variable `success`. --- ```solidity=119 function freeze(uint256 _value) returns (bool success) { ``` - The function `freeze` implicitly returns and never writes the return variable `success`. --- ```solidity=128 function unfreeze(uint256 _value) returns (bool success) { ``` - The function `unfreeze` implicitly returns and never writes the return variable `success`.
Usage of `transfer()` for Sending ETH
not_fixed/low

It is not recommended to use Solidity's `transfer()` and `send()` functions for transferring ETH, since some contracts may not be able to receive the funds. Those functions forward only a fixed amount of gas (2300 specifically) and the receiving contracts may run out of gas before finishing the transfer. Also, EVM instructions' gas costs may increase in the future. Thus, some contracts that can receive now may stop working in the future due to the gas limitation. ```solidity=140 owner.transfer(amount); ``` - `withdrawEther()` uses `transfer()`.
Variables That Could Be Declared as Immutable
not_fixed/low

The linked variables assigned in the constructor can be declared as `immutable`. Immutable state variables can be assigned during contract creation but will remain constant throughout the lifetime of a deployed contract. A big advantage of immutable variables is that reading them is significantly cheaper than reading from regular state variables since they will not be stored in storage.

Audits (2)

#NameAuditorDateChainsIssues
1BNB Chain - BNB (refreshed)CertiK2023/02/03
Ethereum
No active critical issues
2BNB Chain - BGBP (refreshed)CertiK2023/02/03
Ethereum
No active critical issues