This document is a security audit report performed by danbogd, where IOSToken has been reviewed.
In total, 4 issues were reported including:
- 1 medium severity issues.
- 2 low severity issues.
- 1 minor observation.
No critical security issues were found.
ERC-20 Token Standard specifies for functions transfer and transferFrom:
The function SHOULD throw if the _from account balance does not have enough tokens to spend. But in this implementation it just returns false. This can lead to serious consequences. Because checking the return value of this function is rare.
Lines 60, 70.
-
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) );
Transfer & transferFrom functions do not prevent from sending tokens to address 0x0.
Add zero address checking
require( _to != address(0) );
The contracts use solidity version 0.4.19. 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 medium and low severity issues were found.