CertiK reviewed Bitonite on 10 Jan 2024: 7 findings, 0 critical; none marked fixed.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 3 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 4 | 0 | 0 |
In the contract `OwnableUpgradeable` the role `_owner` has authority over the following functions: - transferOwnership() - renounceOwnership() Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and transfer or renounce the ownership. --- In the contract `BitToken` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and set the `beneficiary` addresses and transfer tokens to them.  ----- In the contract `RewardsDistributor` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and set the `rewardsTracker` address and withdraw tokens from the contract.  In the contract `RewardsDistributor` the role `rewardsTracker` has authority over the function shown in the diagram below. Any compromise to the `rewardsTracker` account may allow the hacker to take advantage of this authority and transfer `token` from the contract.  ----- In the contract `Staking` the role `_owner` has authority over the functions shown in the diagram below. Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and set the reward provider, set the rewards burn rate (which can be up to 100%), add/update pools, and pause/unpause the contract.  ----- In the contracts `LockBit` and `VestingBase`, the role `_owner` has authority over the following function: - setBeneficiary() Any compromise to the `_owner` account may allow the hacker to take advantage of this authority and set the `beneficiary` address. --- In the contracts `LockBit`, `Vesting`, and `VestingTge`, the role `beneficiary` has authority over the following function: - claim() Any compromise to the `beneficiary` account may allow the hacker to take advantage of this authority and transfer tokens from the contract.
The following contracts serve as implementation contracts behind the proxy contracts: - LockBit - Vesting - VestingTge - BitToken - RewardsDistributor - Staking The proxy admins have the authority to update the implementation contracts behind the proxy contracts. Any compromise to the proxy admins may allow a hacker to take advantage of this authority and change the implementation contract which is pointed by proxy and therefore execute potential malicious functionality in the implementation contract. For example, the staked tokens in the `Staking` contract can be swept out.
All of the BIT tokens will be sent to `beneficiary` addresses. This is a centralization risk because the addresses can distribute tokens without obtaining the consensus of the community. Any compromise to these addresses may allow a hacker to steal and sell tokens on the market, resulting in severe damage to the project.
The project design may not be compatible with non-standard ERC20 tokens, such as deflationary tokens or rebase tokens.
There is no storage gap preserved in the logic contract `VestingBase`. Any logic contract that acts as a base contract inherited by other upgradeable contracts should have a reasonable size of storage gap preserved for potential new state variables introduced in future upgrades. Otherwise, there could be potential storage slot collision.
The `_addPool()` function in the contract is responsible for adding new pools. It utilizes the `_mintStartBlock` parameter to set the initial block number for staking rewards. If this parameter is set to a very low number, such as 1, it could lead to a situation where the first staker in the new pool could claim an excessively large amount of rewards. This is because the rewards calculation would consider all the blocks from the `_mintStartBlock` to the current block, leading to a substantial reward accumulation for the initial blocks. The `setPoolInfo()` function shares the same issue. If an existing pool is updated with the `_mintStartBlock` parameter setting to a very low number, the stakers in the pool can get a lot of rewards. ```solidity=277 function _addPool( address _token, uint256 _rewardPerBlock, uint64 _cooldownPeriod, uint64 _mintStartBlock ) internal { if (_mintStartBlock == 0) { _mintStartBlock = _getBlockNumber(); } require(_rewardPerBlock != 0, "!rewardPerBlock"); poolTokens.push(_token); poolInfo[_token] = PoolInfo({ id: poolTokens.length.toUint64(), rewardPerBlock: _rewardPerBlock, lastRewardBlock: _mintStartBlock, cooldownPeriod: _cooldownPeriod, totalDeposits: 0, accPalmPerShare: 0 }); emit PoolUpdate( _token, poolTokens.length.toUint64(), _rewardPerBlock, _cooldownPeriod, _mintStartBlock ); } ```
The following logic contracts do not protect their initializers. An attacker can call the initializers and assume ownership of the logic contracts, whereby she can perform privileged operations that trick unsuspecting users into believing that she is the owner of the upgradeable contracts. ```solidity=8 contract BitToken is IBitToken, ERC20PermitUpgradeable, OwnableUpgradeable { ``` - `BitToken` is an upgradeable contract that does not protect its initializer. ```solidity=24 function initialize() external initializer { ``` - `initialize` is an unprotected initializer function. --- ```solidity=8 contract RewardsDistributor is IRewardsDistributor, OwnableUpgradeable { ``` - `RewardsDistributor` is an upgradeable contract that does not protect its initializer. ```solidity=16 function initialize(address _token, address _rewardsTracker) external initializer { ``` - `initialize` is an unprotected initializer function. --- ```solidity=12 contract Staking is OwnableUpgradeable, ReentrancyGuardUpgradeable, PausableUpgradeable { ``` - `Staking` is an upgradeable contract that does not protect its initializer. ```solidity=66 function initialize( ``` - `initialize` is an unprotected initializer function. --- ```solidity=7 contract LockBit is OwnableUpgradeable { ``` - `LockBit` is an upgradeable contract that does not protect its initializer. ```solidity=21 function initialize( ``` - `initialize` is an unprotected initializer function. --- ```solidity=7 contract Vesting is VestingBase { ``` - `Vesting` is an upgradeable contract that does not protect its initializer. ```solidity=17 function initialize( ``` - `initialize` is an unprotected initializer function. --- ```solidity=7 contract VestingTge is VestingBase { ``` - `VestingTge` is an upgradeable contract that does not protect its initializer. ```solidity=18 function initialize( ``` - `initialize` is an unprotected initializer function.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (9)
1,045 projects reviewed · 1,376 reports · latest May 2025
See CertiK’s auditsSomething wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.
Tell us