Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
YUAN.addLiquidity(uint256,uint256) (#778-791) sends eth to arbitrary user
Dangerous calls:
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in YUAN._transfer(address,address,uint256) (#676-725):
External calls:
- swapAndLiquify(contractTokenBalance) (#709)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#767-773)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#709)
- recipient.transfer(amount) (#640)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#712)
- _balances[recipient] = _balances[recipient].add(finalAmount) (#720)
- finalAmount = takeFee(sender,recipient,amount) (#714-715)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#805)
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.
YUAN.addLiquidity(uint256,uint256) (#778-791) ignores return value by uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
Ensure that all the return values of the function calls are used.
Additional information: link
YUAN.allowance(address,address).owner (#531) shadows:
- Ownable.owner() (#160-162) (function)
YUAN._approve(address,address,uint256).owner (#554) shadows:
- Ownable.owner() (#160-162) (function)
Rename the local variables that shadow another component.
Additional information: link
YUAN.setBuyTaxes(uint256,uint256,uint256) (#574-580) should emit an event for:
- _buyLiquidityFee = newLiquidityTax (#575)
- _buyMarketingFee = newMarketingTax (#576)
- _buyTeamFee = newTeamTax (#577)
- _totalTaxIfBuying = _buyLiquidityFee.add(_buyMarketingFee).add(_buyTeamFee) (#579)
YUAN.setSellTaxes(uint256,uint256,uint256) (#582-588) should emit an event for:
- _sellLiquidityFee = newLiquidityTax (#583)
- _sellMarketingFee = newMarketingTax (#584)
- _sellTeamFee = newTeamTax (#585)
- _totalTaxIfSelling = _sellLiquidityFee.add(_sellMarketingFee).add(_sellTeamFee) (#587)
YUAN.setDistributionSettings(uint256,uint256,uint256) (#590-596) should emit an event for:
- _liquidityShare = newLiquidityShare (#591)
- _teamShare = newTeamShare (#593)
- _totalDistributionShares = _liquidityShare.add(_marketingShare).add(_teamShare) (#595)
YUAN.setMaxTxAmount(uint256) (#598-600) should emit an event for:
- _maxTxAmount = maxTxAmount (#599)
YUAN.setWalletLimit(uint256) (#610-612) should emit an event for:
- _walletMax = newLimit (#611)
YUAN.setNumTokensBeforeSwap(uint256) (#614-616) should emit an event for:
- minimumTokensBeforeSwap = newLimit (#615)
YUAN.UPfeeTXtime(uint256) (#820-822) should emit an event for:
- feeTXtime = _feeTXtime (#821)
YUAN.UPendtime(uint256) (#824-826) should emit an event for:
- endtime = _endtime (#825)
Emit an event for critical parameter changes.
Additional information: link
YUAN.setMarketingWalletAddress(address).newAddress (#618) lacks a zero-check on :
- marketingWalletAddress = address(newAddress) (#619)
YUAN.setTeamWalletAddress(address).newAddress (#622) lacks a zero-check on :
- teamWalletAddress = address(newAddress) (#623)
Check that the address is not zero.
Additional information: link
Reentrancy in YUAN.changeRouterVersion(address) (#643-660):
External calls:
- newPairAddress = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#651-652)
State variables written after the call(s):
- isMarketPair[address(uniswapPair)] = true (#659)
- isWalletLimitExempt[address(uniswapPair)] = true (#658)
- uniswapPair = newPairAddress (#655)
- uniswapV2Router = _uniswapV2Router (#656)
Reentrancy in YUAN.constructor() (#481-509):
External calls:
- uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#485-486)
State variables written after the call(s):
- _allowances[address(this)][address(uniswapV2Router)] = _totalSupply (#489)
- _balances[_msgSender()] = _totalSupply (#507)
- _totalDistributionShares = _liquidityShare.add(_marketingShare).add(_teamShare) (#496)
- _totalTaxIfBuying = _buyLiquidityFee.add(_buyMarketingFee).add(_buyTeamFee) (#494)
- _totalTaxIfSelling = _sellLiquidityFee.add(_sellMarketingFee).add(_sellTeamFee) (#495)
- isExcludedFromFee[owner()] = true (#491)
- isExcludedFromFee[address(this)] = true (#492)
- isMarketPair[address(uniswapPair)] = true (#505)
- isTxLimitExempt[owner()] = true (#502)
- isTxLimitExempt[address(this)] = true (#503)
- isWalletLimitExempt[owner()] = true (#498)
- isWalletLimitExempt[address(uniswapPair)] = true (#499)
- isWalletLimitExempt[address(this)] = true (#500)
- uniswapV2Router = _uniswapV2Router (#488)
Reentrancy in YUAN.swapAndLiquify(uint256) (#734-756):
External calls:
- swapTokensForEth(tokensForSwap) (#739)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#767-773)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#755)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#749)
- recipient.transfer(amount) (#640)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#752)
- recipient.transfer(amount) (#640)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#755)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
State variables written after the call(s):
- addLiquidity(tokensForLP,amountBNBLiquidity) (#755)
- _allowances[owner][spender] = amount (#558)
Reentrancy in YUAN.transferFrom(address,address,uint256) (#670-674):
External calls:
- _transfer(sender,recipient,amount) (#671)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#767-773)
External calls sending eth:
- _transfer(sender,recipient,amount) (#671)
- recipient.transfer(amount) (#640)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
State variables written after the call(s):
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#672)
- _allowances[owner][spender] = amount (#558)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in YUAN._transfer(address,address,uint256) (#676-725):
External calls:
- swapAndLiquify(contractTokenBalance) (#709)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#767-773)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#709)
- recipient.transfer(amount) (#640)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#806)
- finalAmount = takeFee(sender,recipient,amount) (#714-715)
- Transfer(sender,recipient,finalAmount) (#722)
Reentrancy in YUAN.constructor() (#481-509):
External calls:
- uniswapPair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#485-486)
Event emitted after the call(s):
- Transfer(address(0),_msgSender(),_totalSupply) (#508)
Reentrancy in YUAN.swapAndLiquify(uint256) (#734-756):
External calls:
- swapTokensForEth(tokensForSwap) (#739)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#767-773)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#755)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#749)
- recipient.transfer(amount) (#640)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#752)
- recipient.transfer(amount) (#640)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#755)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#559)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#755)
Reentrancy in YUAN.swapTokensForEth(uint256) (#758-776):
External calls:
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#767-773)
Event emitted after the call(s):
- SwapTokensForETH(tokenAmount,path) (#775)
Reentrancy in YUAN.transferFrom(address,address,uint256) (#670-674):
External calls:
- _transfer(sender,recipient,amount) (#671)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#767-773)
External calls sending eth:
- _transfer(sender,recipient,amount) (#671)
- recipient.transfer(amount) (#640)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#559)
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#672)
Apply the check-effects-interactions pattern.
Additional information: link
Ownable.unlock() (#195-200) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(block.timestamp > _lockTime,Contract is locked until 7 days) (#197)
YUAN._transfer(address,address,uint256) (#676-725) uses timestamp for comparisons
Dangerous comparisons:
- endtime == 0 (#681)
- endtime > block.timestamp (#684)
Avoid relying on block.timestamp.
Additional information: link
Address.isContract(address) (#91-100) uses assembly
- INLINE ASM (#98)
Address._functionCallWithValue(address,bytes,uint256,string) (#127-144) uses assembly
- INLINE ASM (#136-139)
Do not use evm assembly.
Additional information: link
Address._functionCallWithValue(address,bytes,uint256,string) (#127-144) is never used and should be removed
Address.functionCall(address,bytes) (#110-112) is never used and should be removed
Address.functionCall(address,bytes,string) (#114-116) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256) (#118-120) is never used and should be removed
Address.functionCallWithValue(address,bytes,uint256,string) (#122-125) is never used and should be removed
Address.isContract(address) (#91-100) is never used and should be removed
Address.sendValue(address,uint256) (#102-108) is never used and should be removed
Context._msgData() (#18-21) is never used and should be removed
SafeMath.mod(uint256,uint256) (#79-81) is never used and should be removed
SafeMath.mod(uint256,uint256,string) (#83-86) is never used and should be removed
Remove unused functions.
Additional information: link
YUAN._liquidityShare (#435) is set pre-construction with a non-constant function or state variable:
- _buyLiquidityFee.add(_sellLiquidityFee)
YUAN._marketingShare (#436) is set pre-construction with a non-constant function or state variable:
- _buyMarketingFee.add(_sellMarketingFee)
YUAN._teamShare (#437) is set pre-construction with a non-constant function or state variable:
- _buyTeamFee.add(_sellTeamFee)
YUAN._totalSupply (#443) is set pre-construction with a non-constant function or state variable:
- 100 * 10 ** 4 * 10 ** _decimals
YUAN._maxTxAmount (#444) is set pre-construction with a non-constant function or state variable:
- _totalSupply.div(10)
YUAN._walletMax (#445) is set pre-construction with a non-constant function or state variable:
- _totalSupply.div(10)
YUAN.minimumTokensBeforeSwap (#446) is set pre-construction with a non-constant function or state variable:
- _totalSupply.div(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 Address.sendValue(address,uint256) (#102-108):
- (success) = recipient.call{value: amount}() (#106)
Low level call in Address._functionCallWithValue(address,bytes,uint256,string) (#127-144):
- (success,returndata) = target.call{value: weiValue}(data) (#130)
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() (#234) is not in mixedCase
Function IUniswapV2Pair.PERMIT_TYPEHASH() (#235) is not in mixedCase
Function IUniswapV2Pair.MINIMUM_LIQUIDITY() (#251) is not in mixedCase
Function IUniswapV2Router01.WETH() (#270) is not in mixedCase
Parameter YUAN.setSwapAndLiquifyEnabled(bool)._enabled (#626) is not in mixedCase
Parameter YUAN.setblocklist(address)._account (#812) is not in mixedCase
Function YUAN.UPfeeTXtime(uint256) (#820-822) is not in mixedCase
Parameter YUAN.UPfeeTXtime(uint256)._feeTXtime (#820) is not in mixedCase
Function YUAN.UPendtime(uint256) (#824-826) is not in mixedCase
Parameter YUAN.UPendtime(uint256)._endtime (#824) is not in mixedCase
Variable YUAN._balances (#416) is not in mixedCase
Variable YUAN._buyLiquidityFee (#427) is not in mixedCase
Variable YUAN._buyMarketingFee (#428) is not in mixedCase
Variable YUAN._buyTeamFee (#429) is not in mixedCase
Variable YUAN._sellLiquidityFee (#431) is not in mixedCase
Variable YUAN._sellMarketingFee (#432) is not in mixedCase
Variable YUAN._sellTeamFee (#433) is not in mixedCase
Variable YUAN._liquidityShare (#435) is not in mixedCase
Variable YUAN._marketingShare (#436) is not in mixedCase
Variable YUAN._teamShare (#437) is not in mixedCase
Variable YUAN._totalTaxIfBuying (#439) is not in mixedCase
Variable YUAN._totalTaxIfSelling (#440) is not in mixedCase
Variable YUAN._totalDistributionShares (#441) is not in mixedCase
Variable YUAN._maxTxAmount (#444) is not in mixedCase
Variable YUAN._walletMax (#445) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Redundant expression "this (#19)" inContext (#12-22)
Remove redundant statements if they congest code but offer no value.
Additional information: link
Reentrancy in YUAN._transfer(address,address,uint256) (#676-725):
External calls:
- swapAndLiquify(contractTokenBalance) (#709)
- recipient.transfer(amount) (#640)
External calls sending eth:
- swapAndLiquify(contractTokenBalance) (#709)
- recipient.transfer(amount) (#640)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
State variables written after the call(s):
- _balances[sender] = _balances[sender].sub(amount,Insufficient Balance) (#712)
- _balances[recipient] = _balances[recipient].add(finalAmount) (#720)
- finalAmount = takeFee(sender,recipient,amount) (#714-715)
- _balances[address(this)] = _balances[address(this)].add(feeAmount) (#805)
Event emitted after the call(s):
- Transfer(sender,address(this),feeAmount) (#806)
- finalAmount = takeFee(sender,recipient,amount) (#714-715)
- Transfer(sender,recipient,finalAmount) (#722)
Reentrancy in YUAN.swapAndLiquify(uint256) (#734-756):
External calls:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#749)
- recipient.transfer(amount) (#640)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#752)
- recipient.transfer(amount) (#640)
External calls sending eth:
- transferToAddressETH(marketingWalletAddress,amountBNBMarketing) (#749)
- recipient.transfer(amount) (#640)
- transferToAddressETH(teamWalletAddress,amountBNBTeam) (#752)
- recipient.transfer(amount) (#640)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#755)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
State variables written after the call(s):
- addLiquidity(tokensForLP,amountBNBLiquidity) (#755)
- _allowances[owner][spender] = amount (#558)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#559)
- addLiquidity(tokensForLP,amountBNBLiquidity) (#755)
Reentrancy in YUAN.transferFrom(address,address,uint256) (#670-674):
External calls:
- _transfer(sender,recipient,amount) (#671)
- recipient.transfer(amount) (#640)
External calls sending eth:
- _transfer(sender,recipient,amount) (#671)
- recipient.transfer(amount) (#640)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,owner(),block.timestamp) (#783-790)
State variables written after the call(s):
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#672)
- _allowances[owner][spender] = amount (#558)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#559)
- _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,ERC20: transfer amount exceeds allowance)) (#672)
Apply the check-effects-interactions pattern.
Additional information: link
Variable IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#275) is too similar to IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#276)
Prevent variables from having similar names.
Additional information: link
YUAN.slitherConstructorVariables() (#403-828) uses literals with too many digits:
- deadAddress = 0x000000000000000000000000000000000000dEaD (#414)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
YUAN._decimals (#410) should be constant
YUAN._name (#408) should be constant
YUAN._symbol (#409) should be constant
Add the constant attributes to state variables that never change.
Additional information: link
waiveOwnership() should be declared external:
- Ownable.waiveOwnership() (#169-172)
transferOwnership(address) should be declared external:
- Ownable.transferOwnership(address) (#174-178)
getUnlockTime() should be declared external:
- Ownable.getUnlockTime() (#180-182)
getTime() should be declared external:
- Ownable.getTime() (#184-186)
lock(uint256) should be declared external:
- Ownable.lock(uint256) (#188-193)
unlock() should be declared external:
- Ownable.unlock() (#195-200)
name() should be declared external:
- YUAN.name() (#511-513)
symbol() should be declared external:
- YUAN.symbol() (#515-517)
decimals() should be declared external:
- YUAN.decimals() (#519-521)
totalSupply() should be declared external:
- YUAN.totalSupply() (#523-525)
allowance(address,address) should be declared external:
- YUAN.allowance(address,address) (#531-533)
increaseAllowance(address,uint256) should be declared external:
- YUAN.increaseAllowance(address,uint256) (#535-538)
decreaseAllowance(address,uint256) should be declared external:
- YUAN.decreaseAllowance(address,uint256) (#540-543)
minimumTokensBeforeSwapAmount() should be declared external:
- YUAN.minimumTokensBeforeSwapAmount() (#545-547)
approve(address,uint256) should be declared external:
- YUAN.approve(address,uint256) (#549-552)
setMarketPairStatus(address,bool) should be declared external:
- YUAN.setMarketPairStatus(address,bool) (#562-564)
setIsExcludedFromFee(address,bool) should be declared external:
- YUAN.setIsExcludedFromFee(address,bool) (#570-572)
setSwapAndLiquifyEnabled(bool) should be declared external:
- YUAN.setSwapAndLiquifyEnabled(bool) (#626-629)
setSwapAndLiquifyByLimitOnly(bool) should be declared external:
- YUAN.setSwapAndLiquifyByLimitOnly(bool) (#631-633)
getCirculatingSupply() should be declared external:
- YUAN.getCirculatingSupply() (#635-637)
changeRouterVersion(address) should be declared external:
- YUAN.changeRouterVersion(address) (#643-660)
transfer(address,uint256) should be declared external:
- YUAN.transfer(address,uint256) (#665-668)
transferFrom(address,address,uint256) should be declared external:
- YUAN.transferFrom(address,address,uint256) (#670-674)
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 Twitter account
Telegram account has relatively few subscribers
Unable to find Blog account (Reddit or Medium)
Unable to find Youtube account
Unable to find Discord account