Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
HoodSafemoon.swapBack() (#510-554) sends eth to arbitrary user
Dangerous calls:
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#538)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in HoodSafemoon._transferFrom(address,address,uint256) (#440-473):
External calls:
- swapBack() (#452)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#521-527)
- distributor.deposit{value: amountBNBReflection}() (#537)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#538)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#543-550)
External calls sending eth:
- swapBack() (#452)
- distributor.deposit{value: amountBNBReflection}() (#537)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#538)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#543-550)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#455)
- _balances[recipient] = _balances[recipient].add(amountReceived) (#458)
- amountReceived = takeFee(sender,amount) (#457)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#492)
Apply the check-effects-interactions pattern.
Additional information: link
DividendDistributor.distributeDividend(address) (#286-297) ignores return value by REFLECTION.transfer(shareholder,amount) (#292)
Use SafeERC20, or ensure that the transfer/transferFrom return value is checked.
Additional information: link
Too many vulnerabilities (Unchecked transfer, Reentrancy vulnerability, etc.). High risk of a scam. DYOR & manual audit are advised.
HoodSafemoon.swapBack().tmpSuccess (#538) is written in both
(tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#538)
tmpSuccess = false (#540)
Fix or remove the writes.
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.
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.
Reentrancy in DividendDistributor.distributeDividend(address) (#286-297):
External calls:
- REFLECTION.transfer(shareholder,amount) (#292)
State variables written after the call(s):
- shares[shareholder].totalRealised = shares[shareholder].totalRealised.add(amount) (#294)
- shares[shareholder].totalExcluded = getCumulativeDividends(shares[shareholder].amount) (#295)
Reentrancy in DividendDistributor.process(uint256) (#256-280):
External calls:
- distributeDividend(shareholders[currentIndex]) (#272)
- REFLECTION.transfer(shareholder,amount) (#292)
State variables written after the call(s):
- currentIndex ++ (#277)
Reentrancy in DividendDistributor.setShare(address,uint256) (#220-234):
External calls:
- distributeDividend(shareholder) (#222)
- REFLECTION.transfer(shareholder,amount) (#292)
State variables written after the call(s):
- shares[shareholder].amount = amount (#232)
- shares[shareholder].totalExcluded = getCumulativeDividends(shares[shareholder].amount) (#233)
Apply the check-effects-interactions pattern.
Additional information: link
HoodSafemoon.swapBack() (#510-554) ignores return value by router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#543-550)
Ensure that all the return values of the function calls are used.
Additional information: link
DividendDistributor.setDistributionCriteria(uint256,uint256) (#215-218) should emit an event for:
- minPeriod = _minPeriod (#216)
- minDistribution = _minDistribution (#217)
HoodSafemoon.setFees(uint256,uint256,uint256,uint256) (#574-581) should emit an event for:
- liquidityFee = _liquidityFee (#575)
- reflectionFee = _reflectionFee (#576)
- marketingFee = _marketingFee (#577)
- totalFee = _liquidityFee.add(_reflectionFee).add(_marketingFee) (#578)
HoodSafemoon.setSwapBackSettings(bool,uint256) (#590-593) should emit an event for:
- swapThreshold = _amount (#592)
Emit an event for critical parameter changes.
Additional information: link
Auth.transferOwnership(address).adr (#96) lacks a zero-check on :
- owner = adr (#97)
HoodSafemoon.setMarketingReciver(address)._marketingFeeReceiver (#583) lacks a zero-check on :
- marketingFeeReceiver = _marketingFeeReceiver (#584)
HoodSafemoon.setLiquidityReciver(address)._autoLiquidityReceiver (#586) lacks a zero-check on :
- autoLiquidityReceiver = _autoLiquidityReceiver (#587)
Check that the address is not zero.
Additional information: link
DividendDistributor.distributeDividend(address) (#286-297) has external calls inside a loop: REFLECTION.transfer(shareholder,amount) (#292)
Favor pull over push strategy for external calls.
Additional information: link
Reentrancy in HoodSafemoon.constructor() (#379-401):
External calls:
- pair = IDEXFactory(router.factory()).createPair(WBNB,address(this)) (#381)
State variables written after the call(s):
- _allowances[address(this)][address(router)] = _totalSupply (#382)
- approve(routerv2,_totalSupply) (#397)
- _allowances[msg.sender][spender] = amount (#414)
- approve(address(pair),_totalSupply) (#398)
- _allowances[msg.sender][spender] = amount (#414)
- _balances[msg.sender] = _totalSupply (#399)
- autoLiquidityReceiver = DEAD (#394)
- distributor = new DividendDistributor(address(router)) (#384)
- isDividendExempt[pair] = true (#390)
- isDividendExempt[address(this)] = true (#391)
- isDividendExempt[DEAD] = true (#392)
- isFeeExempt[msg.sender] = true (#386)
- isTxLimitExempt[msg.sender] = true (#387)
- marketingFeeReceiver = _marketingAdr (#395)
Reentrancy in DividendDistributor.deposit() (#236-254):
External calls:
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: msg.value}(0,path,address(this),block.timestamp) (#243-248)
State variables written after the call(s):
- dividendsPerShare = dividendsPerShare.add(dividendsPerShareAccuracyFactor.mul(amount).div(totalShares)) (#253)
- totalDividends = totalDividends.add(amount) (#252)
Reentrancy in DividendDistributor.distributeDividend(address) (#286-297):
External calls:
- REFLECTION.transfer(shareholder,amount) (#292)
State variables written after the call(s):
- shareholderClaims[shareholder] = block.timestamp (#293)
Reentrancy in DividendDistributor.setShare(address,uint256) (#220-234):
External calls:
- distributeDividend(shareholder) (#222)
- REFLECTION.transfer(shareholder,amount) (#292)
State variables written after the call(s):
- addShareholder(shareholder) (#226)
- shareholderIndexes[shareholder] = shareholders.length (#318)
- removeShareholder(shareholder) (#228)
- shareholderIndexes[shareholders[shareholders.length - 1]] = shareholderIndexes[shareholder] (#324)
- addShareholder(shareholder) (#226)
- shareholders.push(shareholder) (#319)
- removeShareholder(shareholder) (#228)
- shareholders[shareholderIndexes[shareholder]] = shareholders[shareholders.length - 1] (#323)
- shareholders.pop() (#325)
- totalShares = totalShares.sub(shares[shareholder].amount).add(amount) (#231)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in HoodSafemoon._transferFrom(address,address,uint256) (#440-473):
External calls:
- swapBack() (#452)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#521-527)
- distributor.deposit{value: amountBNBReflection}() (#537)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#538)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#543-550)
- distributor.setShare(sender,_balances[sender]) (#462)
- distributor.setShare(recipient,_balances[recipient]) (#466)
- distributor.process(distributorGas) (#469)
External calls sending eth:
- swapBack() (#452)
- distributor.deposit{value: amountBNBReflection}() (#537)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#538)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#543-550)
Event emitted after the call(s):
- Transfer(sender,recipient,amountReceived) (#471)
Reentrancy in HoodSafemoon._transferFrom(address,address,uint256) (#440-473):
External calls:
- swapBack() (#452)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#521-527)
- distributor.deposit{value: amountBNBReflection}() (#537)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#538)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#543-550)
External calls sending eth:
- swapBack() (#452)
- distributor.deposit{value: amountBNBReflection}() (#537)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#538)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#543-550)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#493)
- amountReceived = takeFee(sender,amount) (#457)
Reentrancy in HoodSafemoon.constructor() (#379-401):
External calls:
- pair = IDEXFactory(router.factory()).createPair(WBNB,address(this)) (#381)
Event emitted after the call(s):
- Approval(msg.sender,spender,amount) (#415)
- approve(address(pair),_totalSupply) (#398)
- Approval(msg.sender,spender,amount) (#415)
- approve(routerv2,_totalSupply) (#397)
- Transfer(address(0),msg.sender,_totalSupply) (#400)
Reentrancy in HoodSafemoon.swapBack() (#510-554):
External calls:
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#521-527)
- distributor.deposit{value: amountBNBReflection}() (#537)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#538)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#543-550)
External calls sending eth:
- distributor.deposit{value: amountBNBReflection}() (#537)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#538)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#543-550)
Event emitted after the call(s):
- hellBound(amountBNBLiquidity,amountToLiquify) (#552)
Apply the check-effects-interactions pattern.
Additional information: link
DividendDistributor.shouldDistribute(address) (#281-284) uses timestamp for comparisons
Dangerous comparisons:
- shareholderClaims[shareholder] + minPeriod < block.timestamp && getUnpaidEarnings(shareholder) > minDistribution (#282-283)
Avoid relying on block.timestamp.
Additional information: link
DividendDistributor.process(uint256) (#256-280) has costly operations inside a loop:
- currentIndex = 0 (#268)
DividendDistributor.distributeDividend(address) (#286-297) has costly operations inside a loop:
- totalDistributed = totalDistributed.add(amount) (#291)
DividendDistributor.process(uint256) (#256-280) has costly operations inside a loop:
- currentIndex ++ (#277)
Use a local variable to hold the loop computation result.
Additional information: link
HoodSafemoon._maxTxAmount (#346) is set pre-construction with a non-constant function or state variable:
- _totalSupply * 100 / 100
HoodSafemoon._maxWalletToken (#347) is set pre-construction with a non-constant function or state variable:
- (_totalSupply * 10) / 100
HoodSafemoon.swapThreshold (#375) 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
Low level call in HoodSafemoon.swapBack() (#510-554):
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#538)
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() (#111) is not in mixedCase
Parameter DividendDistributor.setDistributionCriteria(uint256,uint256)._minPeriod (#215) is not in mixedCase
Parameter DividendDistributor.setDistributionCriteria(uint256,uint256)._minDistribution (#215) is not in mixedCase
Variable DividendDistributor._token (#167) is not in mixedCase
Variable DividendDistributor.REFLECTION (#175) is not in mixedCase
Variable DividendDistributor.WBNB (#176) is not in mixedCase
Event HoodSafemoonhellBound(uint256,uint256) (#616) is not in CapWords
Parameter HoodSafemoon.setFees(uint256,uint256,uint256,uint256)._liquidityFee (#574) is not in mixedCase
Parameter HoodSafemoon.setFees(uint256,uint256,uint256,uint256)._reflectionFee (#574) is not in mixedCase
Parameter HoodSafemoon.setFees(uint256,uint256,uint256,uint256)._marketingFee (#574) is not in mixedCase
Parameter HoodSafemoon.setMarketingReciver(address)._marketingFeeReceiver (#583) is not in mixedCase
Parameter HoodSafemoon.setLiquidityReciver(address)._autoLiquidityReceiver (#586) is not in mixedCase
Parameter HoodSafemoon.setSwapBackSettings(bool,uint256)._enabled (#590) is not in mixedCase
Parameter HoodSafemoon.setSwapBackSettings(bool,uint256)._amount (#590) is not in mixedCase
Parameter HoodSafemoon.setDistributionCriteria(uint256,uint256)._minPeriod (#595) is not in mixedCase
Parameter HoodSafemoon.setDistributionCriteria(uint256,uint256)._minDistribution (#595) is not in mixedCase
Variable HoodSafemoon.REFLECTION (#332) is not in mixedCase
Variable HoodSafemoon.WBNB (#333) is not in mixedCase
Variable HoodSafemoon.DEAD (#336) is not in mixedCase
Variable HoodSafemoon.ZERO (#337) is not in mixedCase
Variable HoodSafemoon._marketingAdr (#339) is not in mixedCase
Constant HoodSafemoon._name (#341) is not in UPPER_CASE_WITH_UNDERSCORES
Constant HoodSafemoon._symbol (#342) is not in UPPER_CASE_WITH_UNDERSCORES
Constant HoodSafemoon._decimals (#343) is not in UPPER_CASE_WITH_UNDERSCORES
Variable HoodSafemoon._totalSupply (#345) is not in mixedCase
Variable HoodSafemoon._maxTxAmount (#346) is not in mixedCase
Variable HoodSafemoon._maxWalletToken (#347) is not in mixedCase
Variable HoodSafemoon._balances (#349) is not in mixedCase
Variable HoodSafemoon._allowances (#350) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Variable IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#116) is too similar to IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#117)
Prevent variables from having similar names.
Additional information: link
HoodSafemoon.slitherConstructorVariables() (#329-618) uses literals with too many digits:
- DEAD = 0x000000000000000000000000000000000000dEaD (#336)
HoodSafemoon.slitherConstructorVariables() (#329-618) uses literals with too many digits:
- ZERO = 0x0000000000000000000000000000000000000000 (#337)
HoodSafemoon.slitherConstructorVariables() (#329-618) uses literals with too many digits:
- distributorGas = 500000 (#372)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
HoodSafemoon.REFLECTION (#332) is never used in HoodSafemoon (#329-618)
Remove unused state variables.
Additional information: link
DividendDistributor.WBNB (#176) should be constant
DividendDistributor.dividendsPerShareAccuracyFactor (#190) should be constant
HoodSafemoon.DEAD (#336) should be constant
HoodSafemoon.REFLECTION (#332) should be constant
HoodSafemoon.WBNB (#333) should be constant
HoodSafemoon.ZERO (#337) should be constant
HoodSafemoon._marketingAdr (#339) should be constant
HoodSafemoon._totalSupply (#345) should be constant
HoodSafemoon.feeDenominator (#360) should be constant
HoodSafemoon.routerv2 (#334) should be constant
HoodSafemoon.targetLiquidity (#365) should be constant
HoodSafemoon.targetLiquidityDenominator (#366) 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) (#73-75)
transferOwnership(address) should be declared external:
- Auth.transferOwnership(address) (#96-100)
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