Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
TokenTool.addLiquidity(uint256,uint256) (#799-812) sends eth to arbitrary user
Dangerous calls:
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in TokenTool._transfer(address,address,uint256) (#708-746):
External calls:
- swapAndLiquify(contractTokenBalance) (#730)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#788-794)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#730)
- recipient.transfer(amount) (#672)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#733)
- _balances[recipient] = _balances[recipient].add(finalAmount) (#741)
- finalAmount = takeFee(sender,recipient,amount) (#735-736)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#826)
Apply the check-effects-interactions pattern.
Additional information: link
Combination 1: Reentrancy vulnerabilities + Functions that send Ether to arbitraty destination. Usual for scams. May be justified by some complex mechanics (e.g. rebase, reflections). DYOR & manual audit are advised.
Not a direct threat, but may indicate unreliable intentions of developer. Widespread names (e.g. Elon, King, Moon, Doge) are common among meme-tokens and scams. The allow to gain free hype and attract unexperienced investors.
waiveOwnership() should be declared external:
- Ownable.waiveOwnership() (#161-164)
transferOwnership(address) should be declared external:
- Ownable.transferOwnership(address) (#166-170)
getTime() should be declared external:
- Ownable.getTime() (#172-174)
name() should be declared external:
- TokenTool.name() (#543-545)
symbol() should be declared external:
- TokenTool.symbol() (#547-549)
decimals() should be declared external:
- TokenTool.decimals() (#551-553)
totalSupply() should be declared external:
- TokenTool.totalSupply() (#555-557)
allowance(address,address) should be declared external:
- TokenTool.allowance(address,address) (#563-565)
increaseAllowance(address,uint256) should be declared external:
- TokenTool.increaseAllowance(address,uint256) (#567-570)
decreaseAllowance(address,uint256) should be declared external:
- TokenTool.decreaseAllowance(address,uint256) (#572-575)
minimumTokensBeforeSwapAmount() should be declared external:
- TokenTool.minimumTokensBeforeSwapAmount() (#577-579)
approve(address,uint256) should be declared external:
- TokenTool.approve(address,uint256) (#581-584)
setMarketPairStatus(address,bool) should be declared external:
- TokenTool.setMarketPairStatus(address,bool) (#594-596)
setIsExcludedFromFee(address,bool) should be declared external:
- TokenTool.setIsExcludedFromFee(address,bool) (#602-604)
setSwapAndLiquifyEnabled(bool) should be declared external:
- TokenTool.setSwapAndLiquifyEnabled(bool) (#658-661)
setSwapAndLiquifyByLimitOnly(bool) should be declared external:
- TokenTool.setSwapAndLiquifyByLimitOnly(bool) (#663-665)
getCirculatingSupply() should be declared external:
- TokenTool.getCirculatingSupply() (#667-669)
changeRouterVersion(address) should be declared external:
- TokenTool.changeRouterVersion(address) (#675-692)
transfer(address,uint256) should be declared external:
- TokenTool.transfer(address,uint256) (#697-700)
transferFrom(address,address,uint256) should be declared external:
- TokenTool.transferFrom(address,address,uint256) (#702-706)
Use the external attribute for functions never called from the contract.
Additional information: link
TokenTool.addLiquidity(uint256,uint256) (#799-812) ignores return value by uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
Ensure that all the return values of the function calls are used.
Additional information: link
TokenTool.constructor(string,string,uint8,uint256,address,address,address,address,address).owner (#500) shadows:
- Ownable.owner() (#152-154) (function)
TokenTool.allowance(address,address).owner (#563) shadows:
- Ownable.owner() (#152-154) (function)
TokenTool._approve(address,address,uint256).owner (#586) shadows:
- Ownable.owner() (#152-154) (function)
Rename the local variables that shadow another component.
Additional information: link
TokenTool.setBuyTaxes(uint256,uint256,uint256) (#606-612) should emit an event for:
- _totalTaxIfBuying = _buyLiquidityFee.add(_buyMarketingFee).add(_buyTeamFee) (#611)
TokenTool.setSelTaxes(uint256,uint256,uint256) (#614-620) should emit an event for:
- _totalTaxIfSelling = _sellLiquidityFee.add(_sellMarketingFee).add(_sellTeamFee) (#619)
TokenTool.setDistributionSettings(uint256,uint256,uint256) (#622-628) should emit an event for:
- _liquidityShare = newLiquidityShare (#623)
- _teamShare = newTeamShare (#625)
- _totalDistributionShares = _liquidityShare.add(_marketingShare).add(_teamShare) (#627)
TokenTool.setMaxTxAmount(uint256) (#630-632) should emit an event for:
- _maxTxAmount = maxTxAmount (#631)
TokenTool.setWalletLimit(uint256) (#642-644) should emit an event for:
- _walletMax = newLimit (#643)
TokenTool.setNumTokensBeforeSwap(uint256) (#646-648) should emit an event for:
- _minimumTokensBeforeSwap = newLimit (#647)
Emit an event for critical parameter changes.
Additional information: link
TokenTool.constructor(string,string,uint8,uint256,address,address,address,address,address).owner (#500) lacks a zero-check on :
- _owner = owner (#514)
TokenTool.constructor(string,string,uint8,uint256,address,address,address,address,address).marketingAddress (#501) lacks a zero-check on :
- marketingWalletAddress = address(marketingAddress) (#519)
TokenTool.constructor(string,string,uint8,uint256,address,address,address,address,address).teamAddress (#502) lacks a zero-check on :
- teamWalletAddress = address(teamAddress) (#520)
TokenTool.constructor(string,string,uint8,uint256,address,address,address,address,address).service (#503) lacks a zero-check on :
- address(service).transfer(msg.value) (#539)
TokenTool.setMarketingWalletAddress(address).newAddress (#650) lacks a zero-check on :
- marketingWalletAddress = address(newAddress) (#651)
TokenTool.setTeamWalletAddress(address).newAddress (#654) lacks a zero-check on :
- teamWalletAddress = address(newAddress) (#655)
Check that the address is not zero.
Additional information: link
Reentrancy in TokenTool.changeRouterVersion(address) (#675-692):
External calls:
- newPairAddress = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#683-684)
State variables written after the call(s):
- isMarketPair[address(uniswapPair)] = true (#691)
- isWalletLimitExempt[address(uniswapPair)] = true (#690)
- uniswapPair = newPairAddress (#687)
- uniswapV2Router = _uniswapV2Router (#688)
Reentrancy in TokenTool.constructor(string,string,uint8,uint256,address,address,address,address,address) (#494-541):
External calls:
- uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#508-509)
State variables written after the call(s):
- _allowances[address(this)][address(uniswapV2Router)] = _totalSupply (#525)
- _balances[owner] = _totalSupply (#538)
- _decimals = coinDecimals (#513)
- _maxTxAmount = supply * 10 ** _decimals (#516)
- _minimumTokensBeforeSwap = 1 * 10 ** _decimals (#518)
- _name = coinName (#511)
- _owner = owner (#514)
- _symbol = coinSymbol (#512)
- _totalDistributionShares = _liquidityShare.add(_marketingShare).add(_teamShare) (#523)
- _totalSupply = supply * 10 ** _decimals (#515)
- _totalTaxIfBuying = _buyLiquidityFee.add(_buyMarketingFee).add(_buyTeamFee) (#521)
- _totalTaxIfSelling = _sellLiquidityFee.add(_sellMarketingFee).add(_sellTeamFee) (#522)
- _walletMax = supply * 10 ** _decimals (#517)
- isExcludedFromFee[owner] = true (#526)
- isExcludedFromFee[address(this)] = true (#527)
- isMarketPair[address(uniswapPair)] = true (#536)
- isTxLimitExempt[owner] = true (#533)
- isTxLimitExempt[address(this)] = true (#534)
- isWalletLimitExempt[owner] = true (#529)
- isWalletLimitExempt[address(uniswapPair)] = true (#530)
- isWalletLimitExempt[address(this)] = true (#531)
- marketingWalletAddress = address(marketingAddress) (#519)
- teamWalletAddress = address(teamAddress) (#520)
- uniswapV2Router = _uniswapV2Router (#524)
Reentrancy in TokenTool.swapAndLiquify(uint256) (#755-777):
External calls:
- swapTokensForEth(tokensForSwap) (#760)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#788-794)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#776)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#770)
- recipient.transfer(amount) (#672)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#773)
- recipient.transfer(amount) (#672)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#776)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
State variables written after the call(s):
- addLiquidity(tokensForLP,amountBNBLiquidity) (#776)
- _allowances[owner][spender] = amount (#590)
Reentrancy in TokenTool.transferFrom(address,address,uint256) (#702-706):
External calls:
- _transfer(sender,recipient,amount) (#703)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#788-794)
External calls sending eth:
- _transfer(sender,recipient,amount) (#703)
- recipient.transfer(amount) (#672)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
State variables written after the call(s):
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#704)
- _allowances[owner][spender] = amount (#590)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in TokenTool._transfer(address,address,uint256) (#708-746):
External calls:
- swapAndLiquify(contractTokenBalance) (#730)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#788-794)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#730)
- recipient.transfer(amount) (#672)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#827)
- finalAmount = takeFee(sender,recipient,amount) (#735-736)
- Transfer(sender,recipient,finalAmount) (#743)
Reentrancy in TokenTool.constructor(string,string,uint8,uint256,address,address,address,address,address) (#494-541):
External calls:
- uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#508-509)
External calls sending eth:
- address(service).transfer(msg.value) (#539)
Event emitted after the call(s):
- Transfer(address(0),owner,_totalSupply) (#540)
Reentrancy in TokenTool.swapAndLiquify(uint256) (#755-777):
External calls:
- swapTokensForEth(tokensForSwap) (#760)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#788-794)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#776)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#770)
- recipient.transfer(amount) (#672)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#773)
- recipient.transfer(amount) (#672)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#776)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#591)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#776)
Reentrancy in TokenTool.swapTokensForEth(uint256) (#779-797):
External calls:
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#788-794)
Event emitted after the call(s):
- SwapTokensForETH(tokenAmount,path) (#796)
Reentrancy in TokenTool.transferFrom(address,address,uint256) (#702-706):
External calls:
- _transfer(sender,recipient,amount) (#703)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#788-794)
External calls sending eth:
- _transfer(sender,recipient,amount) (#703)
- recipient.transfer(amount) (#672)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#591)
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#704)
Apply the check-effects-interactions pattern.
Additional information: link
Address.isContract(address) (#90-99) uses assembly
- INLINE ASM (#97)
Address._functionCallWithValue(address,bytes,uint256,string) (#126-143) uses assembly
- INLINE ASM (#135-138)
Do not use evm assembly.
Additional information: link
Address._functionCallWithValue(address,bytes,uint256,string) (#126-143) is never used and should be removed
Address.functionCall(address,bytes) (#109-111) is never used and should be removed
Address.functionCall(address,bytes,string) (#113-115) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256) (#117-119) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256,string) (#121-124) is never used and should be removed
Address.isContract(address) (#90-99) is never used and should be removed
Address.sendValue(address,uint256) (#101-107) is never used and should be removed
Context._msgData() (#10-14) is never used and should be removed
SafeMath.mod(uint256,uint256) (#78-80) is never used and should be removed
SafeMath.mod(uint256,uint256,string) (#82-85) is never used and should be removed
Remove unused functions.
Additional information: link
Low level call in Address.sendValue(address,uint256) (#101-107):
- (success) = recipient.call{value: amount}() (#105)
Low level call in Address._functionCallWithValue(address,bytes,uint256,string) (#126-143):
- (success,returndata) = target.call{value: weiValue}(data) (#129)
Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence
Additional information: link
Variable Ownable._owner (#147) is not in mixedCase
Function IUniswapV2Pair.DOMAIN_SEPARATOR() (#219) is not in mixedCase
Function IUniswapV2Pair.PERMIT_TYPEHASH() (#221) is not in mixedCase
Function IUniswapV2Pair.MINIMUM_LIQUIDITY() (#238) is not in mixedCase
Function IUniswapV2Router01.WETH() (#268) is not in mixedCase
Parameter TokenTool.setSwapAndLiquifyEnabled(bool)._enabled (#658) is not in mixedCase
Variable TokenTool._balances (#431) is not in mixedCase
Variable TokenTool._buyLiquidityFee (#439) is not in mixedCase
Variable TokenTool._buyMarketingFee (#440) is not in mixedCase
Variable TokenTool._buyTeamFee (#441) is not in mixedCase
Variable TokenTool._sellLiquidityFee (#443) is not in mixedCase
Variable TokenTool._sellMarketingFee (#444) is not in mixedCase
Variable TokenTool._sellTeamFee (#445) is not in mixedCase
Variable TokenTool._liquidityShare (#447) is not in mixedCase
Variable TokenTool._marketingShare (#448) is not in mixedCase
Variable TokenTool._teamShare (#449) is not in mixedCase
Variable TokenTool._totalDistributionShares (#450) is not in mixedCase
Variable TokenTool._totalTaxIfBuying (#452) is not in mixedCase
Variable TokenTool._totalTaxIfSelling (#453) is not in mixedCase
Variable TokenTool._maxTxAmount (#457) is not in mixedCase
Variable TokenTool._walletMax (#458) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Redundant expression "this (#11)" inContext (#4-15)
Remove redundant statements if they congest code but offer no value.
Additional information: link
Reentrancy in TokenTool._transfer(address,address,uint256) (#708-746):
External calls:
- swapAndLiquify(contractTokenBalance) (#730)
- recipient.transfer(amount) (#672)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#730)
- recipient.transfer(amount) (#672)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#733)
- _balances[recipient] = _balances[recipient].add(finalAmount) (#741)
- finalAmount = takeFee(sender,recipient,amount) (#735-736)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#826)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#827)
- finalAmount = takeFee(sender,recipient,amount) (#735-736)
- Transfer(sender,recipient,finalAmount) (#743)
Reentrancy in TokenTool.constructor(string,string,uint8,uint256,address,address,address,address,address) (#494-541):
External calls:
- address(service).transfer(msg.value) (#539)
Event emitted after the call(s):
- Transfer(address(0),owner,_totalSupply) (#540)
Reentrancy in TokenTool.swapAndLiquify(uint256) (#755-777):
External calls:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#770)
- recipient.transfer(amount) (#672)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#773)
- recipient.transfer(amount) (#672)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#770)
- recipient.transfer(amount) (#672)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#773)
- recipient.transfer(amount) (#672)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#776)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
State variables written after the call(s):
- addLiquidity(tokensForLP,amountBNBLiquidity) (#776)
- _allowances[owner][spender] = amount (#590)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#591)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#776)
Reentrancy in TokenTool.transferFrom(address,address,uint256) (#702-706):
External calls:
- _transfer(sender,recipient,amount) (#703)
- recipient.transfer(amount) (#672)
External calls sending eth:
- _transfer(sender,recipient,amount) (#703)
- recipient.transfer(amount) (#672)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#804-811)
State variables written after the call(s):
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#704)
- _allowances[owner][spender] = amount (#590)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#591)
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#704)
Apply the check-effects-interactions pattern.
Additional information: link
Variable IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#273) is too similar to IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#274)
Prevent variables from having similar names.
Additional information: link
TokenTool.slitherConstructorVariables() (#419-834) uses literals with too many digits:
- deadAddress = 0x000000000000000000000000000000000000dEaD (#429)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
Unable to find website, listings and other project-related information
Young tokens have high risks of scam / price dump / death
Token has no active CoinGecko listing / rank
Token has no active CoinMarketCap listing / rank
Unable to find Twitter account
Telegram account has relatively few subscribers
Unable to find Blog account (Reddit or Medium)
Unable to find Youtube account
Unable to find Discord account