DBat Token - Smart Contract Audit Report
Summary
DBat ($DBAT) is a new community-driven BEP20 token.
Notes on the Contract:Audit Findings Summary
- The total supply of the token is set to 1 billion $DBAT [1,000,000,000].
- The contract utilizes a minter role that allows the assigned address to mint any amount of tokens to any account at any time.
- No burn functions are present; though the circulating supply can be reduced by sending tokens to the 0x..dead address, if desired.
- There is a tax fee on all transactions for any non excluded address that participates in a transfer. The tax fee percentages differ depending on if you are either buying tokens or selling tokens to Pancakeswap.
- The tokens collected from the tax fee are sent to the team's 'receiveTaxAddress' wallet
- A tax fee is not charged on transactions where the team's 'mmAddress' is either the sender or the recipient.
- The contract includes functionality to interact with an external unverified antibot contract. This contract was out of scope for the purpose of this audit.
- As the project is implemented with Solidity v0.8.0, it is protected from overflows.
Ownership Controls:- Ownership has not been renounced.
- The owner has the ability to modify the tax fee percentages to any values at any time.
- The owner has the ability to update the team's TaxAddress and mmAddress to any addresses at any time.
- The address assigned to the Default_Admin_Role has the ability to add to add/remove addresses to the Minter role at any time.
- No external threats were identified.
- We recommend that the team renounces ownership.
- Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
- Date: September 30th, 2021
- Updated: October 11th, 2021 to reflect mainnet deployment.
Audit Results
| Vulnerability Category | Notes | Result |
|---|---|---|
| Arbitrary Storage Write | N/A | PASS |
| Arbitrary Jump | N/A | PASS |
| Delegate Call to Untrusted Contract | N/A | PASS |
| Dependence on Predictable Variables | N/A | PASS |
| Deprecated Opcodes | N/A | PASS |
| Ether Thief | N/A | PASS |
| Exceptions | N/A | PASS |
| External Calls | N/A | PASS |
| Flash Loans | N/A | PASS |
| Integer Over/Underflow | N/A | PASS |
| Multiple Sends | N/A | PASS |
| Oracles | N/A | PASS |
| Suicide | N/A | PASS |
| State Change External Calls | N/A | PASS |
| Unchecked Retval | N/A | PASS |
| User Supplied Assertion | N/A | PASS |
| Critical Solidity Compiler | N/A | PASS |
| Overall Contract Safety | PASS |
Function Graph

Inheritence Chart

