Afterburner Finance

Smart Contract Audit Report

Audit Summary

Afterburner Finance Audit Report Afterburner Finance is a new BEP-20 token on the Binance Smart Chain with an elastic supply that performs automatic liquidity adds.

For this audit, we reviewed the project team's Afterburner contract at 0xc877304259931D3D42372aeCD41338C5BB1F4707 on the Binance Smart Chain Mainnet.

Audit Findings

Informational findings were identified and the team may want to review them. In addition, centralized aspects are present.
Date: July 26th, 2022.

Finding #1 - Afterburner - Informational

Description: The jackpotBuyerShare state variable cannot be modified but is not declared constant.
Recommendation: This state variable should be declared constant for additional gas savings on each reference.

Contracts Overview

  • The total supply of the token is currently 101,101.55 $ARB.
  • The maximum supply of the token is 100 billion [100,000,000,000] $ARB.
  • No mint or burn functions are present, though the circulating supply can be reduced by sending tokens to the 0x..dead address.
  • At the time of writing this report, there are 145 total token holders. The token allocation is as follows:
  • The contract enforces a maximum sell amount (determined by the owner) which imposes a limit to the number of tokens that can be sold via Pancakeswap in a single transaction.
  • The contract prevents users from selling more than a percentage (determined by the owner) of their total token balance via Pancakeswap in a single transaction, as well as in a set time period (determined by the owner).
  • The contract prevents users from buying more than a percentage (determined by the owner) of the total supply via Pancakeswap in a single transaction, as well as in a set time period (determined by the owner).
  • Blacklisted contracts are not permitted to transfer tokens.
  • There is a Liquidity fee, Treasury fee, Marketing fee, and Afterburner fee on all transfers via Pancakeswap where neither the sender nor the recipient is excluded from fees.
  • There is an additional Sell fee and Afterburner Sell fee added on all sell transactions via Pancakeswap.
  • The contract features an auto-rebase mechanism that is triggered on token transfers when the following conditions are met:
    • The auto-rebase mechanism is enabled by the team.
    • The token has not reached the maximum supply.
    • The caller is not initiating a buy transaction via Pancakeswap.
    • The contract is not currently swapping tokens, performing a rebase, or performing an automatic liquidity add.
    • 15 minutes have passed since this functionality has previously occurred.
  • During a rebase, tokens are automatically added to the total supply. The newly added tokens are distributed proportionally amongst holders in a frictionless manner.
  • The number of tokens added to the total supply is dependent on the total supply at the time of rebasing and the time since deployment.
  • The rebase function properly calls sync() on the Pair addresses to prevent theft-of-liquidity attacks that have occurred with other rebase tokens.
  • Also during transfers, an automatic liquidity add will occur if at least 2 days have passed since the previous automatic liquidity add.
  • A liquidity-add is funded by selling half of the tokens collected as liquidity 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 Treasury fee and Marketing fee are swapped for BUSD and are sent to the team's Treasury wallet and Marketing wallet respectively.
  • The tokens collected through the Afterburner fee are swapped for BUSD and are allocated towards the Jackpot fund.
  • If the current pending Jackpot balance reaches the hard limit set by the team, an amount of BUSD and tokens will be sent to the Buyback address based on the current pending Jackpot balance and the contract's hard Buyback value.
  • Any user that buys a number of tokens via Pancakeswap over the threshold value is eligible to win the Jackpot.
  • The Jackpot winner will be awarded to the last eligible buyer once the Jackpot time span (determined by the owner) has passed since the last eligible buy transaction.
  • A percentage (determined by the owner) of the pending Jackpot tokens and BUSD will be sent to the winner.
  • The remaining percentage of the pending Jackpot tokens and BUSD will be sent to the Buyback address.
  • The contract complies with the BEP-20 token standard.
  • The contract utilizes SafeMath libraries to protect against overflows/underflows.

  • The owner can manually set the rebase rate to any value at any time.
  • The owner can enable/disable the manual rebase rate at any time.
  • The owner can swap all of the $ARB in the contract for BNB and send it to the team's Treasury wallet at any time.
  • The owner can set the last-buy and last-sell restriction time periods to any value between 1 minute and 1 day (in seconds).
  • The owner can enable/disable fees on peer-to-peer transfers.
  • The owner can set the maximum sell amount to any value greater than 100.
  • The owner can set the buy limit percent and sell limit percent to any percentages at any time.
  • The owner can include/exclude accounts from transfer fees at any time.
  • The owner can set total fees up to 35% at any time.
  • The owner can enable/disable automatic liquidity adds and the auto-rebase mechanism at any time.
  • The owner can add/remove any contract address from the transfer blacklist at any time. EOAs cannot be blacklisted.
  • The owner can set the minimum buy value to be eligible for the Jackpot to any value at any time.
  • The owner can set the Jackpot cashout to any value at any time.
  • The owner can set the Jackpot hard buyback and hard limit to any values at any time.
  • The owner can set the Jackpot time span to any value at any time.
  • The owner can update the Automated Market Maker Pair address, Buyback address, Liquidity wallet, Treasury wallet, and Marketing wallet to any addresses at any time.

Audit Results

