This document is a security audit report performed by danbogd, where Holo Token has been reviewed.
Сommit hash .
In total, 6 issues were reported including:
- 0 medium severity issues
- 2 low severity issues
- 3 owner privileges (ability of owner to manipulate contract, may be risky for investors)..
- 1 notes.
No critical security issues were found.
-
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) );
Contract owner allow himself to:
- Selectively burn tokens;
- Unlimited token minting;
- Block functions of contract (transfer, transferFrom, approve) at any time he wants.
function burn(uint256 _amount) external onlyDestroyer { require(balances[destroyer] >= _amount && _amount > 0); balances[destroyer] = balances[destroyer].sub(_amount); totalSupply = totalSupply.sub(_amount); Burn(_amount); }
function mint(address _to, uint256 _amount) external onlyMinter canMint returns (bool) { require(balances[_to] + _amount > balances[_to]); // Guard against overflow require(totalSupply + _amount > totalSupply); // Guard against overflow (this should never happen) totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); return true; }
modifier whenMintingFinished() { require(mintingFinished); _; }
In this functions there are no checking for zero address.
function setDestroyer(address _destroyer) external onlyOwner { destroyer = _destroyer; }
function setMinter(address _minter) external onlyOwner { minter = _minter; }
The contracts use solidity version 0.4.18. 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.