Functions Overview
($) = payable function
# = non-constant function
+ Initializable
+ ContextUpgradeable (Initializable)
- [Int] __Context_init #
- modifiers: initializer
- [Int] __Context_init_unchained #
- modifiers: initializer
- [Int] _msgSender
- [Int] _msgData
+ OwnableUpgradeable (Initializable, ContextUpgradeable)
- [Int] __Ownable_init #
- modifiers: initializer
- [Int] __Ownable_init_unchained #
- modifiers: initializer
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
- [Int] _transferOwnership #
+ [Lib] AddressUpgradeable
- [Int] isContract
- [Int] sendValue #
- [Int] functionCall #
- [Int] functionCall #
- [Int] functionCallWithValue #
- [Int] functionCallWithValue #
- [Int] functionStaticCall
- [Int] functionStaticCall
- [Int] verifyCallResult
+ [Lib] SafeMathUpgradeable
- [Int] tryAdd
- [Int] trySub
- [Int] tryMul
- [Int] tryDiv
- [Int] tryMod
- [Int] add
- [Int] sub
- [Int] mul
- [Int] div
- [Int] mod
- [Int] sub
- [Int] div
- [Int] mod
+ [Int] IERC20Upgradeable
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [Int] IERC20MetadataUpgradeable (IERC20Upgradeable)
- [Ext] name
- [Ext] symbol
- [Ext] decimals
+ [Int] IAccessControlUpgradeable
- [Ext] hasRole
- [Ext] getRoleAdmin
- [Ext] grantRole #
- [Ext] revokeRole #
- [Ext] renounceRole #
+ [Lib] StringsUpgradeable
- [Int] toString
- [Int] toHexString
- [Int] toHexString
+ [Int] IERC165Upgradeable
- [Ext] supportsInterface
+ ERC165Upgradeable (Initializable, IERC165Upgradeable)
- [Int] __ERC165_init #
- modifiers: initializer
- [Int] __ERC165_init_unchained #
- modifiers: initializer
- [Pub] supportsInterface
+ AccessControlUpgradeable (Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable)
- [Int] __AccessControl_init #
- modifiers: initializer
- [Int] __AccessControl_init_unchained #
- modifiers: initializer
- [Pub] supportsInterface
- [Pub] hasRole
- [Int] _checkRole
- [Pub] getRoleAdmin
- [Pub] grantRole #
- modifiers: onlyRole
- [Pub] revokeRole #
- modifiers: onlyRole
- [Pub] renounceRole #
- [Int] _setupRole #
- [Int] _setRoleAdmin #
- [Int] _grantRole #
- [Int] _revokeRole #
+ BPContract
- [Ext] protect #
+ [Int] IPancakeFactory
- [Ext] feeTo
- [Ext] feeToSetter
- [Ext] getPair
- [Ext] allPairs
- [Ext] allPairsLength
- [Ext] createPair #
- [Ext] setFeeTo #
- [Ext] setFeeToSetter #
+ [Int] IPancakeRouter01
- [Ext] addLiquidity #
- [Ext] addLiquidityETH ($)
- [Ext] removeLiquidity #
- [Ext] removeLiquidityETH #
- [Ext] removeLiquidityWithPermit #
- [Ext] removeLiquidityETHWithPermit #
- [Ext] swapExactTokensForTokens #
- [Ext] swapTokensForExactTokens #
- [Ext] swapExactETHForTokens ($)
- [Ext] swapTokensForExactETH #
- [Ext] swapExactTokensForETH #
- [Ext] swapETHForExactTokens ($)
- [Ext] factory
- [Ext] WETH
- [Ext] quote
- [Ext] getamountOut
- [Ext] getamountIn
- [Ext] getamountsOut
- [Ext] getamountsIn
+ [Int] IPancakeRouter02 (IPancakeRouter01)
- [Ext] removeLiquidityETHSupportingFeeOnTransferTokens #
- [Ext] removeLiquidityETHWithPermitSupportingFeeOnTransferTokens #
- [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
- [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
- [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #
+ DBATToken (Initializable, IERC20Upgradeable, IERC20MetadataUpgradeable, OwnableUpgradeable, AccessControlUpgradeable)
- [Pub] initialize #
- modifiers: initializer
- [Int] __DBATToken_init #
- modifiers: initializer
- [Ext] setTaxAddress #
- modifiers: onlyOwner
- [Ext] setMMAddress #
- modifiers: onlyOwner
- [Pub] getTaxAddress
- modifiers: onlyOwner
- [Pub] getMMAddress
- modifiers: onlyOwner
- [Int] __DBATToken_init_unchained #
- modifiers: initializer
- [Pub] name
- [Pub] symbol
- [Pub] decimals
- [Pub] totalSupply
- [Pub] balanceOf
- [Pub] transfer #
- [Pub] allowance
- [Pub] approve #
- [Pub] transferFrom #
- [Pub] increaseAllowance #
- [Pub] decreaseAllowance #
- [Int] _transfer #
- [Prv] _taxedTransfer #
- [Int] _mint #
- [Int] _burn #
- [Int] _approve #
- [Int] _beforeTokenTransfer #
- [Int] _afterTokenTransfer #
- [Prv] _calculateFee
- [Pub] setTaxes #
- modifiers: onlyOwner
- [Pub] getTaxes
- [Ext] setBPAddrss #
- modifiers: onlyOwner
- [Ext] setBpEnabled #
- modifiers: onlyOwner
- [Pub] isMinter
- [Pub] addMinter #
- [Pub] mint #