Fantom Floaty Capital - Smart Contract Audit Report

Audit Summary

Fantom Floaty Capital Audit Report Fantom Floaty Capital ($FFC) is a new ERC-20 token on Fantom that provides automatic liquidity adds.

We reviewed the FantomFloatyCap contract at 0x3f21782d931583607F6e78f053E735513fF7d799 on the Fantom mainnet.

Audit Findings

Please ensure trust in the team prior to investing as they have notable control in the ecosystem.
Date: February 16th, 2022.

Finding #1 - FantomFloatyCap - Informational

Description: Two functions are declared public, but are never called internally.
			
setAutomatedMarketMakerPair, isExcludedFromFees
Recommendation: We recommend declaring these functions external for additional gas savings on each call.

Finding #2 - FantomFloatyCap - Informational

Description: The manualBurnFrequency state variable can never be modified, but is not declared constant.
Recommendation: This state variable can be declared constant for additional gas savings on each reference and to reduce deployment costs.

Finding #3 - FantomFloatyCap - Informational

Description: Although the SafeMath library is utilized, the contract is deployed with Solidity v0.8.9 which has built-in overflow checks.
Recommendation: SafeMath could be safely removed to reduce contract size and deployment costs.

Contract Overview

  • The total supply of the token is set to 1 billion $FFC [1,000,000,000].
  • No mint or burn functions exist, though the circulating supply can be decreased by sending tokens to the 0x..dead address.
  • At the time of writing this report, there are 209 total token holders. The token allocation is as follows:
    • 53.49% of the total supply is in Spookyswap liquidity.
    • Of that liquidity, 84.5% of the LP tokens are stored in an unverified contract.
    • 13.29% of the total supply has been sent to the 0x..dead address.
    • The next five holders own a cumulative 13.38% of the total supply.

  • There is a Liquidity fee, Marketing fee, and Treasury fee on all transfers via Spookyswap where neither the sender nor the recipient is excluded from fees. A separate fee structure can be set by the team to apply different fee percentages depending on whether the user is buying or selling during the transfer.
  • The fees charged during transfers are stored in the contract address. The tokens are swapped for FTM for the purpose of funding Spookyswap liquidity when the following conditions are met:
    • The automatic liquidity add functionality is enabled by the team.
    • The threshold number of tokens in the contract address (determined by the owner) has been reached.
    • The contract is not currently performing an automatic liquidity add.
    • The transfer is not a buying transaction via Spookyswap.
  • Liquidity-adds are automatically performed by selling the tokens collected as fees, pairing the received FTM with the token, and adding it as liquidity to the pair.
  • The LP tokens received through this process are sent to the 0x..dead address.
  • The tokens collected from the Marketing fee and Treasury fee are swapped for FTM and sent to the team's Marketing wallet and Treasury wallet respectively.
  • A percentage of tokens (determined by the owner) in the Spookyswap Pair address will automatically be sent to the 0x..dead address on all sell transfers via Spookyswap as long as the wait time has passed since this functionality has previously occurred.
  • Although logic for a maximum transaction amount, maximum wallet amount, and transfer delay exist in the contract, these features have been permanently disabled by the owner.
  • As the contract is deployed with Solidity v0.8.9, it is protected from overflows/underflows.
  • The contract complies with the ERC-20 token standard.
Ownership Controls:
  • The owner can modify the Liquidity fee, Marketing fee, and Treasury fee for both the buy and sell fee structures. The total fee percentages combined must not exceed 20% when buying and 25% when selling.
  • The owner can exclude and include accounts from transfer fees.
  • The owner can enable/disable the automatic swapping functionality at any time.
  • The owner can update the threshold number of tokens needed to trigger the automatic swapping functionality to any value between 10,000 and 5 million tokens.
  • The owner can update the percentage of tokens that are automatically sent to the 0x..dead address from the Spookyswap Pair address on sells via Spookyswap to any percentage between 0% and 10%.
  • The owner can update the amount of time that must pass before the above functionality can reoccur to any time greater than 10 minutes (in seconds).
  • The owner can manually burn up to 10% of the Spookyswap Pair token balance every 30 minutes.
  • The owner can withdraw all of the FTM from the contract address at any time.
  • The owner can update the team's Marketing wallet and Treasury wallet to any addresses at any time.
  • The owner can update the Automated Market Maker Pair contract address at any time.