Vulnerability Category Notes Result
Arbitrary Jump/Storage Write N/A PASS
Centralization of Control
  • The LP tokens generated through automatic liquidity adds are sent to the Liquidity address set by the team.
  • The team can withdraw any $ARB tokens from the contract at any time.
WARNING
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 should monitor, and if any suspicious activity is detected, disable the system altogether. 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

Smart Contract Audit - Inheritance

Function Graph

Smart Contract Audit - Graph

Functions Overview


 ($) = 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] mod

 + [Lib] SafeMathInt 
    - [Int] mul
    - [Int] div
    - [Int] sub
    - [Int] add
    - [Int] abs

 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] allowance
    - [Ext] transfer #
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Int] IPancakeSwapFactory 
    - [Ext] feeTo
    - [Ext] feeToSetter
    - [Ext] getPair
    - [Ext] allPairs
    - [Ext] allPairsLength
    - [Ext] createPair #
    - [Ext] setFeeTo #
    - [Ext] setFeeToSetter #

 + [Int] IPancakeSwapRouter 
    - [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
    - [Ext] removeLiquidityETHSupportingFeeOnTransferTokens #
    - [Ext] removeLiquidityETHWithPermitSupportingFeeOnTransferTokens #
    - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
    - [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
    - [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #

 + [Int] IPancakeSwapPair 
    - [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 #

 +  Ownable 
    - [Pub]  #
    - [Pub] owner
    - [Pub] isOwner
    - [Pub] renounceOwnership #
       - modifiers: onlyOwner
    - [Pub] transferOwnership #
       - modifiers: onlyOwner
    - [Int] _transferOwnership #

 +  ERC20Detailed (IERC20)
    - [Pub]  #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals

 +  Afterburner (ERC20Detailed, Ownable)
    - [Pub]  #
       - modifiers: ERC20Detailed,Ownable
    - [Ext] setRebaseRate #
       - modifiers: onlyOwner
    - [Ext] toggleOwnerRebase #
       - modifiers: onlyOwner
    - [Ext] getLastBuy
    - [Ext] getLastAwardedJackpot
    - [Ext] getPendingJackpotBalance
    - [Ext] getPendingJackpotTokens
    - [Pub] getLastCombustion
    - [Pub] getJackpot
    - [Ext] getLiquidityBacking
    - [Pub] getCirculatingSupply
    - [Ext] totalJackpotOut
    - [Ext] totalJackpotBuyer
    - [Ext] totalJackpotBuyback
    - [Ext] startRebase #
       - modifiers: onlyOwner
    - [Int] rebase #
    - [Ext] transfer #
       - modifiers: validRecipient
    - [Ext] transferFrom #
       - modifiers: validRecipient
    - [Int] _basicTransfer #
    - [Int] _transferFrom #
    - [Pub] shouldAwardJackpot
    - [Pub] isJackpotEligible
    - [Int] processCombustion #
       - modifiers: swapping
    - [Int] awardJackpot #
       - modifiers: swapping
    - [Int] takeFee #
    - [Int] addLiquidity #
       - modifiers: swapping
    - [Int] swapBack #
       - modifiers: swapping
    - [Ext] withdrawAllToTreasury #
       - modifiers: swapping,onlyOwner
    - [Int] shouldTakeFee
    - [Int] shouldRebase
    - [Int] shouldAddLiquidity
    - [Int] shouldSwapBack
    - [Ext] setTwentyFourHour #
       - modifiers: onlyOwner
    - [Ext] setIsTakeFeeOnNormalTransfer #
       - modifiers: onlyOwner
    - [Ext] setMaxSellTransaction #
       - modifiers: onlyOwner
    - [Ext] setSellLimitPercent #
       - modifiers: onlyOwner
    - [Ext] setBuyLimitPercent #
       - modifiers: onlyOwner
    - [Ext] setBuyFees #
       - modifiers: onlyOwner
    - [Ext] setJackpotCashout #
       - modifiers: onlyOwner
    - [Ext] setAutoRebase #
       - modifiers: onlyOwner
    - [Ext] setJackpotHardBuyback #
       - modifiers: onlyOwner
    - [Ext] setBuyBackWallet #
       - modifiers: onlyOwner
    - [Ext] setJackpotMinBuy #
       - modifiers: onlyOwner
    - [Ext] setJackpotTimespan #
       - modifiers: onlyOwner
    - [Ext] setJackpotHardLimit #
       - modifiers: onlyOwner
    - [Ext] setAutoAddLiquidity #
       - modifiers: onlyOwner
    - [Ext] allowance
    - [Ext] decreaseAllowance #
    - [Ext] increaseAllowance #
    - [Ext] approve #
    - [Ext] checkFeeExempt
    - [Ext] isNotInSwap
    - [Ext] manualSync #
    - [Ext] setFeeReceivers #
       - modifiers: onlyOwner
    - [Ext] setWhitelist #
       - modifiers: onlyOwner
    - [Ext] setBotBlacklist #
       - modifiers: onlyOwner
    - [Ext] setPairAddress #
       - modifiers: onlyOwner
    - [Ext] setLP #
       - modifiers: onlyOwner
    - [Ext] totalSupply
    - [Pub] gonsForBalance
    - [Pub] balanceForGons
    - [Pub] index
    - [Pub] balanceOf
    - [Int] isContract
    - [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.