Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
BuffedDogeKing.swapBack() (#325-354) sends eth to arbitrary user
Dangerous calls:
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#349)
- (BuyBackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#351)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in BuffedDogeKing._transferFrom(address,address,uint256) (#270-290):
External calls:
- swapBack() (#279)
- router.addLiquidityETH{value: BNBAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#358-365)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#336-342)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#349)
- (BuyBackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#351)
External calls sending eth:
- swapBack() (#279)
- router.addLiquidityETH{value: BNBAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#358-365)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#349)
- (BuyBackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#351)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#283)
- _balances[recipient] = _balances[recipient].add(amountReceived) (#286)
- amountReceived = takeFee(sender,amount) (#285)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#312)
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.
Auth.transferOwnership(address).adr (#124) lacks a zero-check on :
- owner = adr (#125)
BuffedDogeKing.setFeeReceiver(address,address)._marketingFeeReceiver (#417) lacks a zero-check on :
- marketingFeeReceiver = _marketingFeeReceiver (#418)
BuffedDogeKing.setFeeReceiver(address,address)._buybackFeeReceiver (#417) lacks a zero-check on :
- buybackFeeReceiver = _buybackFeeReceiver (#419)
Check that the address is not zero.
Additional information: link
BuffedDogeKing.slitherConstructorVariables() (#185-452) performs a multiplication on the result of a division:
-swapThreshold = _totalSupply / 1000 * 3 (#221)
Consider ordering multiplication before division.
Additional information: link
BuffedDogeKing.addLiquidity(uint256,uint256) (#356-368) ignores return value by router.addLiquidityETH{value: BNBAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#358-365)
Ensure that all the return values of the function calls are used.
Additional information: link
BuffedDogeKing.setTxLimit(uint256) (#391-394) should emit an event for:
- _maxTxAmount = amount (#393)
BuffedDogeKing.setFees(uint256,uint256,uint256,uint256) (#409-415) should emit an event for:
- liquidityFee = _liquidityFee (#410)
- buybackFee = _buybackFee (#411)
- totalFee = _liquidityFee.add(_buybackFee).add(_marketingFee) (#413)
- feeDenominator = _feeDenominator (#414)
Emit an event for critical parameter changes.
Additional information: link
Reentrancy in BuffedDogeKing._transferFrom(address,address,uint256) (#270-290):
External calls:
- swapBack() (#279)
- router.addLiquidityETH{value: BNBAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#358-365)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#336-342)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#349)
- (BuyBackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#351)
External calls sending eth:
- swapBack() (#279)
- router.addLiquidityETH{value: BNBAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#358-365)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#349)
- (BuyBackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#351)
State variables written after the call(s):
- launch() (#281)
- launchedAt = block.number (#388)
Reentrancy in BuffedDogeKing.constructor() (#225-236):
External calls:
- pair = IDEXFactory(router.factory()).createPair(WBNB,address(this)) (#227)
State variables written after the call(s):
- _allowances[address(this)][address(router)] = type()(uint256).max (#228)
- _balances[_owner] = _totalSupply (#234)
- isFeeExempt[_owner] = true (#231)
- isTxLimitExempt[_owner] = true (#232)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in BuffedDogeKing._transferFrom(address,address,uint256) (#270-290):
External calls:
- swapBack() (#279)
- router.addLiquidityETH{value: BNBAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#358-365)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#336-342)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#349)
- (BuyBackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#351)
External calls sending eth:
- swapBack() (#279)
- router.addLiquidityETH{value: BNBAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#358-365)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#349)
- (BuyBackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#351)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#313)
- amountReceived = takeFee(sender,amount) (#285)
- Transfer(sender,recipient,amountReceived) (#288)
Reentrancy in BuffedDogeKing.addLiquidity(uint256,uint256) (#356-368):
External calls:
- router.addLiquidityETH{value: BNBAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#358-365)
Event emitted after the call(s):
- AutoLiquify(BNBAmount,tokenAmount) (#366)
Reentrancy in BuffedDogeKing.constructor() (#225-236):
External calls:
- pair = IDEXFactory(router.factory()).createPair(WBNB,address(this)) (#227)
Event emitted after the call(s):
- Transfer(address(0),_owner,_totalSupply) (#235)
Reentrancy in BuffedDogeKing.swapBack() (#325-354):
External calls:
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#336-342)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#349)
- (BuyBackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#351)
- addLiquidity(amountToLiquify,amountBNBLiquidity) (#353)
- router.addLiquidityETH{value: BNBAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#358-365)
External calls sending eth:
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#349)
- (BuyBackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#351)
- addLiquidity(amountToLiquify,amountBNBLiquidity) (#353)
- router.addLiquidityETH{value: BNBAmount}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#358-365)
Event emitted after the call(s):
- AutoLiquify(BNBAmount,tokenAmount) (#366)
- addLiquidity(amountToLiquify,amountBNBLiquidity) (#353)
Apply the check-effects-interactions pattern.
Additional information: link
BuffedDogeKing.buyTokens(uint256,address) (#370-381) is never used and should be removed
Remove unused functions.
Additional information: link
BuffedDogeKing._maxTxAmount (#197) is set pre-construction with a non-constant function or state variable:
- (_totalSupply * 2) / 100
BuffedDogeKing._maxWalletSize (#198) is set pre-construction with a non-constant function or state variable:
- (_totalSupply * 3) / 100
BuffedDogeKing.swapThreshold (#221) is set pre-construction with a non-constant function or state variable:
- _totalSupply / 1000 * 3
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 BuffedDogeKing.swapBack() (#325-354):
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#349)
- (BuyBackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#351)
Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence
Additional information: link
Function IDEXRouter.WETH() (#139) is not in mixedCase
Parameter BuffedDogeKing.addLiquidity(uint256,uint256).BNBAmount (#356) is not in mixedCase
Parameter BuffedDogeKing.setFees(uint256,uint256,uint256,uint256)._liquidityFee (#409) is not in mixedCase
Parameter BuffedDogeKing.setFees(uint256,uint256,uint256,uint256)._buybackFee (#409) is not in mixedCase
Parameter BuffedDogeKing.setFees(uint256,uint256,uint256,uint256)._marketingFee (#409) is not in mixedCase
Parameter BuffedDogeKing.setFees(uint256,uint256,uint256,uint256)._feeDenominator (#409) is not in mixedCase
Parameter BuffedDogeKing.setFeeReceiver(address,address)._marketingFeeReceiver (#417) is not in mixedCase
Parameter BuffedDogeKing.setFeeReceiver(address,address)._buybackFeeReceiver (#417) is not in mixedCase
Parameter BuffedDogeKing.setSwapBackSettings(bool,uint256)._enabled (#422) is not in mixedCase
Parameter BuffedDogeKing.setSwapBackSettings(bool,uint256)._amount (#422) is not in mixedCase
Parameter BuffedDogeKing.transferForeignToken(address)._token (#432) is not in mixedCase
Variable BuffedDogeKing.WBNB (#188) is not in mixedCase
Variable BuffedDogeKing.DEAD (#189) is not in mixedCase
Variable BuffedDogeKing.ZERO (#190) is not in mixedCase
Constant BuffedDogeKing._name (#192) is not in UPPER_CASE_WITH_UNDERSCORES
Constant BuffedDogeKing._symbol (#193) is not in UPPER_CASE_WITH_UNDERSCORES
Constant BuffedDogeKing._decimals (#194) is not in UPPER_CASE_WITH_UNDERSCORES
Variable BuffedDogeKing._totalSupply (#196) is not in mixedCase
Variable BuffedDogeKing._maxTxAmount (#197) is not in mixedCase
Variable BuffedDogeKing._maxWalletSize (#198) is not in mixedCase
Variable BuffedDogeKing._balances (#200) is not in mixedCase
Variable BuffedDogeKing._allowances (#201) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Variable IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#144) is too similar to IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#145)
Prevent variables from having similar names.
Additional information: link
BuffedDogeKing.slitherConstructorVariables() (#185-452) uses literals with too many digits:
- DEAD = 0x000000000000000000000000000000000000dEaD (#189)
BuffedDogeKing.slitherConstructorVariables() (#185-452) uses literals with too many digits:
- ZERO = 0x0000000000000000000000000000000000000000 (#190)
BuffedDogeKing.slitherConstructorVariables() (#185-452) uses literals with too many digits:
- _totalSupply = 100000000000 * (10 ** _decimals) (#196)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
BuffedDogeKing.DEAD (#189) should be constant
BuffedDogeKing.WBNB (#188) should be constant
BuffedDogeKing.ZERO (#190) should be constant
BuffedDogeKing._totalSupply (#196) should be constant
Add the constant attributes to state variables that never change.
Additional information: link
authorize(address) should be declared external:
- Auth.authorize(address) (#96-98)
unauthorize(address) should be declared external:
- Auth.unauthorize(address) (#103-105)
transferOwnership(address) should be declared external:
- Auth.transferOwnership(address) (#124-128)
transferForeignToken(address) should be declared external:
- BuffedDogeKing.transferForeignToken(address) (#432-436)
isOverLiquified(uint256,uint256) should be declared external:
- BuffedDogeKing.isOverLiquified(uint256,uint256) (#446-448)
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