This document is a security audit report performed by danbogd, where Projecton has been reviewed.
Commit hash:fed7803c48d517f5aee9d787e54d3bebf3106d44
In total, 6 issues were reported including:
- 3 low severity issues.
- 3 minor observation.
Possibility of setting zero address as newOwner at transferOwnership function.
Need to check if newOwner address is not zero address.
require(newOwner != address(0));
Accroding to ERC20 standard, when initializing a token contract if any token value is set to any given address a transfer event should be emited. An event isn't emited when assigning the initial supply to the msg.sender.
-
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 into a function transfer(address _to, ... )
following code:
require( _to != address(this) );
Constant functions have incorrect type. They should be changed to view type instead. Starting from Solidity 0.4.16, functions that do not modify the blockchain can have two modifiers: pure or view. Pure functions cannot modify or read data from blockchain. View functions have the same semantics as constant, but they can read data from blockchain.
It is recommended to provide meaningful error messages along with each require statement. This will help the user to understand what went wrong more easily since there are many validations happening for each buy.
The contracts use solidity version 0.4.25. 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.
The review did not show any critical issues, some of low severity issues were found.