This is the report from a security audit performed on ERC20andCrowdsale by Il Kadyrov.
The audit focused primarily on the security of ERC20andCrowdsale contracts.
- https://github.com/SamueleA/ERC20andCrowdsale/blob/master/Crowdsale.sol
- https://github.com/SamueleA/ERC20andCrowdsale/blob/master/ERC20Interface.sol
- https://github.com/SamueleA/ERC20andCrowdsale/blob/master/ERC20Token.sol
- https://github.com/SamueleA/ERC20andCrowdsale/blob/master/Ownable.sol
- https://github.com/SamueleA/ERC20andCrowdsale/blob/master/SafeMath.sol
In total, 4 issues were reported including:
-
1 high severity issues.
-
1 medium severity issues.
-
2 low severity issues.
Tokens could be sent to zero address, that means they will be locked and will not be able to use or burn. Functions transfer
and transferFrom
.
Need to check if to
address is not zero address.
require(to != address(0));
In line 159 (ERC20Token.sol) and line 120 (Crowdsale.sol) there are integer overflow possibilities.
Need to use SafeMath.
Used solidity version is old.
Need to use latest version of solidity.
_postValidatePurchase
and _updatePurchasingState
functions are empty, but used in buyTokens
function.
Rewrite functions or remove them and don't use.
One high severity vulnerabilitiy was detected. The reported issue can directly hurt the ERC20andCrowdsale smart-contracts.
You need to fix high severity issue and we highly recommend you to complete other bug bounty before use.