🚗Optimus(擎天柱)
擎天柱,又称“特斯拉机器人”(Tesla Bot),是马斯克在去年8月19日第一次特斯拉AI日活动上推出的新概念。机器人研发已被马斯克“钦点”为今年特斯拉的首要任务!并且马斯克确定擎天柱机器人会在2022年9月30日面世,2023年开始生产!
optimus.addLiquidity(uint256,uint256) (#812-825) sends eth to arbitrary user
Dangerous calls:
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in optimus._transfer(address,address,uint256) (#705-759):
External calls:
- swapAndLiquify(contractTokenBalance) (#733)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#801-807)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#733)
- recipient.transfer(amount) (#653)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#736)
- finalAmount = takeFee(sender,recipient,amount) (#747)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#839)
- _balances[recipient] = _balances[recipient].add(finalAmount) (#753)
- addBot(recipient) (#744)
- _isbclisted[recipient] = true (#694)
Apply the check-effects-interactions pattern.
Additional information: link
Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
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.
Contract ownership is not renounced (belongs to a wallet)
optimus._transfer(address,address,uint256) (#705-759) performs a multiplication on the result of a division:
-_sellReserveFeeAmount = amount.div(100).mul(_sellReserveFee) (#718)
Consider ordering multiplication before division.
Additional information: link
optimus.addLiquidity(uint256,uint256) (#812-825) ignores return value by uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
Ensure that all the return values of the function calls are used.
Additional information: link
optimus.allowance(address,address).owner (#535) shadows:
- Ownable.owner() (#162-164) (function)
optimus._approve(address,address,uint256).owner (#558) shadows:
- Ownable.owner() (#162-164) (function)
Rename the local variables that shadow another component.
Additional information: link
optimus.setBuyTaxes(uint256,uint256,uint256) (#583-589) should emit an event for:
- _totalTaxIfBuying = _buyLiquidityFee.add(_buyMarketingFee).add(_buyTeamFee) (#588)
optimus.setSellTaxes(uint256,uint256,uint256) (#591-597) should emit an event for:
- _totalTaxIfSelling = _sellLiquidityFee.add(_sellMarketingFee).add(_sellTeamFee) (#596)
optimus.setDistributionSettings(uint256,uint256,uint256) (#599-605) should emit an event for:
- _liquidityShare = newLiquidityShare (#600)
- _teamShare = newTeamShare (#602)
- _totalDistributionShares = _liquidityShare.add(_marketingShare).add(_teamShare) (#604)
optimus.setMaxTxAmount(uint256) (#607-609) should emit an event for:
- _maxTxAmount = maxTxAmount (#608)
optimus.setWalletLimit(uint256) (#619-621) should emit an event for:
- _walletMax = newLimit (#620)
optimus.setNumTokensBeforeSwap(uint256) (#623-625) should emit an event for:
- minimumTokensBeforeSwap = newLimit (#624)
optimus.setKillBlock(uint256) (#697-699) should emit an event for:
- killblock = num (#698)
Emit an event for critical parameter changes.
Additional information: link
optimus.setMarketingWalletAddress(address).newAddress (#627) lacks a zero-check on :
- marketingWalletAddress = address(newAddress) (#628)
optimus.setTeamWalletAddress(address).newAddress (#631) lacks a zero-check on :
- teamWalletAddress = address(newAddress) (#632)
optimus.setLiquidityWalletAddress(address).newAddress (#635) lacks a zero-check on :
- liquidityAddress = address(newAddress) (#636)
Check that the address is not zero.
Additional information: link
Reentrancy in optimus.changeRouterVersion(address) (#656-673):
External calls:
- newPairAddress = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#664-665)
State variables written after the call(s):
- isMarketPair[address(uniswapPair)] = true (#672)
- isWalletLimitExempt[address(uniswapPair)] = true (#671)
- uniswapPair = newPairAddress (#668)
- uniswapV2Router = _uniswapV2Router (#669)
Reentrancy in optimus.constructor() (#485-513):
External calls:
- uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#489-490)
State variables written after the call(s):
- _allowances[address(this)][address(uniswapV2Router)] = _totalSupply (#493)
- _balances[_msgSender()] = _totalSupply (#511)
- _totalDistributionShares = _liquidityShare.add(_marketingShare).add(_teamShare) (#500)
- _totalTaxIfBuying = _buyLiquidityFee.add(_buyMarketingFee).add(_buyTeamFee) (#498)
- _totalTaxIfSelling = _sellLiquidityFee.add(_sellMarketingFee).add(_sellTeamFee) (#499)
- isExcludedFromFee[owner()] = true (#495)
- isExcludedFromFee[address(this)] = true (#496)
- isMarketPair[address(uniswapPair)] = true (#509)
- isTxLimitExempt[owner()] = true (#506)
- isTxLimitExempt[address(this)] = true (#507)
- isWalletLimitExempt[owner()] = true (#502)
- isWalletLimitExempt[address(uniswapPair)] = true (#503)
- isWalletLimitExempt[address(this)] = true (#504)
- uniswapV2Router = _uniswapV2Router (#492)
Reentrancy in optimus.swapAndLiquify(uint256) (#768-790):
External calls:
- swapTokensForEth(tokensForSwap) (#773)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#801-807)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#789)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#783)
- recipient.transfer(amount) (#653)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#786)
- recipient.transfer(amount) (#653)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#789)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
State variables written after the call(s):
- addLiquidity(tokensForLP,amountBNBLiquidity) (#789)
- _allowances[owner][spender] = amount (#562)
Reentrancy in optimus.transferFrom(address,address,uint256) (#683-687):
External calls:
- _transfer(sender,recipient,amount) (#684)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#801-807)
External calls sending eth:
- _transfer(sender,recipient,amount) (#684)
- recipient.transfer(amount) (#653)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
State variables written after the call(s):
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#685)
- _allowances[owner][spender] = amount (#562)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in optimus._transfer(address,address,uint256) (#705-759):
External calls:
- swapAndLiquify(contractTokenBalance) (#733)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#801-807)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#733)
- recipient.transfer(amount) (#653)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#840)
- finalAmount = takeFee(sender,recipient,amount) (#747)
- Transfer(sender,recipient,finalAmount) (#755)
Reentrancy in optimus.constructor() (#485-513):
External calls:
- uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#489-490)
Event emitted after the call(s):
- Transfer(address(0),_msgSender(),_totalSupply) (#512)
Reentrancy in optimus.swapAndLiquify(uint256) (#768-790):
External calls:
- swapTokensForEth(tokensForSwap) (#773)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#801-807)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#789)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#783)
- recipient.transfer(amount) (#653)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#786)
- recipient.transfer(amount) (#653)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#789)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#563)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#789)
Reentrancy in optimus.swapTokensForEth(uint256) (#792-810):
External calls:
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#801-807)
Event emitted after the call(s):
- SwapTokensForETH(tokenAmount,path) (#809)
Reentrancy in optimus.transferFrom(address,address,uint256) (#683-687):
External calls:
- _transfer(sender,recipient,amount) (#684)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#801-807)
External calls sending eth:
- _transfer(sender,recipient,amount) (#684)
- recipient.transfer(amount) (#653)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#563)
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#685)
Apply the check-effects-interactions pattern.
Additional information: link
Ownable.unlock() (#197-202) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(block.timestamp > _lockTime,Contract is locked until 7 days) (#199)
Avoid relying on block.timestamp.
Additional information: link
Address.isContract(address) (#93-102) uses assembly
- INLINE ASM (#100)
Address._functionCallWithValue(address,bytes,uint256,string) (#129-146) uses assembly
- INLINE ASM (#138-141)
Do not use evm assembly.
Additional information: link
Address._functionCallWithValue(address,bytes,uint256,string) (#129-146) is never used and should be removed
Address.functionCall(address,bytes) (#112-114) is never used and should be removed
Address.functionCall(address,bytes,string) (#116-118) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256) (#120-122) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256,string) (#124-127) is never used and should be removed
Address.isContract(address) (#93-102) is never used and should be removed
Address.sendValue(address,uint256) (#104-110) is never used and should be removed
Context._msgData() (#20-23) is never used and should be removed
SafeMath.mod(uint256,uint256) (#81-83) is never used and should be removed
SafeMath.mod(uint256,uint256,string) (#85-88) is never used and should be removed
Remove unused functions.
Additional information: link
optimus._totalSupply (#449) is set pre-construction with a non-constant function or state variable:
- 1000000000000000 * 10 ** _decimals
optimus._maxTxAmount (#450) is set pre-construction with a non-constant function or state variable:
- 1000000000000000 * 10 ** _decimals
optimus._walletMax (#451) is set pre-construction with a non-constant function or state variable:
- 1000000000000000 * 10 ** _decimals
optimus.minimumTokensBeforeSwap (#452) is set pre-construction with a non-constant function or state variable:
- 1000000000000000 * 5 ** _decimals
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
solc-0.8.14 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 Address.sendValue(address,uint256) (#104-110):
- (success) = recipient.call{value: amount}() (#108)
Low level call in Address._functionCallWithValue(address,bytes,uint256,string) (#129-146):
- (success,returndata) = target.call{value: weiValue}(data) (#132)
Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence
Additional information: link
Function IUniswapV2Pair.DOMAIN_SEPARATOR() (#236) is not in mixedCase
Function IUniswapV2Pair.PERMIT_TYPEHASH() (#237) is not in mixedCase
Function IUniswapV2Pair.MINIMUM_LIQUIDITY() (#253) is not in mixedCase
Function IUniswapV2Router01.WETH() (#272) is not in mixedCase
Contract optimus (#405-847) is not in CapWords
Function optimus.Launch() (#566-569) is not in mixedCase
Parameter optimus.setSwapAndLiquifyEnabled(bool)._enabled (#639) is not in mixedCase
Variable optimus._balances (#422) is not in mixedCase
Variable optimus._buyLiquidityFee (#431) is not in mixedCase
Variable optimus._buyMarketingFee (#432) is not in mixedCase
Variable optimus._buyTeamFee (#433) is not in mixedCase
Variable optimus._sellLiquidityFee (#435) is not in mixedCase
Variable optimus._sellMarketingFee (#436) is not in mixedCase
Variable optimus._sellTeamFee (#437) is not in mixedCase
Variable optimus._sellReserveFee (#439) is not in mixedCase
Variable optimus._liquidityShare (#441) is not in mixedCase
Variable optimus._marketingShare (#442) is not in mixedCase
Variable optimus._teamShare (#443) is not in mixedCase
Variable optimus._totalTaxIfBuying (#445) is not in mixedCase
Variable optimus._totalTaxIfSelling (#446) is not in mixedCase
Variable optimus._totalDistributionShares (#447) is not in mixedCase
Variable optimus._maxTxAmount (#450) is not in mixedCase
Variable optimus._walletMax (#451) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Redundant expression "this (#21)" inContext (#14-24)
Remove redundant statements if they congest code but offer no value.
Additional information: link
Reentrancy in optimus._transfer(address,address,uint256) (#705-759):
External calls:
- swapAndLiquify(contractTokenBalance) (#733)
- recipient.transfer(amount) (#653)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#733)
- recipient.transfer(amount) (#653)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#736)
- finalAmount = takeFee(sender,recipient,amount) (#747)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#839)
- _balances[recipient] = _balances[recipient].add(finalAmount) (#753)
- addBot(recipient) (#744)
- _isbclisted[recipient] = true (#694)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#840)
- finalAmount = takeFee(sender,recipient,amount) (#747)
- Transfer(sender,recipient,finalAmount) (#755)
Reentrancy in optimus.swapAndLiquify(uint256) (#768-790):
External calls:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#783)
- recipient.transfer(amount) (#653)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#786)
- recipient.transfer(amount) (#653)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#783)
- recipient.transfer(amount) (#653)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#786)
- recipient.transfer(amount) (#653)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#789)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
State variables written after the call(s):
- addLiquidity(tokensForLP,amountBNBLiquidity) (#789)
- _allowances[owner][spender] = amount (#562)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#563)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#789)
Reentrancy in optimus.transferFrom(address,address,uint256) (#683-687):
External calls:
- _transfer(sender,recipient,amount) (#684)
- recipient.transfer(amount) (#653)
External calls sending eth:
- _transfer(sender,recipient,amount) (#684)
- recipient.transfer(amount) (#653)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,liquidityAddress,block.timestamp) (#817-824)
State variables written after the call(s):
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#685)
- _allowances[owner][spender] = amount (#562)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#563)
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#685)
Apply the check-effects-interactions pattern.
Additional information: link
Variable IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#277) is too similar to IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#278)
Prevent variables from having similar names.
Additional information: link
optimus.slitherConstructorVariables() (#405-847) uses literals with too many digits:
- deadAddress = 0x000000000000000000000000000000000000dEaD (#420)
optimus.slitherConstructorVariables() (#405-847) uses literals with too many digits:
- _totalSupply = 1000000000000000 * 10 ** _decimals (#449)
optimus.slitherConstructorVariables() (#405-847) uses literals with too many digits:
- _maxTxAmount = 1000000000000000 * 10 ** _decimals (#450)
optimus.slitherConstructorVariables() (#405-847) uses literals with too many digits:
- _walletMax = 1000000000000000 * 10 ** _decimals (#451)
optimus.slitherConstructorVariables() (#405-847) uses literals with too many digits:
- minimumTokensBeforeSwap = 1000000000000000 * 5 ** _decimals (#452)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
optimus._decimals (#412) should be constant
optimus._name (#410) should be constant
optimus._sellReserveFee (#439) should be constant
optimus._symbol (#411) should be constant
Add the constant attributes to state variables that never change.
Additional information: link
waiveOwnership() should be declared external:
- Ownable.waiveOwnership() (#171-174)
transferOwnership(address) should be declared external:
- Ownable.transferOwnership(address) (#176-180)
getUnlockTime() should be declared external:
- Ownable.getUnlockTime() (#182-184)
getTime() should be declared external:
- Ownable.getTime() (#186-188)
lock(uint256) should be declared external:
- Ownable.lock(uint256) (#190-195)
unlock() should be declared external:
- Ownable.unlock() (#197-202)
name() should be declared external:
- optimus.name() (#515-517)
symbol() should be declared external:
- optimus.symbol() (#519-521)
decimals() should be declared external:
- optimus.decimals() (#523-525)
totalSupply() should be declared external:
- optimus.totalSupply() (#527-529)
allowance(address,address) should be declared external:
- optimus.allowance(address,address) (#535-537)
increaseAllowance(address,uint256) should be declared external:
- optimus.increaseAllowance(address,uint256) (#539-542)
decreaseAllowance(address,uint256) should be declared external:
- optimus.decreaseAllowance(address,uint256) (#544-547)
minimumTokensBeforeSwapAmount() should be declared external:
- optimus.minimumTokensBeforeSwapAmount() (#549-551)
approve(address,uint256) should be declared external:
- optimus.approve(address,uint256) (#553-556)
Launch() should be declared external:
- optimus.Launch() (#566-569)
setMarketPairStatus(address,bool) should be declared external:
- optimus.setMarketPairStatus(address,bool) (#571-573)
setIsExcludedFromFee(address,bool) should be declared external:
- optimus.setIsExcludedFromFee(address,bool) (#579-581)
setSwapAndLiquifyEnabled(bool) should be declared external:
- optimus.setSwapAndLiquifyEnabled(bool) (#639-642)
setSwapAndLiquifyByLimitOnly(bool) should be declared external:
- optimus.setSwapAndLiquifyByLimitOnly(bool) (#644-646)
getCirculatingSupply() should be declared external:
- optimus.getCirculatingSupply() (#648-650)
changeRouterVersion(address) should be declared external:
- optimus.changeRouterVersion(address) (#656-673)
transfer(address,uint256) should be declared external:
- optimus.transfer(address,uint256) (#678-681)
transferFrom(address,address,uint256) should be declared external:
- optimus.transferFrom(address,address,uint256) (#683-687)
isbcList(address) should be declared external:
- optimus.isbcList(address) (#689-691)
setKillBlock(uint256) should be declared external:
- optimus.setKillBlock(uint256) (#697-699)
writebcList(address,bool) should be declared external:
- optimus.writebcList(address,bool) (#701-703)
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
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 Blog account (Reddit or Medium)
Unable to find Youtube account
Unable to find Discord account