Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
KingDoge.addLiquidity(uint256,uint256) (#753-766) sends eth to arbitrary user
Dangerous calls:
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in KingDoge._transfer(address,address,uint256) (#662-700):
External calls:
- swapAndLiquify(contractTokenBalance) (#684)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#742-748)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#684)
- recipient.transfer(amount) (#626)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#687)
- _balances[recipient] = _balances[recipient].add(finalAmount) (#695)
- finalAmount = takeFee(sender,recipient,amount) (#689-690)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#780)
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.
Contract ticker (King Doge) contains non-alphanumeric characters.
Not a direct threat, but may indicate unreliable intentions of developer. Non-alphanumeric chars (,.;!#*&") are extremely rare among low risk tokens.
KingDoge.addLiquidity(uint256,uint256) (#753-766) ignores return value by uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
Ensure that all the return values of the function calls are used.
Additional information: link
KingDoge.allowance(address,address).owner (#517) shadows:
- Ownable.owner() (#151-153) (function)
KingDoge._approve(address,address,uint256).owner (#540) shadows:
- Ownable.owner() (#151-153) (function)
Rename the local variables that shadow another component.
Additional information: link
KingDoge.setBuyTaxes(uint256,uint256,uint256) (#560-566) should emit an event for:
- _totalTaxIfBuying = _buyLiquidityFee.add(_buyMarketingFee).add(_buyTeamFee) (#565)
KingDoge.setSellTaxes(uint256,uint256,uint256) (#568-574) should emit an event for:
- _totalTaxIfSelling = _sellLiquidityFee.add(_sellMarketingFee).add(_sellTeamFee) (#573)
KingDoge.setDistributionSettings(uint256,uint256,uint256) (#576-582) should emit an event for:
- _liquidityShare = newLiquidityShare (#577)
- _teamShare = newTeamShare (#579)
- _totalDistributionShares = _liquidityShare.add(_marketingShare).add(_teamShare) (#581)
KingDoge.setMaxTxAmount(uint256) (#584-586) should emit an event for:
- _maxTxAmount = maxTxAmount (#585)
KingDoge.setWalletLimit(uint256) (#596-598) should emit an event for:
- _walletMax = newLimit (#597)
KingDoge.setNumTokensBeforeSwap(uint256) (#600-602) should emit an event for:
- minimumTokensBeforeSwap = newLimit (#601)
Emit an event for critical parameter changes.
Additional information: link
KingDoge.setMarketingWalletAddress(address).newAddress (#604) lacks a zero-check on :
- marketingWalletAddress = address(newAddress) (#605)
KingDoge.setTeamWalletAddress(address).newAddress (#608) lacks a zero-check on :
- teamWalletAddress = address(newAddress) (#609)
Check that the address is not zero.
Additional information: link
Reentrancy in KingDoge.changeRouterVersion(address) (#629-646):
External calls:
- newPairAddress = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#637-638)
State variables written after the call(s):
- isMarketPair[address(uniswapPair)] = true (#645)
- isWalletLimitExempt[address(uniswapPair)] = true (#644)
- uniswapPair = newPairAddress (#641)
- uniswapV2Router = _uniswapV2Router (#642)
Reentrancy in KingDoge.constructor() (#467-495):
External calls:
- uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#471-472)
State variables written after the call(s):
- _allowances[address(this)][address(uniswapV2Router)] = _totalSupply (#475)
- _balances[_msgSender()] = _totalSupply (#493)
- _totalDistributionShares = _liquidityShare.add(_marketingShare).add(_teamShare) (#482)
- _totalTaxIfBuying = _buyLiquidityFee.add(_buyMarketingFee).add(_buyTeamFee) (#480)
- _totalTaxIfSelling = _sellLiquidityFee.add(_sellMarketingFee).add(_sellTeamFee) (#481)
- isExcludedFromFee[owner()] = true (#477)
- isExcludedFromFee[address(this)] = true (#478)
- isMarketPair[address(uniswapPair)] = true (#491)
- isTxLimitExempt[owner()] = true (#488)
- isTxLimitExempt[address(this)] = true (#489)
- isWalletLimitExempt[owner()] = true (#484)
- isWalletLimitExempt[address(uniswapPair)] = true (#485)
- isWalletLimitExempt[address(this)] = true (#486)
- uniswapV2Router = _uniswapV2Router (#474)
Reentrancy in KingDoge.swapAndLiquify(uint256) (#709-731):
External calls:
- swapTokensForEth(tokensForSwap) (#714)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#742-748)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#730)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#724)
- recipient.transfer(amount) (#626)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#727)
- recipient.transfer(amount) (#626)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#730)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
State variables written after the call(s):
- addLiquidity(tokensForLP,amountBNBLiquidity) (#730)
- _allowances[owner][spender] = amount (#544)
Reentrancy in KingDoge.transferFrom(address,address,uint256) (#656-660):
External calls:
- _transfer(sender,recipient,amount) (#657)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#742-748)
External calls sending eth:
- _transfer(sender,recipient,amount) (#657)
- recipient.transfer(amount) (#626)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
State variables written after the call(s):
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#658)
- _allowances[owner][spender] = amount (#544)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in KingDoge._transfer(address,address,uint256) (#662-700):
External calls:
- swapAndLiquify(contractTokenBalance) (#684)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#742-748)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#684)
- recipient.transfer(amount) (#626)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#781)
- finalAmount = takeFee(sender,recipient,amount) (#689-690)
- Transfer(sender,recipient,finalAmount) (#697)
Reentrancy in KingDoge.constructor() (#467-495):
External calls:
- uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#471-472)
Event emitted after the call(s):
- Transfer(address(0),_msgSender(),_totalSupply) (#494)
Reentrancy in KingDoge.swapAndLiquify(uint256) (#709-731):
External calls:
- swapTokensForEth(tokensForSwap) (#714)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#742-748)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#730)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#724)
- recipient.transfer(amount) (#626)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#727)
- recipient.transfer(amount) (#626)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#730)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#545)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#730)
Reentrancy in KingDoge.swapTokensForEth(uint256) (#733-751):
External calls:
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#742-748)
Event emitted after the call(s):
- SwapTokensForETH(tokenAmount,path) (#750)
Reentrancy in KingDoge.transferFrom(address,address,uint256) (#656-660):
External calls:
- _transfer(sender,recipient,amount) (#657)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#742-748)
External calls sending eth:
- _transfer(sender,recipient,amount) (#657)
- recipient.transfer(amount) (#626)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#545)
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#658)
Apply the check-effects-interactions pattern.
Additional information: link
Ownable.unlock() (#186-191) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(block.timestamp > _lockTime,Contract is locked until 7 days) (#188)
Avoid relying on block.timestamp.
Additional information: link
Address.isContract(address) (#82-91) uses assembly
- INLINE ASM (#89)
Address._functionCallWithValue(address,bytes,uint256,string) (#118-135) uses assembly
- INLINE ASM (#127-130)
Do not use evm assembly.
Additional information: link
Address._functionCallWithValue(address,bytes,uint256,string) (#118-135) is never used and should be removed
Address.functionCall(address,bytes) (#101-103) is never used and should be removed
Address.functionCall(address,bytes,string) (#105-107) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256) (#109-111) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256,string) (#113-116) is never used and should be removed
Address.isContract(address) (#82-91) is never used and should be removed
Address.sendValue(address,uint256) (#93-99) is never used and should be removed
Context._msgData() (#9-12) is never used and should be removed
SafeMath.mod(uint256,uint256) (#70-72) is never used and should be removed
SafeMath.mod(uint256,uint256,string) (#74-77) is never used and should be removed
Remove unused functions.
Additional information: link
KingDoge._totalSupply (#431) is set pre-construction with a non-constant function or state variable:
- 100 * 10 ** 2 * 10 ** 2 * 10 ** _decimals
KingDoge._maxTxAmount (#432) is set pre-construction with a non-constant function or state variable:
- 100 * 10 ** 2 * 10 ** 2 * 10 ** _decimals
KingDoge._walletMax (#433) is set pre-construction with a non-constant function or state variable:
- 100 * 10 ** 2 * 10 ** 2 * 10 ** _decimals
KingDoge.minimumTokensBeforeSwap (#434) is set pre-construction with a non-constant function or state variable:
- 10 * 10 ** 1 * 10 ** _decimals
Remove any initialization of state variables via non-constant state variables or function calls. If variables must be set upon contract deployment, locate initialization in the constructor instead.
Additional information: link
Low level call in Address.sendValue(address,uint256) (#93-99):
- (success) = recipient.call{value: amount}() (#97)
Low level call in Address._functionCallWithValue(address,bytes,uint256,string) (#118-135):
- (success,returndata) = target.call{value: weiValue}(data) (#121)
Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence
Additional information: link
Function IUniswapV2Pair.DOMAIN_SEPARATOR() (#225) is not in mixedCase
Function IUniswapV2Pair.PERMIT_TYPEHASH() (#226) is not in mixedCase
Function IUniswapV2Pair.MINIMUM_LIQUIDITY() (#242) is not in mixedCase
Function IUniswapV2Router01.WETH() (#261) is not in mixedCase
Parameter KingDoge.setSwapAndLiquifyEnabled(bool)._enabled (#612) is not in mixedCase
Variable KingDoge._balances (#407) is not in mixedCase
Variable KingDoge._buyLiquidityFee (#415) is not in mixedCase
Variable KingDoge._buyMarketingFee (#416) is not in mixedCase
Variable KingDoge._buyTeamFee (#417) is not in mixedCase
Variable KingDoge._sellLiquidityFee (#419) is not in mixedCase
Variable KingDoge._sellMarketingFee (#420) is not in mixedCase
Variable KingDoge._sellTeamFee (#421) is not in mixedCase
Variable KingDoge._liquidityShare (#423) is not in mixedCase
Variable KingDoge._marketingShare (#424) is not in mixedCase
Variable KingDoge._teamShare (#425) is not in mixedCase
Variable KingDoge._totalTaxIfBuying (#427) is not in mixedCase
Variable KingDoge._totalTaxIfSelling (#428) is not in mixedCase
Variable KingDoge._totalDistributionShares (#429) is not in mixedCase
Variable KingDoge._maxTxAmount (#432) is not in mixedCase
Variable KingDoge._walletMax (#433) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Redundant expression "this (#10)" inContext (#3-13)
Remove redundant statements if they congest code but offer no value.
Additional information: link
Reentrancy in KingDoge._transfer(address,address,uint256) (#662-700):
External calls:
- swapAndLiquify(contractTokenBalance) (#684)
- recipient.transfer(amount) (#626)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#684)
- recipient.transfer(amount) (#626)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#687)
- _balances[recipient] = _balances[recipient].add(finalAmount) (#695)
- finalAmount = takeFee(sender,recipient,amount) (#689-690)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#780)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#781)
- finalAmount = takeFee(sender,recipient,amount) (#689-690)
- Transfer(sender,recipient,finalAmount) (#697)
Reentrancy in KingDoge.swapAndLiquify(uint256) (#709-731):
External calls:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#724)
- recipient.transfer(amount) (#626)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#727)
- recipient.transfer(amount) (#626)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#724)
- recipient.transfer(amount) (#626)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#727)
- recipient.transfer(amount) (#626)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#730)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
State variables written after the call(s):
- addLiquidity(tokensForLP,amountBNBLiquidity) (#730)
- _allowances[owner][spender] = amount (#544)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#545)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#730)
Reentrancy in KingDoge.transferFrom(address,address,uint256) (#656-660):
External calls:
- _transfer(sender,recipient,amount) (#657)
- recipient.transfer(amount) (#626)
External calls sending eth:
- _transfer(sender,recipient,amount) (#657)
- recipient.transfer(amount) (#626)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#758-765)
State variables written after the call(s):
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#658)
- _allowances[owner][spender] = amount (#544)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#545)
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#658)
Apply the check-effects-interactions pattern.
Additional information: link
Variable IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#266) is too similar to IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#267)
Prevent variables from having similar names.
Additional information: link
KingDoge.slitherConstructorVariables() (#394-788) uses literals with too many digits:
- deadAddress = 0x000000000000000000000000000000000000dEaD (#405)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
KingDoge._decimals (#401) should be constant
KingDoge._name (#399) should be constant
KingDoge._symbol (#400) should be constant
Add the constant attributes to state variables that never change.
Additional information: link
waiveOwnership() should be declared external:
- Ownable.waiveOwnership() (#160-163)
transferOwnership(address) should be declared external:
- Ownable.transferOwnership(address) (#165-169)
getUnlockTime() should be declared external:
- Ownable.getUnlockTime() (#171-173)
getTime() should be declared external:
- Ownable.getTime() (#175-177)
lock(uint256) should be declared external:
- Ownable.lock(uint256) (#179-184)
unlock() should be declared external:
- Ownable.unlock() (#186-191)
name() should be declared external:
- KingDoge.name() (#497-499)
symbol() should be declared external:
- KingDoge.symbol() (#501-503)
decimals() should be declared external:
- KingDoge.decimals() (#505-507)
totalSupply() should be declared external:
- KingDoge.totalSupply() (#509-511)
allowance(address,address) should be declared external:
- KingDoge.allowance(address,address) (#517-519)
increaseAllowance(address,uint256) should be declared external:
- KingDoge.increaseAllowance(address,uint256) (#521-524)
decreaseAllowance(address,uint256) should be declared external:
- KingDoge.decreaseAllowance(address,uint256) (#526-529)
minimumTokensBeforeSwapAmount() should be declared external:
- KingDoge.minimumTokensBeforeSwapAmount() (#531-533)
approve(address,uint256) should be declared external:
- KingDoge.approve(address,uint256) (#535-538)
setMarketPairStatus(address,bool) should be declared external:
- KingDoge.setMarketPairStatus(address,bool) (#548-550)
setIsExcludedFromFee(address,bool) should be declared external:
- KingDoge.setIsExcludedFromFee(address,bool) (#556-558)
setSwapAndLiquifyEnabled(bool) should be declared external:
- KingDoge.setSwapAndLiquifyEnabled(bool) (#612-615)
setSwapAndLiquifyByLimitOnly(bool) should be declared external:
- KingDoge.setSwapAndLiquifyByLimitOnly(bool) (#617-619)
getCirculatingSupply() should be declared external:
- KingDoge.getCirculatingSupply() (#621-623)
changeRouterVersion(address) should be declared external:
- KingDoge.changeRouterVersion(address) (#629-646)
transfer(address,uint256) should be declared external:
- KingDoge.transfer(address,uint256) (#651-654)
transferFrom(address,address,uint256) should be declared external:
- KingDoge.transferFrom(address,address,uint256) (#656-660)
Use the external attribute for functions never called from the contract.
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 Telegram and Twitter accounts