Tank Battle NFT is a war-themed game project incubated in July 2021 with the collaboration between a reputable game studio - GOSU Corp, and Mr. Giang Hoan Tran, the CTO of Akachain. It is under the advisory of Mr. Hoa Tran Dang - SEVP & COO of FPT Software.
To engage in the game, players will play the role of a tank commander and arrange a formidable squad. There are 6 tank classes with 4 tank modules, each with unique stats for different purposes. Players have to apprehend the stats and skill stats of their NFTs and use critical thinking and teamwork skills to combat and win.
With extensive experience developing mobile games and building a young enthusiastic team who are always wholehearted, they promise Tank Battle will soon become one of the most outstanding NFT games.
TankToken.withdrawBalance() (TankToken.sol#191-194) sends eth to arbitrary user
Dangerous calls:
- _owner.transfer(address(this).balance) (TankToken.sol#193)
Ensure that an arbitrary user cannot withdraw unauthorized funds.
Additional information: link
TankToken.withdrawTokens(address,address) (TankToken.sol#196-209) ignores return value by ERC20(_tokenAddr).transfer(_to,ERC20(_tokenAddr).balanceOf(address(this))) (TankToken.sol#205-208)
Use SafeERC20, or ensure that the transfer/transferFrom return value is checked.
Additional information: link
Combination 2: Unchecked transfer + 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.
DexListing._updateAndGetListingFee(address,address,uint256) (DexListing.sol#63-91) uses a dangerous strict equality:
- _listingStartAt == 0 (DexListing.sol#71)
Don't use strict equality to determine if an account has enough Ether or tokens.
Additional information: link
TankToken.withdrawBalance()._owner (TankToken.sol#192) lacks a zero-check on :
- _owner.transfer(address(this).balance) (TankToken.sol#193)
Check that the address is not zero.
Additional information: link
Reentrancy in DexListing._updateAndGetListingFee(address,address,uint256) (DexListing.sol#63-91):
External calls:
- DexPair._isPair(recipient_) && amount_ > 0 (DexListing.sol#73)
State variables written after the call(s):
- _startListing() (DexListing.sol#74)
- _listingStartAt = block.timestamp (DexListing.sol#37)
Apply the check-effects-interactions pattern.
Additional information: link
TankToken._transfer(address,address,uint256).transferFee (TankToken.sol#66) shadows:
- TransferFee.transferFee() (TransferFee.sol#69-75) (function)
Rename the local variables that shadow another component.
Additional information: link
Reentrancy in TankToken._transfer(address,address,uint256) (TankToken.sol#48-76):
External calls:
- fee = _updateAndGetListingFee(sender_,recipient_,amount_) (TankToken.sol#58)
- DexPair._isPair(recipient_) && amount_ > 0 (DexListing.sol#73)
- (success,data) = pair_.call((abi.encodeWithSelector(FACTORY_SELECTOR))) (DexPair.sol#21-22)
- ! DexPair._isPair(sender_) && ! DexPair._isPair(recipient_) (DexListing.sol#83)
State variables written after the call(s):
- super._transfer(sender_,_getTransferFeeTo(),fee) (TankToken.sol#62)
- _balances[sender] = senderBalance - amount (ERC20.sol#234)
- _balances[recipient] += amount (ERC20.sol#236)
- super._transfer(sender_,recipient_,transferA) (TankToken.sol#64)
- _balances[sender] = senderBalance - amount (ERC20.sol#234)
- _balances[recipient] += amount (ERC20.sol#236)
Reentrancy in TankToken._transfer(address,address,uint256) (TankToken.sol#48-76):
External calls:
- transferFee = _getTransferFee(sender_,recipient_,amount_) (TankToken.sol#66)
- DexPair._isPair(recipient_) (TransferFee.sol#50)
- (success,data) = pair_.call((abi.encodeWithSelector(FACTORY_SELECTOR))) (DexPair.sol#21-22)
- DexPair._isPair(sender_) (TransferFee.sol#53)
State variables written after the call(s):
- super._transfer(sender_,_getTransferFeeTo(),transferFee) (TankToken.sol#70)
- _balances[sender] = senderBalance - amount (ERC20.sol#234)
- _balances[recipient] += amount (ERC20.sol#236)
- super._transfer(sender_,recipient_,transferA_scope_0) (TankToken.sol#73)
- _balances[sender] = senderBalance - amount (ERC20.sol#234)
- _balances[recipient] += amount (ERC20.sol#236)
Reentrancy in DexListing._updateAndGetListingFee(address,address,uint256) (DexListing.sol#63-91):
External calls:
- DexPair._isPair(recipient_) && amount_ > 0 (DexListing.sol#73)
State variables written after the call(s):
- _startListing() (DexListing.sol#74)
- _listingFeePercent = 100 (DexListing.sol#38)
- _startListing() (DexListing.sol#74)
- _originOwner = originOwner_ (OriginOwner.sol#32)
Reentrancy in DexListing.constructor(uint256) (DexListing.sol#21-31):
External calls:
- wbnbPair = DexPair._createPair(router,DexPair._wbnb) (DexListing.sol#29)
- busdPair = DexPair._createPair(router,DexPair._busd) (DexListing.sol#30)
State variables written after the call(s):
- busdPair = DexPair._createPair(router,DexPair._busd) (DexListing.sol#30)
Reentrancy in TankToken.constructor() (TankToken.sol#20-30):
External calls:
- DexListing(100) (TankToken.sol#22)
- IUniswapV2Factory(IUniswapV2Router02(router_).factory()).createPair(address(this),pairedToken_) (DexPair.sol#33-34)
- wbnbPair = DexPair._createPair(router,DexPair._wbnb) (DexListing.sol#29)
- busdPair = DexPair._createPair(router,DexPair._busd) (DexListing.sol#30)
State variables written after the call(s):
- _mint(msg.sender,initialTokensSupply) (TankToken.sol#28)
- _balances[account] += amount (ERC20.sol#258)
- _setupRole(DEFAULT_ADMIN_ROLE,msg.sender) (TankToken.sol#24)
- _roles[role].members[account] = true (AccessControl.sol#207)
- _setupRole(ADMIN_ROLE,msg.sender) (TankToken.sol#25)
- _roles[role].members[account] = true (AccessControl.sol#207)
- _setupRole(BURNER_ROLE,msg.sender) (TankToken.sol#26)
- _roles[role].members[account] = true (AccessControl.sol#207)
- _setupRole(PAUSER_ROLE,msg.sender) (TankToken.sol#27)
- _roles[role].members[account] = true (AccessControl.sol#207)
- _mint(msg.sender,initialTokensSupply) (TankToken.sol#28)
- _totalSupply += amount (ERC20.sol#257)
- _setTransferFee(msg.sender,0,0,0) (TankToken.sol#29)
- _transferFee.to = to_ (TransferFee.sol#35)
- _transferFee.buy = buyFee_ (TransferFee.sol#36)
- _transferFee.sell = sellFee_ (TransferFee.sol#37)
- _transferFee.normal = normalFee_ (TransferFee.sol#38)
Apply the check-effects-interactions pattern.
Additional information: link
Reentrancy in TankToken._transfer(address,address,uint256) (TankToken.sol#48-76):
External calls:
- fee = _updateAndGetListingFee(sender_,recipient_,amount_) (TankToken.sol#58)
- DexPair._isPair(recipient_) && amount_ > 0 (DexListing.sol#73)
- (success,data) = pair_.call((abi.encodeWithSelector(FACTORY_SELECTOR))) (DexPair.sol#21-22)
- ! DexPair._isPair(sender_) && ! DexPair._isPair(recipient_) (DexListing.sol#83)
Event emitted after the call(s):
- Transfer(sender,recipient,amount) (ERC20.sol#238)
- super._transfer(sender_,recipient_,transferA) (TankToken.sol#64)
- Transfer(sender,recipient,amount) (ERC20.sol#238)
- super._transfer(sender_,_getTransferFeeTo(),fee) (TankToken.sol#62)
Reentrancy in TankToken._transfer(address,address,uint256) (TankToken.sol#48-76):
External calls:
- transferFee = _getTransferFee(sender_,recipient_,amount_) (TankToken.sol#66)
- DexPair._isPair(recipient_) (TransferFee.sol#50)
- (success,data) = pair_.call((abi.encodeWithSelector(FACTORY_SELECTOR))) (DexPair.sol#21-22)
- DexPair._isPair(sender_) (TransferFee.sol#53)
Event emitted after the call(s):
- Transfer(sender,recipient,amount) (ERC20.sol#238)
- super._transfer(sender_,recipient_,transferA_scope_0) (TankToken.sol#73)
- Transfer(sender,recipient,amount) (ERC20.sol#238)
- super._transfer(sender_,_getTransferFeeTo(),transferFee) (TankToken.sol#70)
Reentrancy in DexListing._updateAndGetListingFee(address,address,uint256) (DexListing.sol#63-91):
External calls:
- DexPair._isPair(recipient_) && amount_ > 0 (DexListing.sol#73)
Event emitted after the call(s):
- ChangeOriginOwner(originOwner_) (OriginOwner.sol#33)
- _startListing() (DexListing.sol#74)
Reentrancy in TankToken.constructor() (TankToken.sol#20-30):
External calls:
- DexListing(100) (TankToken.sol#22)
- IUniswapV2Factory(IUniswapV2Router02(router_).factory()).createPair(address(this),pairedToken_) (DexPair.sol#33-34)
- wbnbPair = DexPair._createPair(router,DexPair._wbnb) (DexListing.sol#29)
- busdPair = DexPair._createPair(router,DexPair._busd) (DexListing.sol#30)
Event emitted after the call(s):
- RoleGranted(role,account,_msgSender()) (AccessControl.sol#208)
- _setupRole(DEFAULT_ADMIN_ROLE,msg.sender) (TankToken.sol#24)
- RoleGranted(role,account,_msgSender()) (AccessControl.sol#208)
- _setupRole(PAUSER_ROLE,msg.sender) (TankToken.sol#27)
- RoleGranted(role,account,_msgSender()) (AccessControl.sol#208)
- _setupRole(BURNER_ROLE,msg.sender) (TankToken.sol#26)
- RoleGranted(role,account,_msgSender()) (AccessControl.sol#208)
- _setupRole(ADMIN_ROLE,msg.sender) (TankToken.sol#25)
- SetTransferFee(_transferFee) (TransferFee.sol#39)
- _setTransferFee(msg.sender,0,0,0) (TankToken.sol#29)
- Transfer(address(0),account,amount) (ERC20.sol#259)
- _mint(msg.sender,initialTokensSupply) (TankToken.sol#28)
Apply the check-effects-interactions pattern.
Additional information: link
DexListing._updateListingFee() (DexListing.sol#50-61) uses timestamp for comparisons
Dangerous comparisons:
- pastTime > _listingDuration (DexListing.sol#54)
DexListing._updateAndGetListingFee(address,address,uint256) (DexListing.sol#63-91) uses timestamp for comparisons
Dangerous comparisons:
- _listingStartAt == 0 (DexListing.sol#71)
- _listingStartAt + _listingDuration <= block.timestamp (DexListing.sol#79)
Avoid relying on block.timestamp.
Additional information: link
TankToken.isContract(address) (TankToken.sol#211-217) uses assembly
- INLINE ASM (TankToken.sol#213-215)
Do not use evm assembly.
Additional information: link
Different versions of Solidity is used:
- Version used: ['^0.8.0', '^0.8.5']
- ^0.8.0 (AccessControl.sol#4)
- ^0.8.0 (Context.sol#4)
- ^0.8.5 (DexListing.sol#3)
- ^0.8.5 (DexPair.sol#3)
- ^0.8.0 (ERC165.sol#4)
- ^0.8.0 (ERC20.sol#4)
- ^0.8.5 (GasPriceController.sol#3)
- ^0.8.0 (IAccessControl.sol#4)
- ^0.8.0 (IERC165.sol#4)
- ^0.8.0 (IERC20.sol#4)
- ^0.8.0 (IERC20Metadata.sol#4)
- ^0.8.5 (IUniswapV2Factory.sol#3)
- ^0.8.5 (IUniswapV2Router01.sol#3)
- ^0.8.5 (IUniswapV2Router02.sol#3)
- ^0.8.5 (OriginOwner.sol#3)
- ^0.8.0 (Pausable.sol#4)
- ^0.8.0 (Strings.sol#4)
- ^0.8.5 (TankToken.sol#3)
- ^0.8.5 (TransferFee.sol#3)
Use one Solidity version.
Additional information: link
AccessControl._setRoleAdmin(bytes32,bytes32) (AccessControl.sol#194-198) is never used and should be removed
Context._msgData() (Context.sol#21-23) is never used and should be removed
Strings.toHexString(uint256) (Strings.sol#40-51) is never used and should be removed
Strings.toString(uint256) (Strings.sol#15-35) is never used and should be removed
Remove unused functions.
Additional information: link
TankToken.initialTokensSupply (TankToken.sol#19) is set pre-construction with a non-constant function or state variable:
- 1000000000 * 10 ** 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
Pragma version^0.8.0 (AccessControl.sol#4) allows old versions
Pragma version^0.8.0 (Context.sol#4) allows old versions
Pragma version^0.8.0 (ERC165.sol#4) allows old versions
Pragma version^0.8.0 (ERC20.sol#4) allows old versions
Pragma version^0.8.0 (IAccessControl.sol#4) allows old versions
Pragma version^0.8.0 (IERC165.sol#4) allows old versions
Pragma version^0.8.0 (IERC20.sol#4) allows old versions
Pragma version^0.8.0 (IERC20Metadata.sol#4) allows old versions
Pragma version^0.8.0 (Pausable.sol#4) allows old versions
Pragma version^0.8.0 (Strings.sol#4) 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 DexPair._isPair(address) (DexPair.sol#14-24):
- (success,data) = pair_.call((abi.encodeWithSelector(FACTORY_SELECTOR))) (DexPair.sol#21-22)
Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence
Additional information: link
Variable DexListing._listingFinished (DexListing.sol#19) is not in mixedCase
Constant DexPair._wbnb (DexPair.sol#11) is not in UPPER_CASE_WITH_UNDERSCORES
Constant DexPair._busd (DexPair.sol#12) is not in UPPER_CASE_WITH_UNDERSCORES
Parameter TankToken.addBlackList(address)._address (TankToken.sol#103) is not in mixedCase
Parameter TankToken.addBlackLists(address[])._address (TankToken.sol#107) is not in mixedCase
Parameter TankToken.removeBlackList(address)._address (TankToken.sol#114) is not in mixedCase
Parameter TankToken.removeBlackLists(address[])._address (TankToken.sol#118) is not in mixedCase
Parameter TankToken.withdrawTokens(address,address)._tokenAddr (TankToken.sol#196) is not in mixedCase
Parameter TankToken.withdrawTokens(address,address)._to (TankToken.sol#196) is not in mixedCase
Follow the Solidity naming convention.
Additional information: link
Variable OriginOwner._originOwner (OriginOwner.sol#20) is too similar to OriginOwner._changeOriginOwner(address).originOwner_ (OriginOwner.sol#28)
Variable OriginOwner._originOwner (OriginOwner.sol#20) is too similar to OriginOwner.changeOriginOwner(address).originOwner_ (OriginOwner.sol#43)
Variable DexListing._listingDuration (DexListing.sol#16) is too similar to DexListing.constructor(uint256).listingDuration_ (DexListing.sol#22)
Variable GasPriceController._maxGasPrice (GasPriceController.sol#21) is too similar to GasPriceController._setMaxGasPrice(uint256).maxGasPrice_ (GasPriceController.sol#24)
Variable GasPriceController._maxGasPrice (GasPriceController.sol#21) is too similar to TankToken.setMaxGasPrice(uint256).maxGasPrice_ (TankToken.sol#83)
Prevent variables from having similar names.
Additional information: link
TankToken.slitherConstructorVariables() (TankToken.sol#13-219) uses literals with too many digits:
- initialTokensSupply = 1000000000 * 10 ** decimals() (TankToken.sol#19)
Use: Ether suffix, Time suffix, or The scientific notation
Additional information: link
DexPair._wbnb (DexPair.sol#11) is never used in DexPair (DexPair.sol#8-37)
DexPair._busd (DexPair.sol#12) is never used in DexPair (DexPair.sol#8-37)
TransferFee.FACTORY_SELECTOR (TransferFee.sol#8) is never used in TankToken (TankToken.sol#13-219)
Remove unused state variables.
Additional information: link
grantRole(bytes32,address) should be declared external:
- AccessControl.grantRole(bytes32,address) (AccessControl.sol#130-132)
revokeRole(bytes32,address) should be declared external:
- AccessControl.revokeRole(bytes32,address) (AccessControl.sol#143-145)
renounceRole(bytes32,address) should be declared external:
- AccessControl.renounceRole(bytes32,address) (AccessControl.sol#161-165)
listingDuration() should be declared external:
- DexListing.listingDuration() (DexListing.sol#93-99)
listingFinished() should be declared external:
- DexListing.listingFinished() (DexListing.sol#101-107)
name() should be declared external:
- ERC20.name() (ERC20.sol#62-64)
symbol() should be declared external:
- ERC20.symbol() (ERC20.sol#70-72)
totalSupply() should be declared external:
- ERC20.totalSupply() (ERC20.sol#94-96)
balanceOf(address) should be declared external:
- ERC20.balanceOf(address) (ERC20.sol#101-103)
transfer(address,uint256) should be declared external:
- ERC20.transfer(address,uint256) (ERC20.sol#113-116)
approve(address,uint256) should be declared external:
- ERC20.approve(address,uint256) (ERC20.sol#132-135)
transferFrom(address,address,uint256) should be declared external:
- ERC20.transferFrom(address,address,uint256) (ERC20.sol#150-164)
increaseAllowance(address,uint256) should be declared external:
- ERC20.increaseAllowance(address,uint256) (ERC20.sol#178-181)
decreaseAllowance(address,uint256) should be declared external:
- ERC20.decreaseAllowance(address,uint256) (ERC20.sol#197-205)
isOriginOwner() should be declared external:
- OriginOwner.isOriginOwner() (OriginOwner.sol#66-72)
pause() should be declared external:
- TankToken.pause() (TankToken.sol#134-136)
unpause() should be declared external:
- TankToken.unpause() (TankToken.sol#147-149)
burn(uint256) should be declared external:
- TankToken.burn(uint256) (TankToken.sol#156-158)
burnFrom(address,uint256) should be declared external:
- TankToken.burnFrom(address,uint256) (TankToken.sol#171-185)
withdrawBalance() should be declared external:
- TankToken.withdrawBalance() (TankToken.sol#191-194)
withdrawTokens(address,address) should be declared external:
- TankToken.withdrawTokens(address,address) (TankToken.sol#196-209)
transferFee() should be declared external:
- TransferFee.transferFee() (TransferFee.sol#69-75)
Use the external attribute for functions never called from the contract.
Additional information: link
Average 30d PancakeSwap liquidity is less than $100. Token is either dead or inactive.
Average 30d number of PancakeSwap swaps is less than 1. Token is either dead or inactive.
Token is deployed only at one blockchain
Contract has 0% buy tax and 1% sell tax.
Taxes are low and contract ownership is renounced.
Unable to find whitepaper link on the website
Young tokens have high risks of price dump / death
Young tokens have high risks of scam / price dump / death
Young tokens have high risks of price dump / death
Young tokens have high risks of price dump / death
Young tokens have high risks of price dump / death
Token has relatively low CoinGecko rank
Last post in Twitter was more than 30 days ago