Bar Fight Token
Smart Contract Audit Report
Audit Summary
Bar Fight Token is a new BEP-20 token on the Binance Smart Chain that is an automatic liquidity providing protocol.
For this audit, we reviewed the CoinToken contract at 0xAF7E10c6bBBd0993f1E3209176B9B6142814d6d4 on the Binance Smart Chain Mainnet.
Audit Findings
Informational findings were identified and the team may want to review them.
Date: September 2nd, 2022.Finding #1 - CoinToken - Informational
Description: The following state variables are not used in the contract.
Recommendation: These state variables could be removed to reduce contract size and deployment costs.charityTaxBuy, charityTaxSell, charityTaxWallet, devTaxBuy, devTaxSell, devTaxWallet, liquidityTaxBuy, liquidityTaxSell, liquidityTaxWallet, marketingTaxBuy, marketingTaxSell, marketingTaxWallet
Finding #2 - CoinToken - Informational
Description: ThedenominatorandswapThresholdstate variables can never be modified, but are not declared constant.
Recommendation: These state variables could be declared constant for additional gas savings on each reference.
Contract Overview
Ownership Controls:
- The total supply of the token is set to 100 billion $BarFight [100,000,000,000].
- No mint functions are accessible beyond deployment.
- The owner can burn their own tokens to reduce the total supply.
- At the time of writing this report, there are 70 total token holders. The token allocation is as follows:
- 38.57% of the total supply is in Pancakeswap liquidity.
- Of that liquidity, 97.59% of the LP tokens are stored in a TrustSwap token locking contract and will vest to the team on December 1st, 2022.
- 17.5% of the total supply is stored in the TrustSwap token locking contract and will fully vest to the team on October 30th, 2022.
- The next five holders own a cumulative 28.02% of the total supply.
- There is a 5% Liquidity fee, 5% Dev fee, 4% Marketing fee, and 1% Charity fee on all sell transactions via Pancakeswap where neither the sender nor the recipient is excluded from fees.
- The tokens collected through fees are stored in the contract address. The tokens are swapped for BNB for the purpose of funding Pancakeswap liquidity when the total number of tokens collected through fees reaches the contract's swap threshold value.
- Liquidity-adds are automatically performed by selling the tokens collected as fees, pairing the received BNB with the token, and adding it as liquidity to the BNB pair.
- The LP tokens received through this process are sent to the Liquidity address set by the team. We recommend the team lock the newly acquired LP tokens.
- The tokens collected through the Dev fee, Marketing fee, and Charity fee are swapped for BNB and sent to the team's Dev wallet, Marketing wallet, and Charity wallet respectively.
- As the contract is deployed with Solidity v0.8.10, it is safe from any possible overflows/underflows.
- The contract complies with the BEP-20 token standard.
- Ownership has been renounced.
- The owner was previously able to set the Liquidity fee, Dev fee, Marketing fee, and Charity fee for both fee structures to any percentages at any time.
- The owner was previously able to add/remove addresses from the transfer blacklist at any time.
- The owner was previously able to pause/unpause trading at any time.
- The owner was previously able to include and exclude accounts from fees at any time.
- The owner was previously able to enable/disable fees at any time.
Audit Results
| Vulnerability Category | Notes | Result |
|---|---|---|
| Arbitrary Jump/Storage Write | N/A | PASS |
| Centralization of Control | The team has renounced ownership. | PASS |
| Compiler Issues | N/A | PASS |
| Delegate Call to Untrusted Contract | N/A | PASS |
| Dependence on Predictable Variables | N/A | PASS |
| Ether/Token Theft | N/A | PASS |
| Flash Loans | N/A | PASS |
| Front Running | The automatic token swapping functionality may be susceptible to front running. The team must monitor, and if any suspicious activity is detected, should disable this system. | PASS |
| Improper Events | N/A | PASS |
| Improper Authorization Scheme | N/A | PASS |
| Integer Over/Underflow | N/A | PASS |
| Logical Issues | N/A | PASS |
| Oracle Issues | N/A | PASS |
| Outdated Compiler Version | N/A | PASS |
| Race Conditions | N/A | PASS |
| Reentrancy | N/A | PASS |
| Signature Issues | N/A | PASS |
| Unbounded Loops | N/A | PASS |
| Unused Code | N/A | PASS |
| Overall Contract Safety | PASS |
Inheritance Chart

Function Graph

