Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
BrightKing.addLiquidity(uint256,uint256) (#733-746) sends eth to arbitrary user
Dangerous calls:
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in BrightKing._transfer(address,address,uint256) (#642-680):
External calls:
- swapAndLiquify(contractTokenBalance) (#664)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#722-728)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#664)
- recipient.transfer(amount) (#606)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#667)
- _balances[recipient] = _balances[recipient].add(finalAmount) (#675)
- finalAmount = takeFee(sender,recipient,amount) (#669-670)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#760)
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.
BrightKing.addLiquidity(uint256,uint256) (#733-746) ignores return value by uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
Ensure that all the return values of the function calls are used.
Additional information: link
BrightKing.allowance(address,address).owner (#500) shadows:
- Ownable.owner() (#157-159) (function)
BrightKing._approve(address,address,uint256).owner (#519) shadows:
- Ownable.owner() (#157-159) (function)
Rename the local variables that shadow another component.
Additional information: link
BrightKing.setBuyTaxes(uint256,uint256,uint256) (#539-545) should emit an event for:
- _totalTaxIfBuying = _buyLiquidityFee.add(_buyMarketingFee).add(_buyDevFee) (#544)
BrightKing.setSellTaxes(uint256,uint256,uint256) (#547-553) should emit an event for:
- _totalTaxIfSelling = _sellLiquidityFee.add(_sellMarketingFee).add(_sellDevFee) (#552)
BrightKing.setDistributionSettings(uint256,uint256,uint256) (#555-561) should emit an event for:
- _liquidityShare = newLiquidityShare (#556)
- _DevShare = newDevShare (#558)
- _totalDistributionShares = _liquidityShare.add(_marketingShare).add(_DevShare) (#560)
BrightKing.setMaxTxAmount(uint256) (#563-566) should emit an event for:
- _maxTxAmount = maxTxAmount (#565)
BrightKing.setWalletLimit(uint256) (#576-578) should emit an event for:
- _walletMax = newLimit (#577)
BrightKing.setNumTokensBeforeSwap(uint256) (#580-582) should emit an event for:
- minimumTokensBeforeSwap = newLimit (#581)
Emit an event for critical parameter changes.
Additional information: link
BrightKing.setMarketingWalletAddress(address).newAddress (#584) lacks a zero-check on :
- marketingWalletAddress = address(newAddress) (#585)
BrightKing.setDevWalletAddress(address).newAddress (#588) lacks a zero-check on :
- DevWalletAddress = address(newAddress) (#589)
Check that the address is not zero.
Additional information: link
Reentrancy in BrightKing.changeRouterVersion(address) (#609-626):
External calls:
- newPairAddress = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#617-618)
State variables written after the call(s):
- isMarketPair[address(uniswapPair)] = true (#625)
- isWalletLimitExempt[address(uniswapPair)] = true (#624)
- uniswapPair = newPairAddress (#621)
- uniswapV2Router = _uniswapV2Router (#622)
Reentrancy in BrightKing.constructor() (#450-478):
External calls:
- uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#454-455)
State variables written after the call(s):
- _allowances[address(this)][address(uniswapV2Router)] = _totalSupply (#458)
- _balances[_msgSender()] = _totalSupply (#476)
- _totalDistributionShares = _liquidityShare.add(_marketingShare).add(_DevShare) (#465)
- _totalTaxIfBuying = _buyLiquidityFee.add(_buyMarketingFee).add(_buyDevFee) (#463)
- _totalTaxIfSelling = _sellLiquidityFee.add(_sellMarketingFee).add(_sellDevFee) (#464)
- isExcludedFromFee[owner()] = true (#460)
- isExcludedFromFee[address(this)] = true (#461)
- isMarketPair[address(uniswapPair)] = true (#474)
- isTxLimitExempt[owner()] = true (#471)
- isTxLimitExempt[address(this)] = true (#472)
- isWalletLimitExempt[owner()] = true (#467)
- isWalletLimitExempt[address(uniswapPair)] = true (#468)
- isWalletLimitExempt[address(this)] = true (#469)
- uniswapV2Router = _uniswapV2Router (#457)
Reentrancy in BrightKing.swapAndLiquify(uint256) (#689-711):
External calls:
- swapTokensForEth(tokensForSwap) (#694)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#722-728)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#710)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#704)
- recipient.transfer(amount) (#606)
- transferToAddressETH(DevWalletAddress,amountBNBDev) (#707)
- recipient.transfer(amount) (#606)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#710)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
State variables written after the call(s):
- addLiquidity(tokensForLP,amountBNBLiquidity) (#710)
- _allowances[owner][spender] = amount (#523)
Reentrancy in BrightKing.transferFrom(address,address,uint256) (#636-640):
External calls:
- _transfer(sender,recipient,amount) (#637)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#722-728)
External calls sending eth:
- _transfer(sender,recipient,amount) (#637)
- recipient.transfer(amount) (#606)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
State variables written after the call(s):
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#638)
- _allowances[owner][spender] = amount (#523)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in BrightKing._transfer(address,address,uint256) (#642-680):
External calls:
- swapAndLiquify(contractTokenBalance) (#664)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#722-728)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#664)
- recipient.transfer(amount) (#606)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#761)
- finalAmount = takeFee(sender,recipient,amount) (#669-670)
- Transfer(sender,recipient,finalAmount) (#677)
Reentrancy in BrightKing.constructor() (#450-478):
External calls:
- uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#454-455)
Event emitted after the call(s):
- Transfer(address(0),_msgSender(),_totalSupply) (#477)
Reentrancy in BrightKing.swapAndLiquify(uint256) (#689-711):
External calls:
- swapTokensForEth(tokensForSwap) (#694)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#722-728)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#710)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#704)
- recipient.transfer(amount) (#606)
- transferToAddressETH(DevWalletAddress,amountBNBDev) (#707)
- recipient.transfer(amount) (#606)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#710)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#524)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#710)
Reentrancy in BrightKing.swapTokensForEth(uint256) (#713-731):
External calls:
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#722-728)
Event emitted after the call(s):
- SwapTokensForETH(tokenAmount,path) (#730)
Reentrancy in BrightKing.transferFrom(address,address,uint256) (#636-640):
External calls:
- _transfer(sender,recipient,amount) (#637)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#722-728)
External calls sending eth:
- _transfer(sender,recipient,amount) (#637)
- recipient.transfer(amount) (#606)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#524)
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#638)
Apply the check-effects-interactions pattern.
Additional information: link
Address.isContract(address) (#89-98) uses assembly
- INLINE ASM (#96)
Address._functionCallWithValue(address,bytes,uint256,string) (#125-142) uses assembly
- INLINE ASM (#134-137)
Do not use evm assembly.
Additional information: link
Address._functionCallWithValue(address,bytes,uint256,string) (#125-142) is never used and should be removed
Address.functionCall(address,bytes) (#108-110) is never used and should be removed
Address.functionCall(address,bytes,string) (#112-114) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256) (#116-118) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256,string) (#120-123) is never used and should be removed
Address.isContract(address) (#89-98) is never used and should be removed
Address.sendValue(address,uint256) (#100-106) is never used and should be removed
Context._msgData() (#16-19) is never used and should be removed
SafeMath.mod(uint256,uint256) (#77-79) is never used and should be removed
SafeMath.mod(uint256,uint256,string) (#81-84) is never used and should be removed
Remove unused functions.
Additional information: link
Pragma version^0.8.11 (#7) necessitates a version too recent to be trusted. Consider deploying with 0.6.12/0.7.6/0.8.7
solc-0.8.11 is not recommended for deployment
Deploy with any of the following Solidity versions: 0.5.16 - 0.5.17, 0.6.11 - 0.6.12, 0.7.5 - 0.7.6 Use a simple pragma version that allows any of these versions. Consider using the latest version of Solidity for testing.
Additional information: link
Low level call in Address.sendValue(address,uint256) (#100-106):
- (success) = recipient.call{value: amount}() (#104)
Low level call in Address._functionCallWithValue(address,bytes,uint256,string) (#125-142):
- (success,returndata) = target.call{value: weiValue}(data) (#128)
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() (#209) is not in mixedCase
Function IUniswapV2Pair.PERMIT_TYPEHASH() (#210) is not in mixedCase
Function IUniswapV2Pair.MINIMUM_LIQUIDITY() (#226) is not in mixedCase
Function IUniswapV2Router01.WETH() (#245) is not in mixedCase
Parameter BrightKing.setSwapAndLiquifyEnabled(bool)._enabled (#592) is not in mixedCase
Variable BrightKing.DevWalletAddress (#388) is not in mixedCase
Variable BrightKing._balances (#391) is not in mixedCase
Variable BrightKing._buyLiquidityFee (#399) is not in mixedCase
Variable BrightKing._buyMarketingFee (#400) is not in mixedCase
Variable BrightKing._buyDevFee (#401) is not in mixedCase
Variable BrightKing._sellLiquidityFee (#402) is not in mixedCase
Variable BrightKing._sellMarketingFee (#403) is not in mixedCase
Variable BrightKing._sellDevFee (#404) is not in mixedCase
Variable BrightKing._liquidityShare (#406) is not in mixedCase
Variable BrightKing._marketingShare (#407) is not in mixedCase
Variable BrightKing._DevShare (#408) is not in mixedCase
Variable BrightKing._totalTaxIfBuying (#410) is not in mixedCase
Variable BrightKing._totalTaxIfSelling (#411) is not in mixedCase
Variable BrightKing._totalDistributionShares (#412) is not in mixedCase
Variable BrightKing._maxTxAmount (#415) is not in mixedCase
Variable BrightKing._walletMax (#416) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Redundant expression "this (#17)" inContext (#10-20)
Remove redundant statements if they congest code but offer no value.
Additional information: link
Reentrancy in BrightKing._transfer(address,address,uint256) (#642-680):
External calls:
- swapAndLiquify(contractTokenBalance) (#664)
- recipient.transfer(amount) (#606)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#664)
- recipient.transfer(amount) (#606)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#667)
- _balances[recipient] = _balances[recipient].add(finalAmount) (#675)
- finalAmount = takeFee(sender,recipient,amount) (#669-670)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#760)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#761)
- finalAmount = takeFee(sender,recipient,amount) (#669-670)
- Transfer(sender,recipient,finalAmount) (#677)
Reentrancy in BrightKing.swapAndLiquify(uint256) (#689-711):
External calls:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#704)
- recipient.transfer(amount) (#606)
- transferToAddressETH(DevWalletAddress,amountBNBDev) (#707)
- recipient.transfer(amount) (#606)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#704)
- recipient.transfer(amount) (#606)
- transferToAddressETH(DevWalletAddress,amountBNBDev) (#707)
- recipient.transfer(amount) (#606)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#710)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
State variables written after the call(s):
- addLiquidity(tokensForLP,amountBNBLiquidity) (#710)
- _allowances[owner][spender] = amount (#523)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#524)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#710)
Reentrancy in BrightKing.transferFrom(address,address,uint256) (#636-640):
External calls:
- _transfer(sender,recipient,amount) (#637)
- recipient.transfer(amount) (#606)
External calls sending eth:
- _transfer(sender,recipient,amount) (#637)
- recipient.transfer(amount) (#606)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#738-745)
State variables written after the call(s):
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#638)
- _allowances[owner][spender] = amount (#523)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#524)
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#638)
Apply the check-effects-interactions pattern.
Additional information: link
Variable IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#250) is too similar to IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#251)
Prevent variables from having similar names.
Additional information: link
BrightKing.setMaxTxAmount(uint256) (#563-566) uses literals with too many digits:
- require(bool,string)(maxTxAmount <= (100000 * 10 ** 9),Max wallet should be less or euqal to 100% totalSupply) (#564)
BrightKing.slitherConstructorVariables() (#378-768) uses literals with too many digits:
- deadAddress = 0x000000000000000000000000000000000000dEaD (#389)
BrightKing.slitherConstructorVariables() (#378-768) uses literals with too many digits:
- _totalSupply = 100000 * 10 ** 9 (#414)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
Ownable._previousOwner (#147) is never used in BrightKing (#378-768)
Remove unused state variables.
Additional information: link
BrightKing._decimals (#385) should be constant
BrightKing._name (#383) should be constant
BrightKing._symbol (#384) should be constant
BrightKing._totalSupply (#414) should be constant
Ownable._previousOwner (#147) should be constant
Add the constant attributes to state variables that never change.
Additional information: link
waiveOwnership() should be declared external:
- Ownable.waiveOwnership() (#166-169)
transferOwnership(address) should be declared external:
- Ownable.transferOwnership(address) (#171-175)
name() should be declared external:
- BrightKing.name() (#480-482)
symbol() should be declared external:
- BrightKing.symbol() (#484-486)
decimals() should be declared external:
- BrightKing.decimals() (#488-490)
totalSupply() should be declared external:
- BrightKing.totalSupply() (#492-494)
allowance(address,address) should be declared external:
- BrightKing.allowance(address,address) (#500-502)
increaseAllowance(address,uint256) should be declared external:
- BrightKing.increaseAllowance(address,uint256) (#504-507)
decreaseAllowance(address,uint256) should be declared external:
- BrightKing.decreaseAllowance(address,uint256) (#509-512)
approve(address,uint256) should be declared external:
- BrightKing.approve(address,uint256) (#514-517)
addMarketPair(address) should be declared external:
- BrightKing.addMarketPair(address) (#527-529)
setIsExcludedFromFee(address,bool) should be declared external:
- BrightKing.setIsExcludedFromFee(address,bool) (#535-537)
setSwapAndLiquifyEnabled(bool) should be declared external:
- BrightKing.setSwapAndLiquifyEnabled(bool) (#592-595)
setSwapAndLiquifyByLimitOnly(bool) should be declared external:
- BrightKing.setSwapAndLiquifyByLimitOnly(bool) (#597-599)
getCirculatingSupply() should be declared external:
- BrightKing.getCirculatingSupply() (#601-603)
changeRouterVersion(address) should be declared external:
- BrightKing.changeRouterVersion(address) (#609-626)
transfer(address,uint256) should be declared external:
- BrightKing.transfer(address,uint256) (#631-634)
transferFrom(address,address,uint256) should be declared external:
- BrightKing.transferFrom(address,address,uint256) (#636-640)
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