Unable to find manual contract audit (e.g. Certik, PeckShield, Solidity...)
TopGain.addLiquidity(uint256,uint256) (#1872-1886) sends eth to arbitrary user
Dangerous calls:
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
Reentrancy in TopGain._transfer(address,address,uint256) (#1590-1707):
External calls:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendDividends(sellTokens) (#1649)
- success = IERC20(BUSD).transfer(address(dividendTracker),dividends) (#1864)
- dividendTracker.distributeBUSDDividends(dividends) (#1867)
- uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1832-1838)
External calls sending eth:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
State variables written after the call(s):
- setBotFees() (#1669)
- BUSDRewardsFee = _previousBUSDRewardsFee * _botIncreaseFee (#1739)
- restoreAllFee() (#1685)
- BUSDRewardsFee = _previousBUSDRewardsFee (#1748)
- super._transfer(from,address(this),fees) (#1678)
- _balances[sender] = _balances[sender].sub(amount,ERC20: transfer amount exceeds balance) (#955)
- _balances[recipient] = _balances[recipient].add(amount) (#956)
- super._transfer(from,to,amount) (#1690)
- _balances[sender] = _balances[sender].sub(amount,ERC20: transfer amount exceeds balance) (#955)
- _balances[recipient] = _balances[recipient].add(amount) (#956)
- setBotFees() (#1669)
- buybackFee = _previousBuybackFee * _botIncreaseFee (#1742)
- restoreAllFee() (#1685)
- buybackFee = _previousBuybackFee (#1751)
- setBotFees() (#1669)
- liquidityFee = _previousLiquidityFee * _botIncreaseFee (#1741)
- restoreAllFee() (#1685)
- liquidityFee = _previousLiquidityFee (#1750)
- setBotFees() (#1669)
- marketingFee = _previousMarketingFee * _botIncreaseFee (#1740)
- restoreAllFee() (#1685)
- marketingFee = _previousMarketingFee (#1749)
- swapping = false (#1652)
- setBotFees() (#1669)
- totalFees = marketingFee.add(BUSDRewardsFee).add(buybackFee).add(liquidityFee) (#1744)
- totalFees += additionalFeeOnSell (#1673)
- totalFees -= additionalFeeOnSell (#1681)
- restoreAllFee() (#1685)
- totalFees = _previousTotalFees (#1753)
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.
Reentrancy in DividendPayingToken._withdrawDividendOfUser(address) (#1176-1192):
External calls:
- success = IERC20(BUSD).transfer(user,_withdrawableDividend) (#1181)
State variables written after the call(s):
- withdrawnDividends[user] = withdrawnDividends[user].sub(_withdrawableDividend) (#1184)
Reentrancy in TopGain.updateDividendTracker(address) (#1417-1433):
External calls:
- newDividendTracker.excludeFromDividends(address(newDividendTracker)) (#1424)
- newDividendTracker.excludeFromDividends(address(this)) (#1425)
- newDividendTracker.excludeFromDividends(owner()) (#1426)
- newDividendTracker.excludeFromDividends(deadWallet) (#1427)
- newDividendTracker.excludeFromDividends(address(uniswapV2Router)) (#1428)
State variables written after the call(s):
- dividendTracker = newDividendTracker (#1432)
Apply the check-effects-interactions pattern.
Additional information: link
TopGain._transfer(address,address,uint256).iterations (#1699) is a local variable never initialized
TopGain._transfer(address,address,uint256).claims (#1699) is a local variable never initialized
TopGain._transfer(address,address,uint256).lastProcessedIndex (#1699) 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
TopGain.claim() (#1570-1572) ignores return value by dividendTracker.processAccount(msg.sender,false) (#1571)
TopGain.claimAddress(address) (#1574-1576) ignores return value by dividendTracker.processAccount(address(claimee),false) (#1575)
TopGain._transfer(address,address,uint256) (#1590-1707) ignores return value by dividendTracker.process(gas) (#1699-1704)
TopGain.addLiquidity(uint256,uint256) (#1872-1886) ignores return value by uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
Ensure that all the return values of the function calls are used.
Additional information: link
DividendPayingToken.constructor(string,string)._name (#1150) shadows:
- ERC20._name (#777) (state variable)
DividendPayingToken.constructor(string,string)._symbol (#1150) shadows:
- ERC20._symbol (#778) (state variable)
DividendPayingToken.dividendOf(address)._owner (#1198) shadows:
- Ownable._owner (#293) (state variable)
DividendPayingToken.withdrawableDividendOf(address)._owner (#1205) shadows:
- Ownable._owner (#293) (state variable)
DividendPayingToken.withdrawnDividendOf(address)._owner (#1212) shadows:
- Ownable._owner (#293) (state variable)
DividendPayingToken.accumulativeDividendOf(address)._owner (#1222) shadows:
- Ownable._owner (#293) (state variable)
Rename the local variables that shadow another component.
Additional information: link
TopGain.setFees(uint256,uint256,uint256,uint256) (#1444-1451) should emit an event for:
- marketingFee = _marketingFee (#1445)
- liquidityFee = _liquidityFee (#1446)
- BUSDRewardsFee = rewardFee (#1447)
- buybackFee = _buybackFee (#1448)
- totalFees = marketingFee.add(BUSDRewardsFee).add(buybackFee).add(liquidityFee) (#1449)
TopGain.setAdditionalFeeOnSell(uint256) (#1453-1456) should emit an event for:
- additionalFeeOnSell = _additionalFeeOnSell (#1455)
TopGain.setSwapTokensAtAmount(uint256) (#1504-1506) should emit an event for:
- swapTokensAtAmount = amount (#1505)
TopGain.setBotSettingTime(uint256) (#1715-1719) should emit an event for:
- timeDetectBotSeconds = _val (#1717)
- timeAntiBot = 60 * _val (#1718)
TopGain.setBotFeeMultiplicator(uint256) (#1725-1728) should emit an event for:
- _botIncreaseFee = _val (#1727)
TopGain.setMaxTransferAmountRate(uint256) (#1757-1760) should emit an event for:
- maxTransferAmountRate = val (#1759)
TopGainDividendTracker.setLastProcessedIndex(uint256) (#1944-1946) should emit an event for:
- lastProcessedIndex = index (#1945)
Emit an event for critical parameter changes.
Additional information: link
Ownable.constructor().msgSender (#301) lacks a zero-check on :
- _owner = msgSender (#302)
TopGain.updateUniswapV2Router(address)._uniswapV2Pair (#1439-1440) lacks a zero-check on :
- uniswapV2Pair = _uniswapV2Pair (#1441)
TopGain.setMarketingWallet(address).wallet (#1477) lacks a zero-check on :
- _marketingWalletAddress = wallet (#1478)
TopGain.setBuybackWallet(address).wallet (#1481) lacks a zero-check on :
- _buybackWalletAddress = wallet (#1482)
Check that the address is not zero.
Additional information: link
DividendPayingToken._withdrawDividendOfUser(address) (#1176-1192) has external calls inside a loop: success = IERC20(BUSD).transfer(user,_withdrawableDividend) (#1181)
Favor pull over push strategy for external calls.
Additional information: link
Variable 'TopGain._transfer(address,address,uint256).claims (#1699)' in TopGain._transfer(address,address,uint256) (#1590-1707) potentially used before declaration: ProcessedDividendTracker(iterations,claims,lastProcessedIndex,true,gas,msg.sender) (#1700)
Variable 'TopGain._transfer(address,address,uint256).iterations (#1699)' in TopGain._transfer(address,address,uint256) (#1590-1707) potentially used before declaration: ProcessedDividendTracker(iterations,claims,lastProcessedIndex,true,gas,msg.sender) (#1700)
Variable 'TopGain._transfer(address,address,uint256).lastProcessedIndex (#1699)' in TopGain._transfer(address,address,uint256) (#1590-1707) potentially used before declaration: ProcessedDividendTracker(iterations,claims,lastProcessedIndex,true,gas,msg.sender) (#1700)
Move all variable declarations prior to any usage of the variable, and ensure that reaching a variable declaration does not depend on some conditional if it is used unconditionally.
Additional information: link
Reentrancy in TopGain._transfer(address,address,uint256) (#1590-1707):
External calls:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
External calls sending eth:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
State variables written after the call(s):
- swapAndSendBuyback(buybackTokens) (#1642)
- _allowances[owner][spender] = amount (#1021)
Reentrancy in TopGain._transfer(address,address,uint256) (#1590-1707):
External calls:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
External calls sending eth:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
State variables written after the call(s):
- swapAndLiquify(liqTokens) (#1645)
- _allowances[owner][spender] = amount (#1021)
Reentrancy in TopGain._transfer(address,address,uint256) (#1590-1707):
External calls:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendDividends(sellTokens) (#1649)
- success = IERC20(BUSD).transfer(address(dividendTracker),dividends) (#1864)
- dividendTracker.distributeBUSDDividends(dividends) (#1867)
- uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1832-1838)
External calls sending eth:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
State variables written after the call(s):
- swapAndSendDividends(sellTokens) (#1649)
- _allowances[owner][spender] = amount (#1021)
- setBotFees() (#1669)
- _previousBUSDRewardsFee = BUSDRewardsFee (#1733)
- setBotFees() (#1669)
- _previousBuybackFee = buybackFee (#1736)
- setBotFees() (#1669)
- _previousLiquidityFee = liquidityFee (#1734)
- setBotFees() (#1669)
- _previousMarketingFee = marketingFee (#1735)
- setBotFees() (#1669)
- _previousTotalFees = totalFees (#1737)
Reentrancy in TopGain.constructor(address) (#1371-1409):
External calls:
- _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#1377-1378)
State variables written after the call(s):
- uniswapV2Pair = _uniswapV2Pair (#1381)
- uniswapV2Router = _uniswapV2Router (#1380)
Reentrancy in TopGain.constructor(address) (#1371-1409):
External calls:
- _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#1377-1378)
- _setAutomatedMarketMakerPair(_uniswapV2Pair,true) (#1383)
- dividendTracker.excludeFromDividends(pair) (#1498)
- dividendTracker.excludeFromDividends(address(dividendTracker)) (#1386)
- dividendTracker.excludeFromDividends(address(this)) (#1387)
- dividendTracker.excludeFromDividends(_newOwner) (#1388)
- dividendTracker.excludeFromDividends(deadWallet) (#1389)
- dividendTracker.excludeFromDividends(address(_uniswapV2Router)) (#1390)
State variables written after the call(s):
- _mint(msg.sender,100000000000 * (10 ** 18)) (#1407)
- _balances[account] = _balances[account].add(amount) (#975)
- excludeFromFees(_newOwner,true) (#1393)
- _isExcludedFromFees[account] = excluded (#1460)
- excludeFromFees(_marketingWalletAddress,true) (#1394)
- _isExcludedFromFees[account] = excluded (#1460)
- excludeFromFees(_buybackWalletAddress,true) (#1395)
- _isExcludedFromFees[account] = excluded (#1460)
- excludeFromFees(address(this),true) (#1396)
- _isExcludedFromFees[account] = excluded (#1460)
- _mint(msg.sender,100000000000 * (10 ** 18)) (#1407)
- _totalSupply = _totalSupply.add(amount) (#974)
- excludedFromAntiWhale[address(0)] = true (#1398)
- excludedFromAntiWhale[address(this)] = true (#1399)
- excludedFromAntiWhale[deadWallet] = true (#1400)
- excludedFromAntiWhale[_newOwner] = true (#1401)
Reentrancy in TopGainDividendTracker.processAccount(address,bool) (#2094-2104):
External calls:
- amount = _withdrawDividendOfUser(account) (#2095)
- success = IERC20(BUSD).transfer(user,_withdrawableDividend) (#1181)
State variables written after the call(s):
- lastClaimTimes[account] = block.timestamp (#2098)
Reentrancy in TopGain.swapAndLiquify(uint256) (#1777-1798):
External calls:
- swapTokensForEth(half) (#1789)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- addLiquidity(otherHalf,newBalance) (#1795)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
External calls sending eth:
- addLiquidity(otherHalf,newBalance) (#1795)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
State variables written after the call(s):
- addLiquidity(otherHalf,newBalance) (#1795)
- _allowances[owner][spender] = amount (#1021)
Reentrancy in TopGain.updateUniswapV2Router(address) (#1435-1442):
External calls:
- _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this),uniswapV2Router.WETH()) (#1439-1440)
State variables written after the call(s):
- uniswapV2Pair = _uniswapV2Pair (#1441)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in TopGain._setAutomatedMarketMakerPair(address,bool) (#1493-1502):
External calls:
- dividendTracker.excludeFromDividends(pair) (#1498)
Event emitted after the call(s):
- SetAutomatedMarketMakerPair(pair,value) (#1501)
Reentrancy in TopGain._transfer(address,address,uint256) (#1590-1707):
External calls:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
External calls sending eth:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#1022)
- swapAndSendBuyback(buybackTokens) (#1642)
Reentrancy in TopGain._transfer(address,address,uint256) (#1590-1707):
External calls:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
External calls sending eth:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#1022)
- swapAndLiquify(liqTokens) (#1645)
- SwapAndLiquify(half,newBalance,otherHalf) (#1797)
- swapAndLiquify(liqTokens) (#1645)
Reentrancy in TopGain._transfer(address,address,uint256) (#1590-1707):
External calls:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendDividends(sellTokens) (#1649)
- success = IERC20(BUSD).transfer(address(dividendTracker),dividends) (#1864)
- dividendTracker.distributeBUSDDividends(dividends) (#1867)
- uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1832-1838)
External calls sending eth:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#1022)
- swapAndSendDividends(sellTokens) (#1649)
- SendDividends(tokens,dividends) (#1868)
- swapAndSendDividends(sellTokens) (#1649)
- Transfer(sender,recipient,amount) (#957)
- super._transfer(from,to,amount) (#1690)
- Transfer(sender,recipient,amount) (#957)
- super._transfer(from,address(this),fees) (#1678)
Reentrancy in TopGain._transfer(address,address,uint256) (#1590-1707):
External calls:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- swapAndSendDividends(sellTokens) (#1649)
- success = IERC20(BUSD).transfer(address(dividendTracker),dividends) (#1864)
- dividendTracker.distributeBUSDDividends(dividends) (#1867)
- uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1832-1838)
- dividendTracker.setBalance(address(from),balanceOf(from)) (#1692)
- dividendTracker.setBalance(address(to),balanceOf(to)) (#1693)
- dividendTracker.process(gas) (#1699-1704)
External calls sending eth:
- swapAndSendMarketing(marketingTokens) (#1638)
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
- swapAndSendBuyback(buybackTokens) (#1642)
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
- swapAndLiquify(liqTokens) (#1645)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
Event emitted after the call(s):
- ProcessedDividendTracker(iterations,claims,lastProcessedIndex,true,gas,msg.sender) (#1700)
Reentrancy in TopGain.constructor(address) (#1371-1409):
External calls:
- _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#1377-1378)
- _setAutomatedMarketMakerPair(_uniswapV2Pair,true) (#1383)
- dividendTracker.excludeFromDividends(pair) (#1498)
Event emitted after the call(s):
- SetAutomatedMarketMakerPair(pair,value) (#1501)
- _setAutomatedMarketMakerPair(_uniswapV2Pair,true) (#1383)
Reentrancy in TopGain.constructor(address) (#1371-1409):
External calls:
- _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this),_uniswapV2Router.WETH()) (#1377-1378)
- _setAutomatedMarketMakerPair(_uniswapV2Pair,true) (#1383)
- dividendTracker.excludeFromDividends(pair) (#1498)
- dividendTracker.excludeFromDividends(address(dividendTracker)) (#1386)
- dividendTracker.excludeFromDividends(address(this)) (#1387)
- dividendTracker.excludeFromDividends(_newOwner) (#1388)
- dividendTracker.excludeFromDividends(deadWallet) (#1389)
- dividendTracker.excludeFromDividends(address(_uniswapV2Router)) (#1390)
Event emitted after the call(s):
- ExcludeFromFees(account,excluded) (#1462)
- excludeFromFees(_newOwner,true) (#1393)
- ExcludeFromFees(account,excluded) (#1462)
- excludeFromFees(address(this),true) (#1396)
- ExcludeFromFees(account,excluded) (#1462)
- excludeFromFees(_buybackWalletAddress,true) (#1395)
- ExcludeFromFees(account,excluded) (#1462)
- excludeFromFees(_marketingWalletAddress,true) (#1394)
- Transfer(address(0),account,amount) (#976)
- _mint(msg.sender,100000000000 * (10 ** 18)) (#1407)
Reentrancy in TopGainDividendTracker.processAccount(address,bool) (#2094-2104):
External calls:
- amount = _withdrawDividendOfUser(account) (#2095)
- success = IERC20(BUSD).transfer(user,_withdrawableDividend) (#1181)
Event emitted after the call(s):
- Claim(account,amount,automatic) (#2099)
Reentrancy in TopGain.processDividendTracker(uint256) (#1565-1568):
External calls:
- (iterations,claims,lastProcessedIndex) = dividendTracker.process(gas) (#1566)
Event emitted after the call(s):
- ProcessedDividendTracker(iterations,claims,lastProcessedIndex,false,gas,msg.sender) (#1567)
Reentrancy in TopGain.swapAndLiquify(uint256) (#1777-1798):
External calls:
- swapTokensForEth(half) (#1789)
- uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1851-1857)
- addLiquidity(otherHalf,newBalance) (#1795)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
External calls sending eth:
- addLiquidity(otherHalf,newBalance) (#1795)
- uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,deadWallet,block.timestamp) (#1878-1885)
Event emitted after the call(s):
- Approval(owner,spender,amount) (#1022)
- addLiquidity(otherHalf,newBalance) (#1795)
- SwapAndLiquify(half,newBalance,otherHalf) (#1797)
Reentrancy in TopGain.swapAndSendDividends(uint256) (#1861-1870):
External calls:
- swapTokensForBUSD(tokens) (#1862)
- uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(tokenAmount,0,path,address(this),block.timestamp) (#1832-1838)
- success = IERC20(BUSD).transfer(address(dividendTracker),dividends) (#1864)
- dividendTracker.distributeBUSDDividends(dividends) (#1867)
Event emitted after the call(s):
- SendDividends(tokens,dividends) (#1868)
Reentrancy in TopGain.updateDividendTracker(address) (#1417-1433):
External calls:
- newDividendTracker.excludeFromDividends(address(newDividendTracker)) (#1424)
- newDividendTracker.excludeFromDividends(address(this)) (#1425)
- newDividendTracker.excludeFromDividends(owner()) (#1426)
- newDividendTracker.excludeFromDividends(deadWallet) (#1427)
- newDividendTracker.excludeFromDividends(address(uniswapV2Router)) (#1428)
Event emitted after the call(s):
- UpdateDividendTracker(newAddress,address(dividendTracker)) (#1430)
Apply the check-effects-interactions pattern.
Additional information: link
TopGain._transfer(address,address,uint256) (#1590-1707) uses timestamp for comparisons
Dangerous comparisons:
- ! launchAddLiquidity && launchTime == 0 (#1611)
- launchTime > 0 (#1618)
- block.timestamp - launchTime <= timeAntiBot && from == uniswapV2Pair (#1619)
TopGain.setBotSettingTime(uint256) (#1715-1719) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(launchTime == 0 && _val <= 5,Already launched or max 5 minuts.) (#1716)
TopGain.setBotFeeMultiplicator(uint256) (#1725-1728) uses timestamp for comparisons
Dangerous comparisons:
- require(bool,string)(_val <= 3 && launchTime == 0,max x3 and not launched) (#1726)
TopGainDividendTracker.getAccount(address) (#1958-2001) uses timestamp for comparisons
Dangerous comparisons:
- nextClaimTime > block.timestamp (#1998-2000)
TopGainDividendTracker.canAutoClaim(uint256) (#2022-2028) uses timestamp for comparisons
Dangerous comparisons:
- lastClaimTime > block.timestamp (#2023)
- block.timestamp.sub(lastClaimTime) >= claimWait (#2027)
Avoid relying on block.timestamp.
Additional information: link
TopGain._transfer(address,address,uint256) (#1590-1707) compares to a boolean constant:
-excludedFromAntiWhale[from] == false && excludedFromAntiWhale[to] == false (#1603-1604)
Remove the equality to the boolean constant.
Additional information: link
Different versions of Solidity is used:
- Version used: ['^0.6.12', '^0.6.2']
- ^0.6.12 (#5)
- ^0.6.2 (#29)
- ^0.6.2 (#74)
- ^0.6.2 (#142)
- ^0.6.2 (#287)
- ^0.6.2 (#347)
- ^0.6.2 (#490)
- ^0.6.2 (#545)
- ^0.6.2 (#564)
- ^0.6.2 (#628)
- ^0.6.2 (#712)
- ^0.6.2 (#743)
- ^0.6.2 (#1048)
- ^0.6.2 (#1074)
- ^0.6.2 (#1111)
- ^0.6.2 (#1275)
Use one Solidity version.
Additional information: link
Context._msgData() (#24-27) is never used and should be removed
DividendPayingToken._transfer(address,address,uint256) (#1232-1238) is never used and should be removed
SafeMath.mod(uint256,uint256) (#265-267) is never used and should be removed
SafeMath.mod(uint256,uint256,string) (#281-284) is never used and should be removed
SafeMathInt.abs(int256) (#128-131) is never used and should be removed
SafeMathInt.div(int256,int256) (#99-105) is never used and should be removed
SafeMathInt.mul(int256,int256) (#87-94) is never used and should be removed
Remove unused functions.
Additional information: link
TopGain.totalFees (#1298) is set pre-construction with a non-constant function or state variable:
- marketingFee.add(BUSDRewardsFee).add(buybackFee).add(liquidityFee)
TopGain._previousLiquidityFee (#1302) is set pre-construction with a non-constant function or state variable:
- liquidityFee
TopGain._previousBUSDRewardsFee (#1303) is set pre-construction with a non-constant function or state variable:
- BUSDRewardsFee
TopGain._previousMarketingFee (#1304) is set pre-construction with a non-constant function or state variable:
- marketingFee
TopGain._previousBuybackFee (#1305) is set pre-construction with a non-constant function or state variable:
- buybackFee
TopGain._previousTotalFees (#1307) is set pre-construction with a non-constant function or state variable:
- totalFees
TopGain.timeAntiBot (#1329) is set pre-construction with a non-constant function or state variable:
- 60 * timeDetectBotSeconds
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.6.2 (#29) allows old versions
Pragma version^0.6.2 (#74) allows old versions
Pragma version^0.6.2 (#142) allows old versions
Pragma version^0.6.2 (#287) allows old versions
Pragma version^0.6.2 (#347) allows old versions
Pragma version^0.6.2 (#490) allows old versions
Pragma version^0.6.2 (#545) allows old versions
Pragma version^0.6.2 (#564) allows old versions
Pragma version^0.6.2 (#628) allows old versions
Pragma version^0.6.2 (#712) allows old versions
Pragma version^0.6.2 (#743) allows old versions
Pragma version^0.6.2 (#1048) allows old versions
Pragma version^0.6.2 (#1074) allows old versions
Pragma version^0.6.2 (#1111) allows old versions
Pragma version^0.6.2 (#1275) allows old versions
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 TopGain.swapAndSendMarketing(uint256) (#1800-1809):
- (success) = address(_marketingWalletAddress).call{value: newBalance}() (#1805)
Low level call in TopGain.swapAndSendBuyback(uint256) (#1811-1820):
- (success) = address(_buybackWalletAddress).call{value: newBalance}() (#1816)
Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence
Additional information: link
Function IUniswapV2Router01.WETH() (#351) is not in mixedCase
Function IUniswapV2Pair.DOMAIN_SEPARATOR() (#507) is not in mixedCase
Function IUniswapV2Pair.PERMIT_TYPEHASH() (#508) is not in mixedCase
Function IUniswapV2Pair.MINIMUM_LIQUIDITY() (#525) is not in mixedCase
Parameter DividendPayingToken.dividendOf(address)._owner (#1198) is not in mixedCase
Parameter DividendPayingToken.withdrawableDividendOf(address)._owner (#1205) is not in mixedCase
Parameter DividendPayingToken.withdrawnDividendOf(address)._owner (#1212) is not in mixedCase
Parameter DividendPayingToken.accumulativeDividendOf(address)._owner (#1222) is not in mixedCase
Variable DividendPayingToken.BUSD (#1124) is not in mixedCase
Constant DividendPayingToken.magnitude (#1130) is not in UPPER_CASE_WITH_UNDERSCORES
Parameter TopGain.setFees(uint256,uint256,uint256,uint256)._marketingFee (#1444) is not in mixedCase
Parameter TopGain.setFees(uint256,uint256,uint256,uint256)._buybackFee (#1444) is not in mixedCase
Parameter TopGain.setFees(uint256,uint256,uint256,uint256)._liquidityFee (#1444) is not in mixedCase
Parameter TopGain.setAdditionalFeeOnSell(uint256)._additionalFeeOnSell (#1453) is not in mixedCase
Parameter TopGain.setBotSettingTime(uint256)._val (#1715) is not in mixedCase
Parameter TopGain.setBotFeeMultiplicator(uint256)._val (#1725) is not in mixedCase
Variable TopGain.BUSD (#1291) is not in mixedCase
Variable TopGain.BUSDRewardsFee (#1294) is not in mixedCase
Variable TopGain._previousLiquidityFee (#1302) is not in mixedCase
Variable TopGain._previousBUSDRewardsFee (#1303) is not in mixedCase
Variable TopGain._previousMarketingFee (#1304) is not in mixedCase
Variable TopGain._previousBuybackFee (#1305) is not in mixedCase
Variable TopGain._previousTotalFees (#1307) is not in mixedCase
Variable TopGain._marketingWalletAddress (#1311) is not in mixedCase
Variable TopGain._buybackWalletAddress (#1312) is not in mixedCase
Variable TopGain._botIncreaseFee (#1330) is not in mixedCase
Variable TopGain._isBot (#1332) is not in mixedCase
Parameter TopGainDividendTracker.getAccount(address)._account (#1958) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Redundant expression "this (#25)" inContext (#19-28)
Remove redundant statements if they congest code but offer no value.
Additional information: link
Variable IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountADesired (#356) is too similar to IUniswapV2Router01.addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256).amountBDesired (#357)
Variable DividendPayingToken._withdrawDividendOfUser(address)._withdrawableDividend (#1177) is too similar to TopGainDividendTracker.getAccount(address).withdrawableDividends (#1963)
Prevent variables from having similar names.
Additional information: link
TopGain.constructor(address) (#1371-1409) uses literals with too many digits:
- _mint(msg.sender,100000000000 * (10 ** 18)) (#1407)
TopGain.updateGasForProcessing(uint256) (#1508-1513) uses literals with too many digits:
- require(bool,string)(newValue >= 200000 && newValue <= 500000,TopGain: gasForProcessing must be between 200,000 and 500,000) (#1509)
TopGain.slitherConstructorVariables() (#1279-1892) uses literals with too many digits:
- deadWallet = 0x000000000000000000000000000000000000dEaD (#1289)
TopGain.slitherConstructorVariables() (#1279-1892) uses literals with too many digits:
- swapTokensAtAmount = 4000000 * (10 ** 18) (#1309)
TopGain.slitherConstructorVariables() (#1279-1892) uses literals with too many digits:
- gasForProcessing = 300000 (#1315)
TopGainDividendTracker.constructor() (#1914-1917) uses literals with too many digits:
- minimumTokenBalanceForDividends = 200000 * (10 ** 18) (#1916)
TopGainDividendTracker.getAccountAtIndex(uint256) (#2003-2020) uses literals with too many digits:
- (0x0000000000000000000000000000000000000000,- 1,- 1,0,0,0,0,0) (#2014)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
SafeMathInt.MAX_INT256 (#82) is never used in SafeMathInt (#80-138)
Remove unused state variables.
Additional information: link
TopGain.deadWallet (#1289) should be constant
Add the constant attributes to state variables that never change.
Additional information: link
renounceOwnership() should be declared external:
- Ownable.renounceOwnership() (#328-331)
transferOwnership(address) should be declared external:
- Ownable.transferOwnership(address) (#337-341)
get(IterableMapping.Map,address) should be declared external:
- IterableMapping.get(IterableMapping.Map,address) (#575-577)
getIndexOfKey(IterableMapping.Map,address) should be declared external:
- IterableMapping.getIndexOfKey(IterableMapping.Map,address) (#579-584)
getKeyAtIndex(IterableMapping.Map,uint256) should be declared external:
- IterableMapping.getKeyAtIndex(IterableMapping.Map,uint256) (#586-588)
size(IterableMapping.Map) should be declared external:
- IterableMapping.size(IterableMapping.Map) (#592-594)
name() should be declared external:
- ERC20.name() (#797-799)
symbol() should be declared external:
- ERC20.symbol() (#805-807)
decimals() should be declared external:
- ERC20.decimals() (#822-824)
transfer(address,uint256) should be declared external:
- ERC20.transfer(address,uint256) (#848-851)
allowance(address,address) should be declared external:
- ERC20.allowance(address,address) (#856-858)
approve(address,uint256) should be declared external:
- ERC20.approve(address,uint256) (#867-870)
transferFrom(address,address,uint256) should be declared external:
- ERC20.transferFrom(address,address,uint256) (#885-893)
increaseAllowance(address,uint256) should be declared external:
- ERC20.increaseAllowance(address,uint256) (#907-910)
decreaseAllowance(address,uint256) should be declared external:
- ERC20.decreaseAllowance(address,uint256) (#926-929)
distributeBUSDDividends(uint256) should be declared external:
- DividendPayingToken.distributeBUSDDividends(uint256) (#1155-1166)
withdrawDividend() should be declared external:
- DividendPayingToken.withdrawDividend() (#1170-1172)
- TopGainDividendTracker.withdrawDividend() (#1923-1925)
dividendOf(address) should be declared external:
- DividendPayingToken.dividendOf(address) (#1198-1200)
withdrawnDividendOf(address) should be declared external:
- DividendPayingToken.withdrawnDividendOf(address) (#1212-1214)
updateDividendTracker(address) should be declared external:
- TopGain.updateDividendTracker(address) (#1417-1433)
updateUniswapV2Router(address) should be declared external:
- TopGain.updateUniswapV2Router(address) (#1435-1442)
setFees(uint256,uint256,uint256,uint256) should be declared external:
- TopGain.setFees(uint256,uint256,uint256,uint256) (#1444-1451)
setAdditionalFeeOnSell(uint256) should be declared external:
- TopGain.setAdditionalFeeOnSell(uint256) (#1453-1456)
excludeMultipleAccountsFromFees(address[],bool) should be declared external:
- TopGain.excludeMultipleAccountsFromFees(address[],bool) (#1465-1471)
isExcludedFromFees(address) should be declared external:
- TopGain.isExcludedFromFees(address) (#1473-1475)
setAutomatedMarketMakerPair(address,bool) should be declared external:
- TopGain.setAutomatedMarketMakerPair(address,bool) (#1486-1490)
updateGasForProcessing(uint256) should be declared external:
- TopGain.updateGasForProcessing(uint256) (#1508-1513)
withdrawableDividendOf(address) should be declared external:
- TopGain.withdrawableDividendOf(address) (#1527-1529)
dividendTokenBalanceOf(address) should be declared external:
- TopGain.dividendTokenBalanceOf(address) (#1531-1533)
isBot(address) should be declared external:
- TopGain.isBot(address) (#1711-1713)
setBotSettingTime(uint256) should be declared external:
- TopGain.setBotSettingTime(uint256) (#1715-1719)
excludeAntibot(address) should be declared external:
- TopGain.excludeAntibot(address) (#1720-1723)
setBotFeeMultiplicator(uint256) should be declared external:
- TopGain.setBotFeeMultiplicator(uint256) (#1725-1728)
setMaxTransferAmountRate(uint256) should be declared external:
- TopGain.setMaxTransferAmountRate(uint256) (#1757-1760)
isExcludedFromAntiwhale(address) should be declared external:
- TopGain.isExcludedFromAntiwhale(address) (#1767-1769)
setExcludeFromAntiwhale(address,bool) should be declared external:
- TopGain.setExcludeFromAntiwhale(address,bool) (#1771-1773)
burn(uint256) should be declared external:
- TopGain.burn(uint256) (#1888-1890)
getAccountAtIndex(uint256) should be declared external:
- TopGainDividendTracker.getAccountAtIndex(uint256) (#2003-2020)
process(uint256) should be declared external:
- TopGainDividendTracker.process(uint256) (#2047-2092)
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