Functions Overview
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [Int] IERC20Metadata (IERC20)
- [Ext] name
- [Ext] symbol
- [Ext] decimals
+ Context
- [Int] _msgSender
- [Int] _msgData
+ ERC20 (Context, IERC20, IERC20Metadata)
- [Pub] #
- [Pub] name
- [Pub] symbol
- [Pub] decimals
- [Pub] totalSupply
- [Pub] balanceOf
- [Pub] transfer #
- [Pub] allowance
- [Pub] approve #
- [Pub] transferFrom #
- [Pub] increaseAllowance #
- [Pub] decreaseAllowance #
- [Int] _transfer #
- [Int] _mint #
- [Int] _burn #
- [Int] _approve #
- [Int] _beforeTokenTransfer #
- [Int] _afterTokenTransfer #
+ Ownable (Context)
- [Pub] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
- [Int] _setOwner #
+ Pausable (Context)
- [Pub] #
- [Pub] paused
- [Int] _pause #
- modifiers: whenNotPaused
- [Int] _unpause #
- modifiers: whenPaused
+ [Int] IUniswapV2Pair
- [Ext] name
- [Ext] symbol
- [Ext] decimals
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] allowance
- [Ext] approve #
- [Ext] transfer #
- [Ext] transferFrom #
- [Ext] DOMAIN_SEPARATOR
- [Ext] PERMIT_TYPEHASH
- [Ext] nonces
- [Ext] permit #
- [Ext] MINIMUM_LIQUIDITY
- [Ext] factory
- [Ext] token0
- [Ext] token1
- [Ext] getReserves
- [Ext] price0CumulativeLast
- [Ext] price1CumulativeLast
- [Ext] kLast
- [Ext] mint #
- [Ext] burn #
- [Ext] swap #
- [Ext] skim #
- [Ext] sync #
- [Ext] initialize #
+ [Int] IUniswapV2Factory
- [Ext] feeTo
- [Ext] feeToSetter
- [Ext] getPair
- [Ext] allPairs
- [Ext] allPairsLength
- [Ext] createPair #
- [Ext] setFeeTo #
- [Ext] setFeeToSetter #
+ [Int] IUniswapV2Router01
- [Ext] factory
- [Ext] WETH
- [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] quote
- [Ext] getAmountOut
- [Ext] getAmountIn
- [Ext] getAmountsOut
- [Ext] getAmountsIn
+ [Int] IUniswapV2Router02 (IUniswapV2Router01)
- [Ext] removeLiquidityETHSupportingFeeOnTransferTokens #
- [Ext] removeLiquidityETHWithPermitSupportingFeeOnTransferTokens #
- [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
- [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
- [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #
+ CoinToken (ERC20, Ownable, Pausable)
- [Pub] ($)
- modifiers: ERC20
- [Prv] handleTax #
- [Int] _transfer #
- [Pub] triggerTax #
- modifiers: onlyOwner
- [Pub] pause #
- modifiers: onlyOwner
- [Pub] unpause #
- modifiers: onlyOwner
- [Pub] burn #
- modifiers: onlyOwner
- [Pub] enableBlacklist #
- modifiers: onlyOwner
- [Pub] disableBlacklist #
- modifiers: onlyOwner
- [Pub] exclude #
- modifiers: onlyOwner
- [Pub] removeExclude #
- modifiers: onlyOwner
- [Pub] setBuyTax #
- modifiers: onlyOwner
- [Pub] setSellTax #
- modifiers: onlyOwner
- [Pub] setTaxWallets #
- modifiers: onlyOwner
- [Pub] enableTax #
- modifiers: onlyOwner
- [Pub] disableTax #
- modifiers: onlyOwner
- [Pub] isBlacklisted
- [Pub] isExcluded
- [Ext] ($)
About SourceHat
SourceHat has quickly grown to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1300+ solidity smart contract audits covering all major project types and protocols, securing a total of over $50 billion U.S. dollars in on-chain value across 1500 projects!.
Our firm is well-reputed in the community and is trusted as a top smart contract auditing company for the review of solidity code, no matter how complex. Our team of experienced solidity smart contract auditors performs audits for tokens, NFTs, crowdsales, marketplaces, gambling games, financial protocols, and more!
Contact us today to get a free quote for a smart contract audit of your project!
What is a SourceHat Audit?
Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A SourceHat Audit takes this a step further by verifying economic logic to ensure the stability of smart contracts and highlighting privileged functionality to create a report that is easy to understand for developers and community members alike.
How Do I Interpret the Findings?
Each of our Findings will be labeled with a Severity level. We always recommend the team resolve High, Medium, and Low severity findings prior to deploying the code to the mainnet. Here is a breakdown on what each Severity level means for the project:
- High severity indicates that the issue puts a large number of users' funds at risk and has a high probability of exploitation, or the smart contract contains serious logical issues which can prevent the code from operating as intended.
- Medium severity issues are those which place at least some users' funds at risk and has a medium to high probability of exploitation.
- Low severity issues have a relatively minor risk association; these issues have a low probability of occurring or may have a minimal impact.
- Informational issues pose no immediate risk, but inform the project team of opportunities for gas optimizations and following smart contract security best practices.