Smart Contract Audit Report
BTCEN is a new BEP-20 token that is an automatic liquidity providing protocol that pays holders dividends in BUSD.
For this audit, we reviewed the project team's BTCENCOIN and DividendDistributor contract at 0x5ad1Ba064aC6541a71eB8000eCa01be52F6ff526 on the Binance Smart Chain Mainnet.
Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
Date: June 8th, 2022.
Finding #1 - BTCENCOIN - InformationalDescription: Several state variables can never be modified, but are not declared constant.Recommendation: These state variables should be declared constant for additional gas savings on each reference.
BUSD, DEAD, WBNB, ZERO, _totalSupply
- The total supply of the token is set to 250 million $BTCN [250,000,000].
- No mint or burn functions are present; though the circulating supply can be reduced by sending tokens to the 0x..dead address if desired.
- At the time of writing this report, 100% of the total supply belongs to the owner.
- Trading must be enabled by the team before token transfers can take place on the platform. Only Authorized addresses can participate in transfers when trading is disabled.
- The contract enforces a maximum transaction amount (determined by the owner) which imposes a limit to the number of tokens that can be transferred during any given transaction.
- The contract enforces a maximum wallet amount that prevents a transfer from occurring if the recipient's token balance will exceed the limit number of tokens (determined by the owner) after the transfer occurs.
- The contract features a cool-down mechanism that prevents users from buying tokens via Pancakeswap if the cool-down time (set by the team) since the users' last buy transaction has not yet elapsed.
- Blacklisted accounts are prohibited from participating in transfers.
- The contract includes functionality to interact with an external Antibot contract. The Antibot contract was out of scope for this audit so we are unable to provide an assessment in regards to security.
- There is a Reflection fee, Liquidity Fee, Marketing Fee, Ecosystem Fee, and Burn fee on all transfers where neither the sender nor the recipient is excluded from fees.
- Fees are increased by the sell multiplier value (set by the team) on all sells via Pancakeswap.
- The tokens collected from fees are stored in the contract address. The tokens are swapped for BNB for the purpose of funding Pancakeswap liquidity when the following conditions are met:
- The automatic liquidity add functionality is enabled by the team.
- The threshold number of tokens (determined by the owner) in the contract address has been reached.
- The contract is not currently performing an automatic liquidity add.
- The caller is not initiating a buy transaction via Pancakeswap.
- 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 that the team lock these newly acquired LP tokens.
- The tokens collected from the Marketing fee and Ecosystem fee are swapped for BNB and sent to the team's Marketing wallet and Ecosystem wallet respectively.
- The tokens collected from the Reflection Fee are swapped for BNB and sent to the DividendDistributor contract where they are swapped for BUSD and distributed as rewards.
- The tokens collected from the Burn fee are sent to the Burn fee receiver address set by the team. This address is currently set to the 0x..dead address but can be updated by the team at any time.
- The contract utilizes the SafeMath library to prevent overflows/underflows.
- The contract complies with the BEP-20 token standard.
- Once dividends are distributed, they will need to be claimed; claiming happens automatically on each transfer.
- Dividend rewards can also be claimed manually by kicking off the claim cycle, which will process all eligible token holders.
- Alternatively, a user can manually claim dividends as an individual at any time.
- There is a wait-time (set by the team) between claiming dividend rewards.
- Claimed dividends are sent to the user's wallet address.
- The owner can assign any addresses to an Authorized role which can be used to maintain control over various role-restricted functions within the ecosystem.
- The owner can enable/disable trading at any time.
- The owner can enable/disable the use of a blacklist, as well as add/remove addresses from it at any time.
- The owner can set cool-down time to any value at any time.
- The owner can set the maximum transaction amount and maximum wallet amount to any values at any time.
- The owner can update the sell multiplier value to any value at any time.
- The owner can enable/disable the Antibot mechanism at any time.
- The owner can airdrop any number of tokens to any users at any time.
- Authorized addresses can set each fee percentage to any values at any time as long as the total fee percentage combined does not exceed 50%.
- Authorized addresses can update the Ecosystem address, Marketing address, Liquidity address, and Burn address to any addresses at any time.
- Authorized addresses can exclude addresses from fees, dividends, the cool-down mechanism, and the maximum transaction amount restriction at any time.
- Authorized addresses can enable/disable automatic liquidity adds at any time.
- Authorized addresses can update the threshold number of tokens that triggers automatic liquidity adds to any value at any time.
- Authorized addresses can update the maximum amount of gas used for processing to any value up to 750,000 at any time.
- Authorized addresses can update the minimum threshold of dividends a user must be due in order for their rewards to be distributed on transfers to any value at any time.
- Authorized addresses can update the wait-time between claiming rewards to any value at any time.
- Authorized addresses can withdraw any BNB from the contract address to their own wallet or the team's Marketing wallet at any time.
|Arbitrary Jump/Storage Write||N/A||PASS|
|Centralization of Control||WARNING|
|Delegate Call to Untrusted Contract||N/A||PASS|
|Dependence on Predictable Variables||N/A||PASS|
|Front Running||The Automatic Reflection functionality may be susceptible to front-running; The team must monitor and if suspicious activity is detected, the team must disable the Automatic Reflection system. The team should also ensure that no more than 0.1 BNB is used when funding the DividendDistributor contract.||PASS|
|Improper Authorization Scheme||N/A||PASS|
|Outdated Compiler Version||N/A||PASS|
|Overall Contract Safety||PASS|
($) = payable function # = non-constant function Int = Internal Ext = External Pub = Public + [Lib] SafeMath - [Int] add - [Int] sub - [Int] sub - [Int] mul - [Int] div - [Int] div + [Int] IBEP20 - [Ext] totalSupply - [Ext] decimals - [Ext] symbol - [Ext] name - [Ext] getOwner - [Ext] balanceOf - [Ext] transfer # - [Ext] allowance - [Ext] approve # - [Ext] transferFrom # + Auth - [Pub]
# - [Pub] authorize # - modifiers: onlyOwner - [Pub] unauthorize # - modifiers: onlyOwner - [Pub] isOwner - [Pub] isAuthorized - [Pub] transferOwnership # - modifiers: onlyOwner + [Int] IDEXFactory - [Ext] createPair # + [Int] IDEXRouter - [Ext] factory - [Ext] WETH - [Ext] addLiquidity # - [Ext] addLiquidityETH ($) - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens # - [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($) - [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens # + [Int] IDividendDistributor - [Ext] setDistributionCriteria # - [Ext] setShare # - [Ext] deposit ($) - [Ext] process # + DividendDistributor (IDividendDistributor) - [Pub] # - [Ext] setDistributionCriteria # - modifiers: onlyToken - [Ext] setShare # - modifiers: onlyToken - [Ext] deposit ($) - modifiers: onlyToken - [Ext] process # - modifiers: onlyToken - [Int] shouldDistribute - [Int] distributeDividend # - [Ext] claimDividend # - [Pub] getUnpaidEarnings - [Int] getCumulativeDividends - [Int] addShareholder # - [Int] removeShareholder # + BPContract - [Ext] protect # + BTCENCOIN (IBEP20, Auth) - [Pub] # - modifiers: Auth - [Ext] ($) - [Ext] totalSupply - [Ext] decimals - [Ext] symbol - [Ext] name - [Ext] getOwner - [Pub] balanceOf - [Ext] allowance - [Pub] approve # - [Ext] approveMax # - [Ext] transfer # - [Ext] transferFrom # - [Ext] setMaxWalletPercent_base1000 # - modifiers: onlyOwner - [Ext] setMaxTxPercent_base1000 # - modifiers: onlyOwner - [Ext] setTxLimit # - modifiers: authorized - [Int] _transferFrom # - [Int] _basicTransfer # - [Int] checkTxLimit - [Int] shouldTakeFee - [Int] takeFee # - [Int] shouldSwapBack - [Ext] clearStuckBalance # - modifiers: authorized - [Ext] clearStuckBalance_sender # - modifiers: authorized - [Ext] set_sell_multiplier # - modifiers: onlyOwner - [Pub] tradingStatus # - modifiers: onlyOwner - [Pub] cooldownEnabled # - modifiers: onlyOwner - [Int] swapBack # - modifiers: swapping - [Ext] setIsDividendExempt # - modifiers: authorized - [Pub] enable_blacklist # - modifiers: onlyOwner - [Pub] manage_blacklist # - modifiers: onlyOwner - [Ext] setIsFeeExempt # - modifiers: authorized - [Ext] setIsTxLimitExempt # - modifiers: authorized - [Ext] setIsTimelockExempt # - modifiers: authorized - [Ext] setFees # - modifiers: authorized - [Ext] setFeeReceivers # - modifiers: authorized - [Ext] setSwapBackSettings # - modifiers: authorized - [Ext] setTargetLiquidity # - modifiers: authorized - [Ext] setDistributionCriteria # - modifiers: authorized - [Ext] setDistributorSettings # - modifiers: authorized - [Pub] getCirculatingSupply - [Pub] getLiquidityBacking - [Pub] isOverLiquified - [Ext] multiTransfer # - modifiers: onlyOwner - [Ext] multiTransfer_fixed # - modifiers: onlyOwner - [Ext] setBPAddress # - modifiers: onlyOwner - [Ext] setBpEnabled # - modifiers: onlyOwner - [Ext] setBotProtectionDisableForever # - modifiers: onlyOwner
About Solidity Finance
Solidity Finance was founded in 2020 and quickly grew to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1000+ 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 Solidity Audit?
Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A Solidity 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.