WEMP - Smart Contract Audit Report

Audit Summary

WEMP ($WEMP) is a new BEP-20 token on the Binance Smart Chain that pays out static rewards to holders.

We reviewed the WEMP contract at 0xfbe777A4376d0A7E1892162a7daAd190D7f091bA on the Binance Smart Chain mainnet.

Audit Findings

Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
Date: February 17th, 2022.
Updated: February 24th, 2022 to reflect the contract's new mainnet address.

Finding #1 - WEMP - Low (Resolved)

Description: Upon deployment, the totalSwapFee fee denominator includes all of the fees (besides the tax fee). If the owner modifies the Marketing fee, Charity fee, or Buyback fee, the totalSwapFee fee denominator is recalculated and no longer includes the Exchange fee, Staff Wage fee, and Women fee.
Risk/Impact: The percentage of BNB that is sent to team wallets in the distributeFee() function will be miscalculated as the fee denominator will no longer be accurate.
Recommendation: All fees (besides the tax fee) should be included when recalculating the totalSwapFee variable in the setMarketingFeePercent(), setCharityFeePercent(), and setBuyBackFeePercent() functions.
Resolution: The team has implemented the above recommendation.

Finding #2 - WEMP - Informational

Description: Although the SafeMath library is utilized, the contract is implemented with Solidity v0.8.x 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 600 trillion $WEMP [600,000,000,000,000].
  • No mint functions are present in the contract.
  • The owner can burn their own tokens to reduce the total supply.
  • At the time of writing this report, 100% of the total supply belongs to the owner.

  • There is a Tax fee, Charity fee, Marketing fee, Buyback fee, Exchange fee, Staff Wage fee, and Women fee, on all transfers via Pancakeswap where neither the sender nor the recipient is excluded from fees.
  • The tokens collected from the Tax fee are removed from the circulating supply; This serves as a frictionless fee redistribution which automatically benefits all token holders at the time of each transaction.
  • The tokens collected from the Charity fee, Marketing fee, Exchange fee, Staff Wage fee, and Women fee, and Buyback fee are stored in the contract address. Once the threshold number of tokens (determined by the owner) is met, the tokens are swapped for BNB and sent to their respective fee wallets controlled by the team.
  • The contract enforces a maximum sell limit (determined by the owner) when selling tokens via Pancakeswap.
  • As the contract is implemented with Solidity v0.8.x, it is protected from overflows/underflows.
  • The contract complies with the BEP-20 token standard.
Ownership Controls:
  • The owner can modify each of the seven fees to any percentage at any time.
  • The owner can exclude and include accounts from transfer fees and reward distribution.
  • The owner can disable transfer fees at any time.
  • The owner can update the threshold number of tokens that triggers the automatic token swapping and sending functionality to any value at any time.
  • The owner can enable/disable the automatic sending of BNB for each of the team's fee wallets at any time.
  • The owner can update the maximum sell limit to any value at any time.
  • The owner can disable the maximum sell limit at any time.
  • The owner can withdraw any BNB or tokens from the contract at any time.
  • The owner can pause the contract at any time which disables all trading and ownership-restricted functionality.

External Threat Results

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
Centralization of Control
  • The owner can modify each of the seven fees to any percentage at any time.
  • The owner can withdraw any tokens from the contract at any time.
  • 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
    
     + [Int] IBEP20 
        - [Ext] totalSupply
        - [Ext] balanceOf
        - [Ext] burn #
        - [Ext] transfer #
        - [Ext] allowance
        - [Ext] approve #
        - [Ext] transferFrom #
    
     + [Int] IBEP20Metadata (IBEP20)
        - [Ext] name
        - [Ext] symbol
        - [Ext] decimals
    
     +  Context 
        - [Int] _msgSender
        - [Int] _msgData
    
     +  Pausable (Context)
        - [Pub]  #
        - [Pub] paused
        - [Int] _pause #
           - modifiers: whenNotPaused
        - [Int] _unpause #
           - modifiers: whenPaused
    
     +  Ownable (Context, Pausable)
        - [Pub]  #
        - [Pub] owner
        - [Pub] renounceOwnership #
           - modifiers: onlyOwner,whenNotPaused
        - [Pub] transferOwnership #
           - modifiers: onlyOwner,whenNotPaused
    
     + [Lib] SafeMath 
        - [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
    
     + [Lib] Address 
        - [Int] isContract
        - [Int] sendValue #
        - [Int] functionCall #
        - [Int] functionCall #
        - [Int] functionCallWithValue #
        - [Int] functionCallWithValue #
        - [Int] functionStaticCall
        - [Int] functionStaticCall
        - [Int] functionDelegateCall #
        - [Int] functionDelegateCall #
        - [Prv] _verifyCallResult
    
     + [Int] IUniswapV2Factory 
        - [Ext] feeTo
        - [Ext] feeToSetter
        - [Ext] getPair
        - [Ext] allPairs
        - [Ext] allPairsLength
        - [Ext] createPair #
        - [Ext] setFeeTo #
        - [Ext] setFeeToSetter #
    
     + [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] 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 #
    
     +  WEMP (Context, IBEP20, IBEP20Metadata, Pausable, Ownable)
        - [Pub]  #
        - [Ext] name
        - [Ext] symbol
        - [Ext] decimals
        - [Ext] totalSupply
        - [Pub] balanceOf
        - [Ext] isExcludedFromDexFee
        - [Ext] isExcludedFromReward
        - [Ext] totalFees
        - [Ext] transfer #
           - modifiers: whenNotPaused
        - [Ext] allowance
           - modifiers: whenNotPaused
        - [Ext] approve #
           - modifiers: whenNotPaused
        - [Ext] transferFrom #
           - modifiers: whenNotPaused
        - [Ext] increaseAllowance #
           - modifiers: whenNotPaused
        - [Ext] decreaseAllowance #
           - modifiers: whenNotPaused
        - [Ext] pauseContract #
           - modifiers: onlyOwner
        - [Ext] unPauseContract #
           - modifiers: onlyOwner
        - [Ext] burn #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] excludeFromReward #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] includeInReward #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] excludeFromDexFee #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] includeInDexFee #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] setTaxFeePercent #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] setMarketingFeePercent #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] setCharityFeePercent #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] setBuyBackFeePercent #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] enableswap #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] setMaximumSellLimitUniswap #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] setMinimumTokensBeforeSwap #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] setEnableFee #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] setEnableMaxSellLimit #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] withdrawToken #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext] withdrawBNBFromContract #
           - modifiers: onlyOwner,whenNotPaused
        - [Ext]  ($)
        - [Int] _approve #
        - [Int] _transfer #
        - [Int] _burn #
        - [Int] _tokenTransfer #
        - [Int] _transferStandard #
        - [Int] _transferBothExcluded #
        - [Int] _transferToExcluded #
        - [Int] _transferFromExcluded #
        - [Int] getTValues
        - [Int] getRValues
        - [Int] calculateTaxFee
        - [Int] calculateSwapFee
        - [Int] takeReflectionFee #
        - [Int] takeSwapFee #
        - [Int] removeAllFee #
        - [Int] restoreAllFee #
        - [Int] distributeFee #
        - [Int] transferBNBToAddress #
        - [Int] swapTokensForEth #
        - [Int] swapETHForTokens #
        - [Int] tokenFromReflection
        - [Int] getRate
        - [Int] getCurrentSupply