External Threat Results

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Centralization of Control
  • The owner can set total buy fees up to 20% and total sell fees up to 25%.
  • The owner can manually burn up to 10% of the Spookyswap Pair token balance every 30 minutes.
  • WARNING
    Delegate Call to Untrusted ContractN/APASS
    Dependence on Predictable VariablesN/APASS
    Deprecated OpcodesN/APASS
    Ether ThiefN/APASS
    ExceptionsN/APASS
    External CallsN/APASS
    Flash LoansN/APASS
    Integer Over/UnderflowN/APASS
    Logical IssuesN/APASS
    Multiple SendsN/APASS
    OraclesN/APASS
    SuicideN/APASS
    State Change External CallsN/APASS
    Unchecked RetvalN/APASS
    User Supplied AssertionN/APASS
    Critical Solidity CompilerN/APASS
    Overall Contract Safety PASS

    Function Graph

    BEP20 Token Graph

    Inheritance Chart

    Multi-file Token

    Functions Overview

    												
    ($) = payable function
     # = non-constant function
    
     +  Context 
        - [Int] _msgSender
        - [Int] _msgData
    
     + [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] IERC20 
        - [Ext] totalSupply
        - [Ext] balanceOf
        - [Ext] transfer #
        - [Ext] allowance
        - [Ext] approve #
        - [Ext] transferFrom #
    
     + [Int] IERC20Metadata (IERC20)
        - [Ext] name
        - [Ext] symbol
        - [Ext] decimals
    
     +  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 #
    
     + [Lib] SafeMath 
        - [Int] add
        - [Int] sub
        - [Int] sub
        - [Int] mul
        - [Int] div
        - [Int] div
        - [Int] mod
        - [Int] mod
    
     +  Ownable (Context)
        - [Pub]  #
        - [Pub] owner
        - [Pub] renounceOwnership #
           - modifiers: onlyOwner
        - [Pub] transferOwnership #
           - modifiers: onlyOwner
    
     + [Lib] SafeMathInt 
        - [Int] mul
        - [Int] div
        - [Int] sub
        - [Int] add
        - [Int] abs
        - [Int] toUint256Safe
    
     + [Lib] SafeMathUint 
        - [Int] toInt256Safe
    
     + [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 #
    
     +  FantomFloatyCap (ERC20, Ownable)
        - [Pub]  #
           - modifiers: ERC20
        - [Ext]  ($)
        - [Ext] enableTrading #
           - modifiers: onlyOwner
        - [Ext] removeLimits #
           - modifiers: onlyOwner
        - [Ext] disableTransferDelay #
           - modifiers: onlyOwner
        - [Ext] updateSwapTokensAtAmount #
           - modifiers: onlyOwner
        - [Ext] updateMaxTxnAmount #
           - modifiers: onlyOwner
        - [Ext] updateMaxWalletAmount #
           - modifiers: onlyOwner
        - [Pub] excludeFromMaxTransaction #
           - modifiers: onlyOwner
        - [Ext] updateSwapEnabled #
           - modifiers: onlyOwner
        - [Ext] updateBuyFees #
           - modifiers: onlyOwner
        - [Ext] updateSellFees #
           - modifiers: onlyOwner
        - [Pub] excludeFromFees #
           - modifiers: onlyOwner
        - [Pub] setAutomatedMarketMakerPair #
           - modifiers: onlyOwner
        - [Prv] _setAutomatedMarketMakerPair #
        - [Ext] updateMarketingWallet #
           - modifiers: onlyOwner
        - [Ext] updateTreasuryWallet #
           - modifiers: onlyOwner
        - [Pub] isExcludedFromFees
        - [Int] _transfer #
        - [Prv] swapTokensForEth #
        - [Prv] addLiquidity #
        - [Prv] swapBack #
        - [Ext] setAutoLPBurnSettings #
           - modifiers: onlyOwner
        - [Int] autoBurnLiquidityPairTokens #
        - [Ext] manualBurnLiquidityPairTokens #
           - modifiers: onlyOwner
        - [Ext] withdrawStuckETH #
           - modifiers: onlyOwner