CertiK reviewed TOMI on 6 Mar 2023: 10 findings, 0 critical; all acknowledged, none 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 | 0 | 2 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 0 | 8 | 0 |
In the contract `Tomi`, the role `owner` has authority over the following functions: - updateMarketingWallet() - updateCoreTeamWallet() - updateFutureTeamWallet() - updateEmissions() - fundDao() - transferOwnership() - renounceOwnership() Any compromise to the `owner` or access to the functions may allow a hacker to do the following: - set several accounts which could get new minted tokens. The hacker could use this authority to steal tokens. --- In the contract `Tomi`, the role `nftContract` has authority over the following functions: - mintThroughNft() Any compromise to the `nftContract` or access to the functions may allow a hacker to do the following: - mint tokens to some accounts. The hacker could use this authority to steal tokens. --- In the contract `Tomi`, the role `vestingContract` has authority over the following functions: - mintThroughVesting() Any compromise to the `vestingContract` or access to the functions may allow a hacker to do the following: - mint tokens to any account. The hacker could use this authority to steal tokens.
**Tomi** is an upgradeable contract, the owner can upgrade the contract without the community's commitment. If an attacker compromises the account, he can change the implementation of the contract and get potential benefits.
There should always be events emitted in the sensitive functions that are controlled by centralization roles.
Addresses should be checked before assignment or external call to make sure they are not zero addresses. ```solidity=87 marketingWallet = newAddress; ``` - `newAddress` is not zero-checked before being used. --- ```solidity=92 coreTeamWallet = newAddress; ``` - `newAddress` is not zero-checked before being used. --- ```solidity=97 futureTeamWallet = newAddress; ``` - `newAddress` is not zero-checked before being used.
State variables that never used can be removed to save gas. ```solidity=39 uint256 public totalMined; ```
The contract is serving as the underlying entity to interact with one or more third party protocols. The scope of the audit treats third party entities as black boxes and assume their functional correctness. However, in the real world, third parties can be compromised and this may lead to lost or stolen assets. In addition, upgrades of third parties can possibly create severe impacts, such as increasing fees of third parties, migrating to new LP pools, etc. ```solidity=36 IPioneerNFT public nftContract; ``` - The contract `Tomi` interacts with third party contract with `IPioneerNFT` interface via `nftContract`. --- ```solidity=37 address public vestingContract; ``` - The contract `Tomi` interacts with third party contract with `vestingContract` interface via `vestingContract`. --- ```solidity=143 uint256 tomiPrice = IPriceFeed(0x4c7f63B6105Ff95963fC79dB8111628fa014769b).getTomiPrice(); // Price Oracle ``` - This expression interacts with a third party contract with `IPriceFeed` interface.
Literals with many digits are difficult to read and review. ```solidity=144 uint256 tomiAmount = uint256(1000000000000000000000000000000000).div(tomiPrice); // 10 Million => 10_000_000^26 ```
One or more state variables are used without being initialized. Also, there is no function to set them. ```solidity=36 IPioneerNFT public nftContract; ``` - `nftContract` is never initialized, but used in `Tomi.mintThroughNft`. --- ```solidity=37 address public vestingContract; ``` - `vestingContract` is never initialized, but used in:
One or more logic contracts do not protect their initializers. An attacker can call the initializer and assume ownership of the logic contract, whereby she can perform privileged operations that trick unsuspecting users into believing that she is the owner of the upgradeable contract. ```solidity=11 contract Tomi is Initializable, ERC20Upgradeable, OwnableUpgradeable { ``` - `Tomi` is an upgradeable contract that does not protect its initializer. ```solidity=80 function initialize() initializer public { ``` - `initialize` is an unprotected initializer function.
```solidity=73 event daoFunded( uint256 timestamp, uint256 tomiAmount, uint256 tomiPrice, address treasury ); ``` - `daoFunded` is declared in `Tomi` but never emitted.
| Address | Chain | Source code |
|---|---|---|
| 0x4385…34490x4385328cc4d643ca98dfea734360c0f596c83449 | Chain: Ethereum | Source code: Verified source |
| 0xe43e…d3bf0xe43e0a34a1da0dfc2727ed3d91fcef198bd2d3bf | Chain: Ethereum | Source code: Verified source |
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