Frosted Cake is a deflationary passive income token, strategically developed for long term Investments, pushing Smart Contract Capabilities to its fullest potential.
Too many vulnerabilities (Unchecked transfer, Reentrancy vulnerability, etc.). High risk of a scam. DYOR & manual audit are advised.
FrostedCake.swapBack() (#584-628) sends eth to arbitrary user
Dangerous calls:
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#612)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in FrostedCake._transferFrom(address,address,uint256) (#484-532):
External calls:
- swapBack() (#511)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#595-601)
- distributor.deposit{value: amountBNBReflection}() (#611)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#612)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#618-625)
External calls sending eth:
- swapBack() (#511)
- distributor.deposit{value: amountBNBReflection}() (#611)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#612)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#618-625)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#514)
- _balances[recipient] = _balances[recipient].add(amountReceived) (#517)
- amountReceived = takeFee(sender,amount) (#516)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#552)
Apply the check-effects-interactions pattern.
Additional information: link
DividendDistributor.distributeDividend(address) (#311-322) ignores return value by CAKE.transfer(shareholder,amount) (#317)
Use SafeERC20, or ensure that the transfer/transferFrom return value is checked.
Additional information: link
Unable to verify that contract auditor is trusted: Certik, Quantstamp, Hacken, Solidity, Paladinsec, Openzeppelin, Verichains
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.
Combination 2: Unchecked transfer + 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.
Combination 3: Reentrancy vulnerabilities + Unchecked transfer vulnerability. Usual for scams. May be justified by some complex mechanics (e.g. rebase, reflections). DYOR & manual audit are advised.
FrostedCake.swapBack().tmpSuccess (#612) is written in both
(tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#612)
tmpSuccess = false (#615)
Fix or remove the writes.
Additional information: link
Contract ownership is not renounced (belongs to a wallet)
Reentrancy in DividendDistributor.distributeDividend(address) (#311-322):
External calls:
- CAKE.transfer(shareholder,amount) (#317)
State variables written after the call(s):
- shares[shareholder].totalRealised = shares[shareholder].totalRealised.add(amount) (#319)
- shares[shareholder].totalExcluded = getCumulativeDividends(shares[shareholder].amount) (#320)
Reentrancy in DividendDistributor.process(uint256) (#280-304):
External calls:
- distributeDividend(shareholders[currentIndex]) (#296)
- CAKE.transfer(shareholder,amount) (#317)
State variables written after the call(s):
- currentIndex ++ (#301)
Reentrancy in DividendDistributor.setShare(address,uint256) (#244-258):
External calls:
- distributeDividend(shareholder) (#246)
- CAKE.transfer(shareholder,amount) (#317)
State variables written after the call(s):
- shares[shareholder].amount = amount (#256)
- shares[shareholder].totalExcluded = getCumulativeDividends(shares[shareholder].amount) (#257)
Apply the check-effects-interactions pattern.
Additional information: link
FrostedCake.swapBack() (#584-628) ignores return value by router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#618-625)
Ensure that all the return values of the function calls are used.
Additional information: link
DividendDistributor.setDistributionCriteria(uint256,uint256) (#239-242) should emit an event for:
- minPeriod = _minPeriod (#240)
- minDistribution = _minDistribution (#241)
FrostedCake.setTxLimit(uint256) (#631-633) should emit an event for:
- _maxTxAmount = amount (#632)
FrostedCake.setFees(uint256,uint256,uint256,uint256) (#657-664) should emit an event for:
- liquidityFee = _liquidityFee (#658)
- reflectionFee = _reflectionFee (#659)
- marketingFee = _marketingFee (#660)
- totalFee = _liquidityFee.add(_reflectionFee).add(_marketingFee) (#661)
- feeDenominator = _feeDenominator (#662)
FrostedCake.setSwapBackSettings(bool,uint256) (#671-674) should emit an event for:
- swapThreshold = _amount (#673)
FrostedCake.setTargetLiquidity(uint256,uint256) (#676-679) should emit an event for:
- targetLiquidity = _target (#677)
- targetLiquidityDenominator = _denominator (#678)
Emit an event for critical parameter changes.
Additional information: link
Auth.transferOwnership(address).adr (#120) lacks a zero-check on :
- owner = adr (#121)
FrostedCake.setFeeReceivers(address,address)._autoLiquidityReceiver (#666) lacks a zero-check on :
- autoLiquidityReceiver = _autoLiquidityReceiver (#667)
FrostedCake.setFeeReceivers(address,address)._marketingFeeReceiver (#666) lacks a zero-check on :
- marketingFeeReceiver = _marketingFeeReceiver (#668)
Check that the address is not zero.
Additional information: link
DividendDistributor.distributeDividend(address) (#311-322) has external calls inside a loop: CAKE.transfer(shareholder,amount) (#317)
FrostedCake.airdrop(address,address[],uint256[]) (#707-730) has external calls inside a loop: distributor.setShare(addresses[i_scope_0],_balances[addresses[i_scope_0]]) (#722)
Favor pull over push strategy for external calls.
Additional information: link
Reentrancy in FrostedCake.constructor() (#413-445):
External calls:
- pair = IDEXFactory(router.factory()).createPair(WBNB,address(this)) (#415)
State variables written after the call(s):
- _allowances[address(this)][address(router)] = uint256(- 1) (#416)
- _balances[Owner] = _totalSupply (#443)
- autoLiquidityReceiver = DEAD (#439)
- distributor = new DividendDistributor(address(router)) (#418)
- isDividendExempt[pair] = true (#434)
- isDividendExempt[address(this)] = true (#435)
- isDividendExempt[DEAD] = true (#436)
- isFeeExempt[Owner] = true (#420)
- isTimelockExempt[Owner] = true (#424)
- isTimelockExempt[marketingFeeReceiver] = true (#425)
- isTimelockExempt[DEAD] = true (#426)
- isTimelockExempt[address(this)] = true (#427)
- isTxLimitExempt[Owner] = true (#421)
- marketingFeeReceiver = 0x93A3a987Fa2859bE413E57494f1052015217eDF9 (#440)
Reentrancy in DividendDistributor.deposit() (#260-278):
External calls:
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: msg.value}(0,path,address(this),block.timestamp) (#267-272)
State variables written after the call(s):
- dividendsPerShare = dividendsPerShare.add(dividendsPerShareAccuracyFactor.mul(amount).div(totalShares)) (#277)
- totalDividends = totalDividends.add(amount) (#276)
Reentrancy in DividendDistributor.distributeDividend(address) (#311-322):
External calls:
- CAKE.transfer(shareholder,amount) (#317)
State variables written after the call(s):
- shareholderClaims[shareholder] = block.timestamp (#318)
Reentrancy in DividendDistributor.setShare(address,uint256) (#244-258):
External calls:
- distributeDividend(shareholder) (#246)
- CAKE.transfer(shareholder,amount) (#317)
State variables written after the call(s):
- addShareholder(shareholder) (#250)
- shareholderIndexes[shareholder] = shareholders.length (#344)
- removeShareholder(shareholder) (#252)
- shareholderIndexes[shareholders[shareholders.length - 1]] = shareholderIndexes[shareholder] (#350)
- addShareholder(shareholder) (#250)
- shareholders.push(shareholder) (#345)
- removeShareholder(shareholder) (#252)
- shareholders[shareholderIndexes[shareholder]] = shareholders[shareholders.length - 1] (#349)
- shareholders.pop() (#351)
- totalShares = totalShares.sub(shares[shareholder].amount).add(amount) (#255)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in FrostedCake._transferFrom(address,address,uint256) (#484-532):
External calls:
- swapBack() (#511)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#595-601)
- distributor.deposit{value: amountBNBReflection}() (#611)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#612)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#618-625)
- distributor.setShare(sender,_balances[sender]) (#521)
- distributor.setShare(recipient,_balances[recipient]) (#525)
- distributor.process(distributorGas) (#528)
External calls sending eth:
- swapBack() (#511)
- distributor.deposit{value: amountBNBReflection}() (#611)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#612)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#618-625)
Event emitted after the call(s):
- Transfer(sender,recipient,amountReceived) (#530)
Reentrancy in FrostedCake._transferFrom(address,address,uint256) (#484-532):
External calls:
- swapBack() (#511)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#595-601)
- distributor.deposit{value: amountBNBReflection}() (#611)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#612)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#618-625)
External calls sending eth:
- swapBack() (#511)
- distributor.deposit{value: amountBNBReflection}() (#611)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#612)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#618-625)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#553)
- amountReceived = takeFee(sender,amount) (#516)
Reentrancy in FrostedCake.constructor() (#413-445):
External calls:
- pair = IDEXFactory(router.factory()).createPair(WBNB,address(this)) (#415)
Event emitted after the call(s):
- Transfer(address(0),Owner,_totalSupply) (#444)
Reentrancy in FrostedCake.swapBack() (#584-628):
External calls:
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#595-601)
- distributor.deposit{value: amountBNBReflection}() (#611)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#612)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#618-625)
External calls sending eth:
- distributor.deposit{value: amountBNBReflection}() (#611)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#612)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#618-625)
Event emitted after the call(s):
- AutoLiquify(amountBNBLiquidity,amountToLiquify) (#626)
Apply the check-effects-interactions pattern.
Additional information: link
DividendDistributor.shouldDistribute(address) (#306-309) uses timestamp for comparisons
Dangerous comparisons:
- shareholderClaims[shareholder] + minPeriod < block.timestamp && getUnpaidEarnings(shareholder) > minDistribution (#307-308)
FrostedCake._transferFrom(address,address,uint256) (#484-532) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(cooldownTimer[recipient] < block.timestamp,Please wait for cooldown between buys) (#502)
Avoid relying on block.timestamp.
Additional information: link
DividendDistributor.process(uint256) (#280-304) has costly operations inside a loop:
- currentIndex = 0 (#292)
DividendDistributor.distributeDividend(address) (#311-322) has costly operations inside a loop:
- totalDistributed = totalDistributed.add(amount) (#316)
DividendDistributor.process(uint256) (#280-304) has costly operations inside a loop:
- currentIndex ++ (#301)
Use a local variable to hold the loop computation result.
Additional information: link
FrostedCake._maxTxAmount (#368) is set pre-construction with a non-constant function or state variable:
- _totalSupply * 1 / 100
FrostedCake._maxWalletToken (#371) is set pre-construction with a non-constant function or state variable:
- (_totalSupply * 2) / 100
FrostedCake.swapThreshold (#409) is set pre-construction with a non-constant function or state variable:
- _totalSupply * 10 / 10000
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
Pragma version^0.7.4 (#3) allows old versions
solc-0.7.4 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 FrostedCake.swapBack() (#584-628):
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#612)
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() (#135) is not in mixedCase
Parameter DividendDistributor.setDistributionCriteria(uint256,uint256)._minPeriod (#239) is not in mixedCase
Parameter DividendDistributor.setDistributionCriteria(uint256,uint256)._minDistribution (#239) is not in mixedCase
Variable DividendDistributor._token (#191) is not in mixedCase
Variable DividendDistributor.CAKE (#199) is not in mixedCase
Variable DividendDistributor.WBNB (#200) is not in mixedCase
Parameter FrostedCake.tradingStatus(bool)._status (#572) is not in mixedCase
Parameter FrostedCake.cooldownEnabled(bool,uint8)._status (#577) is not in mixedCase
Parameter FrostedCake.cooldownEnabled(bool,uint8)._interval (#577) is not in mixedCase
Parameter FrostedCake.setFees(uint256,uint256,uint256,uint256)._liquidityFee (#657) is not in mixedCase
Parameter FrostedCake.setFees(uint256,uint256,uint256,uint256)._reflectionFee (#657) is not in mixedCase
Parameter FrostedCake.setFees(uint256,uint256,uint256,uint256)._marketingFee (#657) is not in mixedCase
Parameter FrostedCake.setFees(uint256,uint256,uint256,uint256)._feeDenominator (#657) is not in mixedCase
Parameter FrostedCake.setFeeReceivers(address,address)._autoLiquidityReceiver (#666) is not in mixedCase
Parameter FrostedCake.setFeeReceivers(address,address)._marketingFeeReceiver (#666) is not in mixedCase
Parameter FrostedCake.setSwapBackSettings(bool,uint256)._enabled (#671) is not in mixedCase
Parameter FrostedCake.setSwapBackSettings(bool,uint256)._amount (#671) is not in mixedCase
Parameter FrostedCake.setTargetLiquidity(uint256,uint256)._target (#676) is not in mixedCase
Parameter FrostedCake.setTargetLiquidity(uint256,uint256)._denominator (#676) is not in mixedCase
Parameter FrostedCake.setDistributionCriteria(uint256,uint256)._minPeriod (#681) is not in mixedCase
Parameter FrostedCake.setDistributionCriteria(uint256,uint256)._minDistribution (#681) is not in mixedCase
Variable FrostedCake.CAKE (#358) is not in mixedCase
Variable FrostedCake.WBNB (#359) is not in mixedCase
Variable FrostedCake.DEAD (#360) is not in mixedCase
Variable FrostedCake.ZERO (#361) is not in mixedCase
Constant FrostedCake._name (#363) is not in UPPER_CASE_WITH_UNDERSCORES
Constant FrostedCake._symbol (#364) is not in UPPER_CASE_WITH_UNDERSCORES
Constant FrostedCake._decimals (#365) is not in UPPER_CASE_WITH_UNDERSCORES
Variable FrostedCake._totalSupply (#367) is not in mixedCase
Variable FrostedCake._maxTxAmount (#368) is not in mixedCase
Variable FrostedCake._maxWalletToken (#371) is not in mixedCase
Variable FrostedCake._balances (#373) is not in mixedCase
Variable FrostedCake._allowances (#374) is not in mixedCase
Variable FrostedCake.Owner (#389) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Variable IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#140) is too similar to IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#141)
Prevent variables from having similar names.
Additional information: link
FrostedCake.slitherConstructorVariables() (#355-735) uses literals with too many digits:
- DEAD = 0x000000000000000000000000000000000000dEaD (#360)
FrostedCake.slitherConstructorVariables() (#355-735) uses literals with too many digits:
- ZERO = 0x0000000000000000000000000000000000000000 (#361)
FrostedCake.slitherConstructorVariables() (#355-735) uses literals with too many digits:
- distributorGas = 500000 (#401)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
FrostedCake.CAKE (#358) is never used in FrostedCake (#355-735)
Remove unused state variables.
Additional information: link
DividendDistributor.WBNB (#200) should be constant
DividendDistributor.dividendsPerShareAccuracyFactor (#213) should be constant
FrostedCake.CAKE (#358) should be constant
FrostedCake.DEAD (#360) should be constant
FrostedCake.Owner (#389) should be constant
FrostedCake.WBNB (#359) should be constant
FrostedCake.ZERO (#361) should be constant
FrostedCake._totalSupply (#367) should be constant
FrostedCake.launchedAt (#397) 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) (#92-94)
unauthorize(address) should be declared external:
- Auth.unauthorize(address) (#99-101)
transferOwnership(address) should be declared external:
- Auth.transferOwnership(address) (#120-124)
tradingStatus(bool) should be declared external:
- FrostedCake.tradingStatus(bool) (#572-574)
cooldownEnabled(bool,uint8) should be declared external:
- FrostedCake.cooldownEnabled(bool,uint8) (#577-580)
Use the external attribute for functions never called from the contract.
Additional information: link
Average PancakeSwap trading volume, liqudity, number of swaps are extremely low. Token seems to be dead.
Average 30d PancakeSwap volume is less than $100. Token is either dead or inactive.
Average 30d number of PancakeSwap swaps is less than 1. Token is either dead or inactive.
Token is deployed only at one blockchain
Average 30d PancakeSwap liquidity is low.
Token has no active CoinMarketCap listing / rank
Token has a considerable age, but average PancakeSwap 30d trading volume is low
Young tokens have high risks of price dump / death
Token has relatively low CoinGecko rank
Young tokens have high risks of price dump / death
Young tokens have high risks of price dump / death
Last post in Twitter was more than 180 days ago
Unable to find Blog account (Reddit or Medium)
Unable to find Youtube account
Unable to find Discord account