Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
MegaETH.swapBack() (#342-371) sends eth to arbitrary user
Dangerous calls:
- address(marketingFeeReceiver).transfer(amountBNBMarketing) (#368)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
MegaETH.random() (#414-417) uses a weak PRNG: "r = uint256(uint256(keccak256(bytes)(abi.encodePacked(block.difficulty,block.timestamp,_nonce))) % holders.length) (#415)"
Do not use block.timestamp, now or blockhash as a source of randomness
Additional information: link
Reentrancy in MegaETH.sendLotteryReward() (#419-428):
External calls:
- swapBNBtoRWRD(winningAddress,amountWei) (#423)
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(0,path,winningAddress,block.timestamp) (#411)
State variables written after the call(s):
- totalLotteryBNB -= amountWei (#424)
Reentrancy in MegaETH.transferIncluded(address,address,uint256) (#258-280):
External calls:
- swapBack() (#267)
- router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#352-358)
- sendLotteryReward() (#268)
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(0,path,winningAddress,block.timestamp) (#411)
External calls sending eth:
- swapBack() (#267)
- router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
- address(marketingFeeReceiver).transfer(amountBNBMarketing) (#368)
- sendLotteryReward() (#268)
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(0,path,winningAddress,block.timestamp) (#411)
State variables written after the call(s):
- _balances[sender] = _balances[sender] - (amount) (#270)
- amountReceived = takeFee(sender,amount) (#272)
- _balances[address(this)] = _balances[address(this)] + (feeAmount) (#321)
- _balances[recipient] = _balances[recipient] + (amountReceived) (#274)
- setHolder(sender,_balances[sender]) (#276)
- heldByHolder[holder].amount = amount (#304)
- setHolder(recipient,_balances[recipient]) (#277)
- heldByHolder[holder].amount = amount (#304)
- setHolder(sender,_balances[sender]) (#276)
- holders[holderIndexes[holder]] = holders[holders.length - 1] (#313)
- holders.push(holder) (#309)
- holders.pop() (#315)
- setHolder(recipient,_balances[recipient]) (#277)
- holders[holderIndexes[holder]] = holders[holders.length - 1] (#313)
- holders.push(holder) (#309)
- holders.pop() (#315)
- sendLotteryReward() (#268)
- totalLotteryBNB -= amountWei (#424)
Apply the check-effects-interactions pattern.
Additional information: link
MegaETH._nonce (#180) is never initialized. It is used in:
- MegaETH.random() (#414-417)
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
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.
MegaETH.slitherConstructorVariables() (#129-553) performs a multiplication on the result of a division:
-_maxTxAmount = _totalSupply / 100 * 3 (#139)
MegaETH.slitherConstructorVariables() (#129-553) performs a multiplication on the result of a division:
-_maxWallet = _totalSupply / 100 * 3 (#140)
Consider ordering multiplication before division.
Additional information: link
MegaETH.addLiquidity(uint256,uint256) (#373-387) ignores return value by router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
MegaETH._removeLiquidityPercent(uint8) (#388-403) ignores return value by lpToken.approve(address(router),amount) (#391)
MegaETH._removeLiquidityPercent(uint8) (#388-403) ignores return value by router.removeLiquidityETHSupportingFeeOnTransferTokens(address(this),amount,0,0,address(this),block.timestamp) (#393-401)
Ensure that all the return values of the function calls are used.
Additional information: link
MegaETH.setLotterySettings(address,uint256,uint256) (#430-438) should emit an event for:
- lotteryPercentage = percentage (#437)
MegaETH.setFees(uint256,uint256,uint256) (#501-507) should emit an event for:
- liquidityFee = _liquidityFee (#502)
- marketingFee = _marketingFee (#503)
- lotteryFee = _lotteryFee (#504)
- totalFee = _lotteryFee + (_liquidityFee) + (_marketingFee) (#505)
Emit an event for critical parameter changes.
Additional information: link
MegaETH.setFeeReceivers(address)._marketingFeeReceiver (#509) lacks a zero-check on :
- marketingFeeReceiver = _marketingFeeReceiver (#510)
Check that the address is not zero.
Additional information: link
Reentrancy in MegaETH._removeLiquidityPercent(uint8) (#388-403):
External calls:
- lpToken.approve(address(router),amount) (#391)
State variables written after the call(s):
- _removingLiquidity = true (#392)
Reentrancy in MegaETH._removeLiquidityPercent(uint8) (#388-403):
External calls:
- lpToken.approve(address(router),amount) (#391)
- router.removeLiquidityETHSupportingFeeOnTransferTokens(address(this),amount,0,0,address(this),block.timestamp) (#393-401)
State variables written after the call(s):
- _removingLiquidity = false (#402)
Reentrancy in MegaETH.addLiquidity(uint256,uint256) (#373-387):
External calls:
- router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
State variables written after the call(s):
- _addingLiquidity = false (#386)
Reentrancy in MegaETH.constructor() (#192-210):
External calls:
- pair = IDEXFactory(router.factory()).createPair(router.WETH(),address(this)) (#194)
State variables written after the call(s):
- _allowances[address(this)][address(router)] = type()(uint256).max (#195)
- _balances[address(this)] = _totalSupply (#208)
- isFeeExempt[msg.sender] = true (#197)
- isFeeExempt[address(this)] = true (#200)
- isLotteryExempt[msg.sender] = true (#203)
- isLotteryExempt[DEAD] = true (#204)
- isLotteryExempt[pair] = true (#205)
- isLotteryExempt[address(this)] = true (#206)
- isTxLimitExempt[msg.sender] = true (#198)
- isTxLimitExempt[address(this)] = true (#201)
Reentrancy in MegaETH.sendLotteryReward() (#419-428):
External calls:
- swapBNBtoRWRD(winningAddress,amountWei) (#423)
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(0,path,winningAddress,block.timestamp) (#411)
State variables written after the call(s):
- heldByHolder[holders[rand]].paidLottery += amountWei (#425)
- lastLottery = block.timestamp (#426)
Reentrancy in MegaETH.swapBack() (#342-371):
External calls:
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#352-358)
External calls sending eth:
- address(marketingFeeReceiver).transfer(amountBNBMarketing) (#368)
State variables written after the call(s):
- totalLotteryBNB += amountBNBLottery (#369)
Reentrancy in MegaETH.swapBack() (#342-371):
External calls:
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#352-358)
- addLiquidity(amountToLiquify,amountBNBLiquidity) (#370)
- router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
External calls sending eth:
- address(marketingFeeReceiver).transfer(amountBNBMarketing) (#368)
- addLiquidity(amountToLiquify,amountBNBLiquidity) (#370)
- router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
State variables written after the call(s):
- addLiquidity(amountToLiquify,amountBNBLiquidity) (#370)
- _addingLiquidity = true (#375)
- _addingLiquidity = false (#386)
Reentrancy in MegaETH.transferIncluded(address,address,uint256) (#258-280):
External calls:
- swapBack() (#267)
- router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#352-358)
- sendLotteryReward() (#268)
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(0,path,winningAddress,block.timestamp) (#411)
External calls sending eth:
- swapBack() (#267)
- router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
- address(marketingFeeReceiver).transfer(amountBNBMarketing) (#368)
- sendLotteryReward() (#268)
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(0,path,winningAddress,block.timestamp) (#411)
State variables written after the call(s):
- setHolder(sender,_balances[sender]) (#276)
- holderIndexes[holder] = holders.length (#308)
- holderIndexes[holders[holders.length - 1]] = holderIndexes[holder] (#314)
- setHolder(recipient,_balances[recipient]) (#277)
- holderIndexes[holder] = holders.length (#308)
- holderIndexes[holders[holders.length - 1]] = holderIndexes[holder] (#314)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in MegaETH.constructor() (#192-210):
External calls:
- pair = IDEXFactory(router.factory()).createPair(router.WETH(),address(this)) (#194)
Event emitted after the call(s):
- Transfer(address(0),address(this),_totalSupply) (#209)
Reentrancy in MegaETH.transferIncluded(address,address,uint256) (#258-280):
External calls:
- swapBack() (#267)
- router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
- router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountToSwap,0,path,address(this),block.timestamp) (#352-358)
- sendLotteryReward() (#268)
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(0,path,winningAddress,block.timestamp) (#411)
External calls sending eth:
- swapBack() (#267)
- router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
- address(marketingFeeReceiver).transfer(amountBNBMarketing) (#368)
- sendLotteryReward() (#268)
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(0,path,winningAddress,block.timestamp) (#411)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#322)
- amountReceived = takeFee(sender,amount) (#272)
- Transfer(sender,recipient,amountReceived) (#279)
Apply the check-effects-interactions pattern.
Additional information: link
Ownable.OwnershipUnlock() (#60-65) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(block.timestamp > _lockTime,Contract is locked until 7 days) (#62)
MegaETH.shouldSendLottery() (#334-340) uses timestamp for comparisons
Dangerous comparisons:
- msg.sender != pair && ! inSwap && swapEnabled && lastLottery + lotteryMinPeriod <= block.timestamp && totalLotteryBNB > 0 (#335-339)
MegaETH.ownerReleaseAllLP() (#459-465) uses timestamp for comparisons
Dangerous comparisons:
- require(bool)(block.timestamp >= liquidityUnlockTime) (#460)
MegaETH.ownerRemoveLPPercent(uint8) (#467-474) uses timestamp for comparisons
Dangerous comparisons:
- require(bool)(block.timestamp >= liquidityUnlockTime) (#468)
MegaETH.ownerLockLP(uint256) (#477-481) uses timestamp for comparisons
Dangerous comparisons:
- require(bool)(liquidityUnlockTime == 0) (#478)
Avoid relying on block.timestamp.
Additional information: link
MegaETH.isContract(address) (#535-540) uses assembly
- INLINE ASM (#538)
Do not use evm assembly.
Additional information: link
MegaETH._maxTxAmount (#139) is set pre-construction with a non-constant function or state variable:
- _totalSupply / 100 * 3
MegaETH._maxWallet (#140) is set pre-construction with a non-constant function or state variable:
- _totalSupply / 100 * 3
MegaETH.swapThreshold (#188) is set pre-construction with a non-constant function or state variable:
- _totalSupply / 1000
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.8.10 (#2) necessitates a version too recent to be trusted. Consider deploying with 0.6.12/0.7.6/0.8.7
solc-0.8.10 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
Function Ownable.OwnershipLock(uint256) (#53-58) is not in mixedCase
Function Ownable.OwnershipUnlock() (#60-65) is not in mixedCase
Function IDEXRouter.WETH() (#74) is not in mixedCase
Function MegaETH.setTxLimit_Base1000(uint256) (#440-443) is not in mixedCase
Function MegaETH.setWalletLimit_Base1000(uint256) (#445-448) is not in mixedCase
Parameter MegaETH.ownerRemoveLPPercent(uint8).LPPercent (#467) is not in mixedCase
Parameter MegaETH.ownerLockLP(uint256)._days (#477) is not in mixedCase
Parameter MegaETH.ownerExtendLPLock(uint256)._days (#483) is not in mixedCase
Parameter MegaETH.setFees(uint256,uint256,uint256)._liquidityFee (#501) is not in mixedCase
Parameter MegaETH.setFees(uint256,uint256,uint256)._marketingFee (#501) is not in mixedCase
Parameter MegaETH.setFees(uint256,uint256,uint256)._lotteryFee (#501) is not in mixedCase
Parameter MegaETH.setFeeReceivers(address)._marketingFeeReceiver (#509) is not in mixedCase
Parameter MegaETH.setSwapBackSettings(bool,uint256)._enabled (#513) is not in mixedCase
Parameter MegaETH.setSwapBackSettings(bool,uint256)._amount (#513) is not in mixedCase
Parameter MegaETH.setTargetLiquidity(uint256,uint256)._target (#518) is not in mixedCase
Parameter MegaETH.setTargetLiquidity(uint256,uint256)._denominator (#518) is not in mixedCase
Function MegaETH.ClearStuckBalance() (#542-545) is not in mixedCase
Parameter MegaETH.transferForeignToken(address)._token (#547) is not in mixedCase
Variable MegaETH.RWRD (#131) is not in mixedCase
Variable MegaETH.DEAD (#132) is not in mixedCase
Constant MegaETH._name (#134) is not in UPPER_CASE_WITH_UNDERSCORES
Constant MegaETH._symbol (#135) is not in UPPER_CASE_WITH_UNDERSCORES
Constant MegaETH._decimals (#136) is not in UPPER_CASE_WITH_UNDERSCORES
Variable MegaETH._totalSupply (#138) is not in mixedCase
Variable MegaETH._maxTxAmount (#139) is not in mixedCase
Variable MegaETH._maxWallet (#140) is not in mixedCase
Variable MegaETH._balances (#142) is not in mixedCase
Variable MegaETH._allowances (#143) is not in mixedCase
Variable MegaETH._removingLiquidity (#167) is not in mixedCase
Variable MegaETH._addingLiquidity (#168) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Reentrancy in MegaETH.swapBack() (#342-371):
External calls:
- address(marketingFeeReceiver).transfer(amountBNBMarketing) (#368)
State variables written after the call(s):
- totalLotteryBNB += amountBNBLottery (#369)
Reentrancy in MegaETH.swapBack() (#342-371):
External calls:
- address(marketingFeeReceiver).transfer(amountBNBMarketing) (#368)
External calls sending eth:
- address(marketingFeeReceiver).transfer(amountBNBMarketing) (#368)
- addLiquidity(amountToLiquify,amountBNBLiquidity) (#370)
- router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
State variables written after the call(s):
- addLiquidity(amountToLiquify,amountBNBLiquidity) (#370)
- _addingLiquidity = true (#375)
- _addingLiquidity = false (#386)
- addLiquidity(amountToLiquify,amountBNBLiquidity) (#370)
- totalLPBNB += amountWei (#374)
Reentrancy in MegaETH.transferIncluded(address,address,uint256) (#258-280):
External calls:
- swapBack() (#267)
- address(marketingFeeReceiver).transfer(amountBNBMarketing) (#368)
External calls sending eth:
- swapBack() (#267)
- router.addLiquidityETH{value: amountWei}(address(this),tokenAmount,0,0,address(this),block.timestamp) (#376-385)
- address(marketingFeeReceiver).transfer(amountBNBMarketing) (#368)
- sendLotteryReward() (#268)
- router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(0,path,winningAddress,block.timestamp) (#411)
State variables written after the call(s):
- _balances[sender] = _balances[sender] - (amount) (#270)
- amountReceived = takeFee(sender,amount) (#272)
- _balances[address(this)] = _balances[address(this)] + (feeAmount) (#321)
- _balances[recipient] = _balances[recipient] + (amountReceived) (#274)
- sendLotteryReward() (#268)
- heldByHolder[holders[rand]].paidLottery += amountWei (#425)
- setHolder(sender,_balances[sender]) (#276)
- heldByHolder[holder].amount = amount (#304)
- setHolder(recipient,_balances[recipient]) (#277)
- heldByHolder[holder].amount = amount (#304)
- setHolder(sender,_balances[sender]) (#276)
- holderIndexes[holder] = holders.length (#308)
- holderIndexes[holders[holders.length - 1]] = holderIndexes[holder] (#314)
- setHolder(recipient,_balances[recipient]) (#277)
- holderIndexes[holder] = holders.length (#308)
- holderIndexes[holders[holders.length - 1]] = holderIndexes[holder] (#314)
- setHolder(sender,_balances[sender]) (#276)
- holders[holderIndexes[holder]] = holders[holders.length - 1] (#313)
- holders.push(holder) (#309)
- holders.pop() (#315)
- setHolder(recipient,_balances[recipient]) (#277)
- holders[holderIndexes[holder]] = holders[holders.length - 1] (#313)
- holders.push(holder) (#309)
- holders.pop() (#315)
- sendLotteryReward() (#268)
- lastLottery = block.timestamp (#426)
- sendLotteryReward() (#268)
- totalLotteryBNB -= amountWei (#424)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#322)
- amountReceived = takeFee(sender,amount) (#272)
- Transfer(sender,recipient,amountReceived) (#279)
Apply the check-effects-interactions pattern.
Additional information: link
Variable IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#79) is too similar to IDEXRouter.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#80)
Prevent variables from having similar names.
Additional information: link
MegaETH.slitherConstructorVariables() (#129-553) uses literals with too many digits:
- DEAD = 0x000000000000000000000000000000000000dEaD (#132)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
MegaETH.DEAD (#132) should be constant
MegaETH._dexRouter (#182) should be constant
MegaETH._nonce (#180) should be constant
MegaETH._totalSupply (#138) should be constant
MegaETH.launchedAt (#184) should be constant
MegaETH.launchedAtTimestamp (#185) should be constant
Add the constant attributes to state variables that never change.
Additional information: link
transferOwnership(address) should be declared external:
- Ownable.transferOwnership(address) (#38-42)
getUnlockTime() should be declared external:
- Ownable.getUnlockTime() (#44-46)
renounceOwnership() should be declared external:
- Ownable.renounceOwnership() (#48-51)
OwnershipLock(uint256) should be declared external:
- Ownable.OwnershipLock(uint256) (#53-58)
OwnershipUnlock() should be declared external:
- Ownable.OwnershipUnlock() (#60-65)
ownerCreateLP() should be declared external:
- MegaETH.ownerCreateLP() (#451-457)
ownerReleaseAllLP() should be declared external:
- MegaETH.ownerReleaseAllLP() (#459-465)
ownerRemoveLPPercent(uint8) should be declared external:
- MegaETH.ownerRemoveLPPercent(uint8) (#467-474)
ownerLockLP(uint256) should be declared external:
- MegaETH.ownerLockLP(uint256) (#477-481)
ownerExtendLPLock(uint256) should be declared external:
- MegaETH.ownerExtendLPLock(uint256) (#483-487)
isOverLiquified(uint256,uint256) should be declared external:
- MegaETH.isOverLiquified(uint256,uint256) (#531-533)
transferForeignToken(address) should be declared external:
- MegaETH.transferForeignToken(address) (#547-551)
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.
Number of Binance Smart Chain (BSC) token holders is low.
Token is deployed only at one blockchain
Token has only one trading pair
Unable to find PancakeSwap trading pair to compute liquidity.
Unable to find PancakeSwap trading pair to compute volume.
Unable to find PancakeSwap trading pair to compute number of swaps.
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