Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
PeppaPigInu.swapBack() (#348-389) sends eth to arbitrary user
Dangerous calls:
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#373)
- (buybackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#375)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in PeppaPigInu._transferFrom(address,address,uint256) (#280-309):
External calls:
- swapBack() (#298)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#359-365)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#373)
- (buybackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#375)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,marketingFeeReceiver,block.timestamp) (#379-386)
External calls sending eth:
- swapBack() (#298)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#373)
- (buybackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#375)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,marketingFeeReceiver,block.timestamp) (#379-386)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#302)
- _balances[recipient] = _balances[recipient].add(amountReceived) (#305)
- amountReceived = takeFee(sender,recipient,amount) (#304)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#335)
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.
PeppaPigInu.slitherConstructorVariables() (#193-493) performs a multiplication on the result of a division:
-swapThreshold = _totalSupply / 1000 * 3 (#230)
Consider ordering multiplication before division.
Additional information: link
PeppaPigInu.BotChecker(address[],bool).i (#463) is a local variable never initialized
Initialize all the variables. If a variable is meant to be initialized to zero, explicitly set it to zero to improve code readability.
Additional information: link
PeppaPigInu.swapBack() (#348-389) ignores return value by router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,marketingFeeReceiver,block.timestamp) (#379-386)
Ensure that all the return values of the function calls are used.
Additional information: link
PeppaPigInu.setTxLimit(uint256) (#422-425) should emit an event for:
- _maxTxAmount = amount (#424)
PeppaPigInu.setMaxWallet(uint256) (#427-430) should emit an event for:
- _maxWalletSize = amount (#429)
PeppaPigInu.setFees(uint256,uint256,uint256,uint256) (#440-446) should emit an event for:
- liquidityFee = _liquidityFee (#441)
- buybackFee = _buybackFee (#442)
- marketingFee = _marketingFee (#443)
- totalFee = _liquidityFee.add(_buybackFee).add(_marketingFee) (#444)
- feeDenominator = _feeDenominator (#445)
Emit an event for critical parameter changes.
Additional information: link
Auth.transferOwnership(address).adr (#132) lacks a zero-check on :
- owner = adr (#133)
PeppaPigInu.setFeeReceiver(address,address)._marketingFeeReceiver (#448) lacks a zero-check on :
- marketingFeeReceiver = _marketingFeeReceiver (#449)
PeppaPigInu.setFeeReceiver(address,address)._buybackFeeReceiver (#448) lacks a zero-check on :
- buybackFeeReceiver = _buybackFeeReceiver (#450)
Check that the address is not zero.
Additional information: link
Reentrancy in PeppaPigInu._transferFrom(address,address,uint256) (#280-309):
External calls:
- swapBack() (#298)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#359-365)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#373)
- (buybackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#375)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,marketingFeeReceiver,block.timestamp) (#379-386)
External calls sending eth:
- swapBack() (#298)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#373)
- (buybackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#375)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,marketingFeeReceiver,block.timestamp) (#379-386)
State variables written after the call(s):
- launch() (#300)
- launchedAt = block.number (#409)
Reentrancy in PeppaPigInu.constructor() (#234-245):
External calls:
- pair = IDEXFactory(router.factory()).createPair(WBNB,address(this)) (#236)
State variables written after the call(s):
- _allowances[address(this)][address(router)] = type()(uint256).max (#237)
- _balances[_owner] = _totalSupply (#243)
- isFeeExempt[_owner] = true (#240)
- isTxLimitExempt[_owner] = true (#241)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in PeppaPigInu._transferFrom(address,address,uint256) (#280-309):
External calls:
- swapBack() (#298)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#359-365)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#373)
- (buybackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#375)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,marketingFeeReceiver,block.timestamp) (#379-386)
External calls sending eth:
- swapBack() (#298)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#373)
- (buybackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#375)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,marketingFeeReceiver,block.timestamp) (#379-386)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#336)
- amountReceived = takeFee(sender,recipient,amount) (#304)
- Transfer(sender,recipient,amountReceived) (#307)
Reentrancy in PeppaPigInu.constructor() (#234-245):
External calls:
- pair = IDEXFactory(router.factory()).createPair(WBNB,address(this)) (#236)
Event emitted after the call(s):
- Transfer(address(0),_owner,_totalSupply) (#244)
Reentrancy in PeppaPigInu.swapBack() (#348-389):
External calls:
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#359-365)
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#373)
- (buybackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#375)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,marketingFeeReceiver,block.timestamp) (#379-386)
External calls sending eth:
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#373)
- (buybackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#375)
- router.addLiquidityETH{value: amountBNBLiquidity}(address(this),amountToLiquify,0,0,marketingFeeReceiver,block.timestamp) (#379-386)
Event emitted after the call(s):
- AutoLiquify(amountBNBLiquidity,amountToLiquify) (#387)
Apply the check-effects-interactions pattern.
Additional information: link
PeppaPigInu.buyTokens(uint256,address) (#391-402) is never used and should be removed
PeppaPigInu.maxAmount() (#413-415) is never used and should be removed
PeppaPigInu.maxWallet() (#418-420) is never used and should be removed
Remove unused functions.
Additional information: link
PeppaPigInu._maxTxAmount (#205) is set pre-construction with a non-constant function or state variable:
- (_totalSupply * 1) / 100
PeppaPigInu._maxWalletSize (#206) is set pre-construction with a non-constant function or state variable:
- (_totalSupply * 1) / 100
PeppaPigInu.swapThreshold (#230) 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 PeppaPigInu.swapBack() (#348-389):
- (MarketingSuccess) = address(marketingFeeReceiver).call{gas: 30000,value: amountBNBMarketing}() (#373)
- (buybackSuccess) = address(buybackFeeReceiver).call{gas: 30000,value: amountBNBbuyback}() (#375)
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() (#147) is not in mixedCase
Parameter PeppaPigInu.setFees(uint256,uint256,uint256,uint256)._liquidityFee (#440) is not in mixedCase
Parameter PeppaPigInu.setFees(uint256,uint256,uint256,uint256)._buybackFee (#440) is not in mixedCase
Parameter PeppaPigInu.setFees(uint256,uint256,uint256,uint256)._marketingFee (#440) is not in mixedCase
Parameter PeppaPigInu.setFees(uint256,uint256,uint256,uint256)._feeDenominator (#440) is not in mixedCase
Parameter PeppaPigInu.setFeeReceiver(address,address)._marketingFeeReceiver (#448) is not in mixedCase
Parameter PeppaPigInu.setFeeReceiver(address,address)._buybackFeeReceiver (#448) is not in mixedCase
Parameter PeppaPigInu.setSwapBackSettings(bool,uint256)._enabled (#453) is not in mixedCase
Parameter PeppaPigInu.setSwapBackSettings(bool,uint256)._amount (#453) is not in mixedCase
Parameter PeppaPigInu.setSwapEnabled(bool)._enabled (#458) is not in mixedCase
Function PeppaPigInu.BotChecker(address[],bool) (#462-466) is not in mixedCase
Parameter PeppaPigInu.transferForeignToken(address)._token (#473) is not in mixedCase
Variable PeppaPigInu.WBNB (#196) is not in mixedCase
Variable PeppaPigInu.DEAD (#197) is not in mixedCase
Variable PeppaPigInu.ZERO (#198) is not in mixedCase
Constant PeppaPigInu._name (#200) is not in UPPER_CASE_WITH_UNDERSCORES
Constant PeppaPigInu._symbol (#201) is not in UPPER_CASE_WITH_UNDERSCORES
Constant PeppaPigInu._decimals (#202) is not in UPPER_CASE_WITH_UNDERSCORES
Variable PeppaPigInu._totalSupply (#204) is not in mixedCase
Variable PeppaPigInu._maxTxAmount (#205) is not in mixedCase
Variable PeppaPigInu._maxWalletSize (#206) is not in mixedCase
Variable PeppaPigInu._balances (#208) is not in mixedCase
Variable PeppaPigInu._allowances (#209) is not in mixedCase
Variable PeppaPigInu.IsOpen (#228) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Variable IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#152) is too similar to IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#153)
Prevent variables from having similar names.
Additional information: link
PeppaPigInu.slitherConstructorVariables() (#193-493) uses literals with too many digits:
- DEAD = 0x000000000000000000000000000000000000dEaD (#197)
PeppaPigInu.slitherConstructorVariables() (#193-493) uses literals with too many digits:
- ZERO = 0x0000000000000000000000000000000000000000 (#198)
PeppaPigInu.slitherConstructorVariables() (#193-493) uses literals with too many digits:
- _totalSupply = 100000 * (10 ** _decimals) (#204)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
PeppaPigInu.DEAD (#197) should be constant
PeppaPigInu.WBNB (#196) should be constant
PeppaPigInu.ZERO (#198) should be constant
PeppaPigInu._totalSupply (#204) 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) (#104-106)
unauthorize(address) should be declared external:
- Auth.unauthorize(address) (#111-113)
transferOwnership(address) should be declared external:
- Auth.transferOwnership(address) (#132-136)
transferForeignToken(address) should be declared external:
- PeppaPigInu.transferForeignToken(address) (#473-477)
isOverLiquified(uint256,uint256) should be declared external:
- PeppaPigInu.isOverLiquified(uint256,uint256) (#487-489)
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