This is the report from a security audit performed on Pundi X (NPXS) Token by gorbunovperm.
Audit Top 200 CoinMarketCap tokens.
In total, 6 issues were reported including:
-
0 critical severity issue.
-
0 high severity issue.
-
3 medium severity issues.
-
2 low severity issues.
-
1 owner privileges.
-
0 minor observations.
-
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) );
-
The owner receives funds immediately after the purchase of tokens. It should be available after the end of crowdsale. Otherwise, the owner has the opportunity to buy tokens for the same money. (line 149)
-
RefundVault
andWithdrawVault
contracts is managed manually by the owner and are not integrated with theCrowdsale
contract which is not good for investors. (lines 200 and 446) -
The contract owner allowed to pause transfer functions (
transfer
,transferFrom
). (lines 541-545) -
The owner can finish minting whenever he wants. Related with issue #4. (line 401)
According to ERC20 standard when burning coins a transfer event should be emitted. In this case the Burn
event is emitted, it is better to additionally use emit Transfer(msg.sender, address(0), value);
Crowdsale
contract creates a token contract which used for Crawdsale. But this created token contract is not NPXSToken
but just MintableToken
.
stopReceive
mechanism is used for transfer
function but not implemented for transferFrom
function. It is possibler to approve
funds to yourself and send through transferForm
without any restrictions.
-
Judging by the call of the
tokenFallback
function, this token should support the ERC223 standard. But in this case it should be called in thetransfer
function also. And should to check whether the recipient is a contract. And functiontransfer(address, uint, bytes)
should be implemented. Please, read this -
Judding by
transferAndCall
function this token should support the ERC677 standard. But in this case it should callcontractFallback
nottokenFallback
function. And should to check whether the recipient is a contract. Please, read this -
transferAndCall
function not usewhenNotPaused
modifier and tokens may be transfered even if contract is paused.
There are some vulnerabilities were discovered in these contracts.