Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
Pup.swapBack() (#583-627) sends eth to arbitrary user
Dangerous calls:
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#611)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in Pup._transferFrom(address,address,uint256) (#483-531):
External calls:
- swapBack() (#510)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#594-600)
- distributor.deposit{value: amountBNBReflection}() (#610)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#611)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#617-624)
External calls sending eth:
- swapBack() (#510)
- distributor.deposit{value: amountBNBReflection}() (#610)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#611)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#617-624)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#513)
- _balances[recipient] = _balances[recipient].add(amountReceived) (#516)
- amountReceived = takeFee(sender,amount) (#515)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#551)
Apply the check-effects-interactions pattern.
Additional information: link
DividendDistributor.distributeDividend(address) (#318-329) ignores return value by BETH.transfer(shareholder,amount) (#324)
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.
Pup.swapBack().tmpSuccess (#611) is written in both
(tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#611)
tmpSuccess = false (#614)
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.
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.
Low level call in Pup.swapBack() (#583-627):
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#611)
Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence
Additional information: link
Reentrancy in DividendDistributor.distributeDividend(address) (#318-329):
External calls:
- BETH.transfer(shareholder,amount) (#324)
State variables written after the call(s):
- shares[shareholder].totalRealised = shares[shareholder].totalRealised.add(amount) (#326)
- shares[shareholder].totalExcluded = getCumulativeDividends(shares[shareholder].amount) (#327)
Reentrancy in DividendDistributor.process(uint256) (#287-311):
External calls:
- distributeDividend(shareholders[currentIndex]) (#303)
- BETH.transfer(shareholder,amount) (#324)
State variables written after the call(s):
- currentIndex ++ (#308)
Reentrancy in DividendDistributor.setShare(address,uint256) (#251-265):
External calls:
- distributeDividend(shareholder) (#253)
- BETH.transfer(shareholder,amount) (#324)
State variables written after the call(s):
- shares[shareholder].amount = amount (#263)
- shares[shareholder].totalExcluded = getCumulativeDividends(shares[shareholder].amount) (#264)
Apply the check-effects-interactions pattern.
Additional information: link
Pup.swapBack() (#583-627) ignores return value by router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#617-624)
Ensure that all the return values of the function calls are used.
Additional information: link
DividendDistributor.setDistributionCriteria(uint256,uint256) (#246-249) should emit an event for:
- minPeriod = _minPeriod (#247)
- minDistribution = _minDistribution (#248)
Pup.setTxLimit(uint256) (#630-632) should emit an event for:
- _maxTxAmount = amount (#631)
Pup.setFees(uint256,uint256,uint256,uint256) (#656-663) should emit an event for:
- liquidityFee = _liquidityFee (#657)
- reflectionFee = _reflectionFee (#658)
- marketingFee = _marketingFee (#659)
- totalFee = _liquidityFee.add(_reflectionFee).add(_marketingFee) (#660)
- feeDenominator = _feeDenominator (#661)
Pup.setSwapBackSettings(bool,uint256) (#670-673) should emit an event for:
- swapThreshold = _amount (#672)
Pup.setTargetLiquidity(uint256,uint256) (#675-678) should emit an event for:
- targetLiquidity = _target (#676)
- targetLiquidityDenominator = _denominator (#677)
Emit an event for critical parameter changes.
Additional information: link
Auth.transferOwnership(address).adr (#129) lacks a zero-check on :
- owner = adr (#130)
Pup.setFeeReceivers(address,address)._autoLiquidityReceiver (#665) lacks a zero-check on :
- autoLiquidityReceiver = _autoLiquidityReceiver (#666)
Pup.setFeeReceivers(address,address)._marketingFeeReceiver (#665) lacks a zero-check on :
- marketingFeeReceiver = _marketingFeeReceiver (#667)
Check that the address is not zero.
Additional information: link
DividendDistributor.distributeDividend(address) (#318-329) has external calls inside a loop: BETH.transfer(shareholder,amount) (#324)
Pup.airdrop(address,address[],uint256[]) (#706-729) has external calls inside a loop: distributor.setShare(addresses[i_scope_0],_balances[addresses[i_scope_0]]) (#721)
Favor pull over push strategy for external calls.
Additional information: link
Reentrancy in Pup.constructor() (#419-444):
External calls:
- pair = IDEXFactory(router.factory()).createPair(WBNB,address(this)) (#421)
State variables written after the call(s):
- _allowances[address(this)][address(router)] = uint256(- 1) (#422)
- _balances[msg.sender] = _totalSupply (#442)
- autoLiquidityReceiver = msg.sender (#439)
- distributor = new DividendDistributor(address(router)) (#424)
- isDividendExempt[pair] = true (#434)
- isDividendExempt[address(this)] = false (#435)
- isDividendExempt[DEAD] = true (#436)
- isFeeExempt[msg.sender] = true (#426)
- isTimelockExempt[msg.sender] = true (#430)
- isTimelockExempt[DEAD] = true (#431)
- isTimelockExempt[address(this)] = true (#432)
- isTxLimitExempt[msg.sender] = true (#427)
- marketingFeeReceiver = msg.sender (#440)
Reentrancy in DividendDistributor.deposit() (#267-285):
External calls:
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: msg.value}(0,path,address(this),block.timestamp) (#274-279)
State variables written after the call(s):
- dividendsPerShare = dividendsPerShare.add(dividendsPerShareAccuracyFactor.mul(amount).div(totalShares)) (#284)
- totalDividends = totalDividends.add(amount) (#283)
Reentrancy in DividendDistributor.distributeDividend(address) (#318-329):
External calls:
- BETH.transfer(shareholder,amount) (#324)
State variables written after the call(s):
- shareholderClaims[shareholder] = block.timestamp (#325)
Reentrancy in DividendDistributor.setShare(address,uint256) (#251-265):
External calls:
- distributeDividend(shareholder) (#253)
- BETH.transfer(shareholder,amount) (#324)
State variables written after the call(s):
- addShareholder(shareholder) (#257)
- shareholderIndexes[shareholder] = shareholders.length (#351)
- removeShareholder(shareholder) (#259)
- shareholderIndexes[shareholders[shareholders.length - 1]] = shareholderIndexes[shareholder] (#357)
- addShareholder(shareholder) (#257)
- shareholders.push(shareholder) (#352)
- removeShareholder(shareholder) (#259)
- shareholders[shareholderIndexes[shareholder]] = shareholders[shareholders.length - 1] (#356)
- shareholders.pop() (#358)
- totalShares = totalShares.sub(shares[shareholder].amount).add(amount) (#262)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in Pup._transferFrom(address,address,uint256) (#483-531):
External calls:
- swapBack() (#510)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#594-600)
- distributor.deposit{value: amountBNBReflection}() (#610)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#611)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#617-624)
- distributor.setShare(sender,_balances[sender]) (#520)
- distributor.setShare(recipient,_balances[recipient]) (#524)
- distributor.process(distributorGas) (#527)
External calls sending eth:
- swapBack() (#510)
- distributor.deposit{value: amountBNBReflection}() (#610)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#611)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#617-624)
Event emitted after the call(s):
- Transfer(sender,recipient,amountReceived) (#529)
Reentrancy in Pup._transferFrom(address,address,uint256) (#483-531):
External calls:
- swapBack() (#510)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#594-600)
- distributor.deposit{value: amountBNBReflection}() (#610)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#611)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#617-624)
External calls sending eth:
- swapBack() (#510)
- distributor.deposit{value: amountBNBReflection}() (#610)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#611)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#617-624)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#552)
- amountReceived = takeFee(sender,amount) (#515)
Reentrancy in Pup.constructor() (#419-444):
External calls:
- pair = IDEXFactory(router.factory()).createPair(WBNB,address(this)) (#421)
Event emitted after the call(s):
- Transfer(address(0),msg.sender,_totalSupply) (#443)
Reentrancy in Pup.swapBack() (#583-627):
External calls:
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#594-600)
- distributor.deposit{value: amountBNBReflection}() (#610)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#611)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#617-624)
External calls sending eth:
- distributor.deposit{value: amountBNBReflection}() (#610)
- (tmpSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#611)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,autoLiquidityReceiver,block.timestamp) (#617-624)
Event emitted after the call(s):
- AutoLiquify(amountBNBLiquidity,amountToLiquify) (#625)
Apply the check-effects-interactions pattern.
Additional information: link
DividendDistributor.shouldDistribute(address) (#313-316) uses timestamp for comparisons
Dangerous comparisons:
- shareholderClaims[shareholder] + minPeriod < block.timestamp && getUnpaidEarnings(shareholder) > minDistribution (#314-315)
Pup._transferFrom(address,address,uint256) (#483-531) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(cooldownTimer[recipient] < block.timestamp,Please wait for 1min between two buys) (#501)
Avoid relying on block.timestamp.
Additional information: link
DividendDistributor.process(uint256) (#287-311) has costly operations inside a loop:
- currentIndex = 0 (#299)
DividendDistributor.distributeDividend(address) (#318-329) has costly operations inside a loop:
- totalDistributed = totalDistributed.add(amount) (#323)
DividendDistributor.process(uint256) (#287-311) has costly operations inside a loop:
- currentIndex ++ (#308)
Use a local variable to hold the loop computation result.
Additional information: link
Pup._maxTxAmount (#375) is set pre-construction with a non-constant function or state variable:
- _totalSupply * 2 / 100
Pup._maxWalletToken (#378) is set pre-construction with a non-constant function or state variable:
- (_totalSupply * 3) / 100
Pup.swapThreshold (#415) is set pre-construction with a non-constant function or state variable:
- _totalSupply * 30 / 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
Function IDEXRouter.WETH() (#144) is not in mixedCase
Parameter DividendDistributor.setDistributionCriteria(uint256,uint256)._minPeriod (#246) is not in mixedCase
Parameter DividendDistributor.setDistributionCriteria(uint256,uint256)._minDistribution (#246) is not in mixedCase
Variable DividendDistributor._token (#200) is not in mixedCase
Variable DividendDistributor.BETH (#208) is not in mixedCase
Variable DividendDistributor.WBNB (#209) is not in mixedCase
Parameter Pup.tradingStatus(bool)._status (#571) is not in mixedCase
Parameter Pup.cooldownEnabled(bool,uint8)._status (#576) is not in mixedCase
Parameter Pup.cooldownEnabled(bool,uint8)._interval (#576) is not in mixedCase
Parameter Pup.setFees(uint256,uint256,uint256,uint256)._liquidityFee (#656) is not in mixedCase
Parameter Pup.setFees(uint256,uint256,uint256,uint256)._reflectionFee (#656) is not in mixedCase
Parameter Pup.setFees(uint256,uint256,uint256,uint256)._marketingFee (#656) is not in mixedCase
Parameter Pup.setFees(uint256,uint256,uint256,uint256)._feeDenominator (#656) is not in mixedCase
Parameter Pup.setFeeReceivers(address,address)._autoLiquidityReceiver (#665) is not in mixedCase
Parameter Pup.setFeeReceivers(address,address)._marketingFeeReceiver (#665) is not in mixedCase
Parameter Pup.setSwapBackSettings(bool,uint256)._enabled (#670) is not in mixedCase
Parameter Pup.setSwapBackSettings(bool,uint256)._amount (#670) is not in mixedCase
Parameter Pup.setTargetLiquidity(uint256,uint256)._target (#675) is not in mixedCase
Parameter Pup.setTargetLiquidity(uint256,uint256)._denominator (#675) is not in mixedCase
Parameter Pup.setDistributionCriteria(uint256,uint256)._minPeriod (#680) is not in mixedCase
Parameter Pup.setDistributionCriteria(uint256,uint256)._minDistribution (#680) is not in mixedCase
Variable Pup.BETH (#365) is not in mixedCase
Variable Pup.WBNB (#366) is not in mixedCase
Variable Pup.DEAD (#367) is not in mixedCase
Variable Pup.ZERO (#368) is not in mixedCase
Constant Pup._name (#370) is not in UPPER_CASE_WITH_UNDERSCORES
Constant Pup._symbol (#371) is not in UPPER_CASE_WITH_UNDERSCORES
Constant Pup._decimals (#372) is not in UPPER_CASE_WITH_UNDERSCORES
Variable Pup._totalSupply (#374) is not in mixedCase
Variable Pup._maxTxAmount (#375) is not in mixedCase
Variable Pup._maxWalletToken (#378) is not in mixedCase
Variable Pup._balances (#380) is not in mixedCase
Variable Pup._allowances (#381) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Variable IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#149) is too similar to IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#150)
Prevent variables from having similar names.
Additional information: link
Pup.slitherConstructorVariables() (#362-734) uses literals with too many digits:
- DEAD = 0x000000000000000000000000000000000000dEaD (#367)
Pup.slitherConstructorVariables() (#362-734) uses literals with too many digits:
- ZERO = 0x0000000000000000000000000000000000000000 (#368)
Pup.slitherConstructorVariables() (#362-734) uses literals with too many digits:
- distributorGas = 500000 (#407)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
Pup.BETH (#365) is never used in Pup (#362-734)
Remove unused state variables.
Additional information: link
DividendDistributor.WBNB (#209) should be constant
DividendDistributor.dividendsPerShareAccuracyFactor (#222) should be constant
Pup.BETH (#365) should be constant
Pup.DEAD (#367) should be constant
Pup.WBNB (#366) should be constant
Pup.ZERO (#368) should be constant
Pup._totalSupply (#374) should be constant
Pup.launchedAt (#403) 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) (#101-103)
unauthorize(address) should be declared external:
- Auth.unauthorize(address) (#108-110)
transferOwnership(address) should be declared external:
- Auth.transferOwnership(address) (#129-133)
tradingStatus(bool) should be declared external:
- Pup.tradingStatus(bool) (#571-573)
cooldownEnabled(bool,uint8) should be declared external:
- Pup.cooldownEnabled(bool,uint8) (#576-579)
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