Matrix Protocol - Audit Report

Summary

Matrix Protocol Audit Report Matrix Protocol ($MTX) is a new community-driven DeFi token on the Binance Smart Chain that is an automatic liquidity providing protocol that pays out static rewards to holders.

Matrix Protocol Token contract is deployed at 0xe28832f94Aa99d3eD4c61EF805330168556b4179 on the Binance Smartchain mainnet.

Notes on the Contract:
  • The total supply of the token is initially set to 1 quadrillion $MTX [1,000,000,000,000,000].
  • No minting 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, 60.44% of the total supply has been sent to the 0x..dead address.
  • 15.12% of the total supply belongs to the owner.
  • 3.57% of the total supply is in Pancakeswap liquidity.
  • Of that liquidity, 88.76% of the total supply is stored in a token locking contract behind a proxy.
  • 10.54% of the LP tokens have been sent to the 0x..dead address.
  • The top 5 holders (excluding the owner) own a cumulative 3.84% of the total supply.

  • There is a tax fee, liquidity fee, charity fee, and marketing fee, on all transactions for any "non-excluded" address that participates in a transfer. Separate fee structures can be set by the team to apply different fee percentages depending on whether the user is buying or selling via Pancakeswap, or simply transferring tokens to another address.
  • Users who hold tokens will automatically benefit from the frictionless fee redistribution at the time of each transaction as the tokens collected through the tax fee are removed from the circulating supply.
  • The liquidity fee charged on transactions is stored in the contract address balance. Once a threshold value (determined by the owner) is met, a swap will occur for the purpose of funding Pancakeswap liquidity.
  • Liquidity-adds are funded by selling a portion of the tokens collected as fees (after the token threshold is met), then pairing the received BNB with the token, and adding it as liquidity to the BNB pair.
  • The recipient of the newly created LP tokens is currently the 0x..dead address.
  • The tokens collected from the charity fee are stored in the contract address balance. Once a threshold value (determined by the owner) is met, the tokens are swapped for BNB and sent to the team's Charity wallet.
  • The tokens collected from the marketing fee are sent to the team's Marketing wallet.

  • The contract utilizes anti-sniper logic which is used to identify addresses that are attempting to buy when trading is paused by the owner. The address attempting the transfer will be blacklisted from trading, and the amount of tokens being transferred will be sent to the contract address.
  • The contract utilizes SafeMath libraries along with following the BEP20 standard.
Ownership Controls:
  • Ownership has not been renounced.
  • The owner can modify the tax fee, liquidity fee, marketing fee, and charity fee for each fee structure to any percentages at any time
  • The owner can pause/unpause trading at any time.
  • The owner of the contract can exclude accounts from transfer fees.
  • The owner can set and update a maximum transaction amount at any time, which will impose a limit to the number of tokens that can be transferred during any given transaction.
  • The owner can enable/disable automatic liquidity adds.
  • The owner can update the threshold number of tokens needed to perform automatic liquidity adds.
  • The owner (or any account that is excluded from fees) can airdrop any amount of tokens to any addresses at any time.
  • The owner can manually add and remove accounts from the blacklist.
  • The owner can enable/disable the anti-sniper functionality.
  • The owner can update the Marketing wallet and Charity wallet at any time.
  • The owner can update the LP token recipient address to any address at any time.
  • The owner can update the Pancakeswap Router and Pair addresses at any time.
Audit Findings Summary
  • No external threats were identified.
  • Please ensure trust in the team prior to investing as they have substantial control in the ecosystem and hold 5x as many tokens as are in liquidity.
  • Date: November 12th, 2021.

Audit Results

Vulnerability CategoryNotesResult
Arbitrary Storage WriteN/APASS
Arbitrary JumpN/APASS
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
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

ERC20 Token Graph


Inheritence Chart

Multi-file Token


Functions Overview


 ($) = payable function
 # = non-constant function
 
 +  Context 
    - [Int]  #
    - [Int] _msgSender
    - [Int] _msgData

 +  Ownable (Context)
    - [Int]  #
    - [Pub] owner
    - [Pub] renounceOwnership #
       - modifiers: onlyOwner
    - [Pub] transferOwnership #
       - modifiers: onlyOwner

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Prv] _functionCallWithValue #

 + [Int] IBEP20 
    - [Ext] totalSupply
    - [Ext] decimals
    - [Ext] symbol
    - [Ext] name
    - [Ext] getOwner
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Lib] SafeMath 
    - [Int] add
    - [Int] sub
    - [Int] sub
    - [Int] mul
    - [Int] div
    - [Int] div
    - [Int] mod
    - [Int] mod
    - [Int] min
    - [Int] sqrt

 + [Int] IPancakePair 
    - [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] IPancakeFactory 
    - [Ext] feeTo
    - [Ext] feeToSetter
    - [Ext] getPair
    - [Ext] allPairs
    - [Ext] allPairsLength
    - [Ext] createPair #
    - [Ext] setFeeTo #
    - [Ext] setFeeToSetter #

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

 +  LPSwapSupport (Ownable)
    - [Pub]  #
    - [Int] _approve #
    - [Int] _balanceOf
    - [Pub] updateRouter #
       - modifiers: onlyOwner
    - [Ext] updateLiquidityReceiver #
       - modifiers: onlyOwner
    - [Pub] updateRouterAndPair #
       - modifiers: onlyOwner
    - [Pub] updateLPPair #
       - modifiers: onlyOwner
    - [Pub] setSwapAndLiquifyEnabled #
       - modifiers: onlyOwner
    - [Int] swapAndLiquify #
    - [Int] swapTokensForCurrency #
    - [Prv] swapTokensForCurrencyUnchecked #
    - [Int] swapTokensForCurrencyAdv #
    - [Prv] _swapTokensForCurrencyAdv #
    - [Prv] addLiquidity #
    - [Int] swapCurrencyForTokens #
    - [Int] swapCurrencyForTokensAdv #
    - [Int] swapCurrencyForTokensUnchecked #
    - [Prv] _swapCurrencyForTokensAdv #
    - [Ext] updateTokenSwapRange #
       - modifiers: onlyOwner

 +  AntiLPSniper (Ownable)
    - [Int] banHammer #
    - [Ext] updateBlacklist #
       - modifiers: onlyOwner
    - [Ext] enableAntiSniper #
       - modifiers: onlyOwner
    - [Ext] openTrading #
       - modifiers: onlyOwner

 +  MatrixProtocol (IBEP20, LPSwapSupport, AntiLPSniper)
    - [Pub]  ($)
       - modifiers: LPSwapSupport
    - [Pub] totalSupply
    - [Ext] decimals
    - [Pub] balanceOf
    - [Int] _balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Pub] totalFees
    - [Ext] getOwner
    - [Pub] tokenFromReflection
    - [Pub] excludeFromFee #
       - modifiers: onlyOwner
    - [Ext]  ($)
    - [Prv] _reflectFee #
    - [Prv] _getRate
    - [Prv] _getCurrentSupply
    - [Int] _takeLiquidity #
    - [Prv] _takeOtherFees #
    - [Int] _approve #
    - [Prv] _transfer #
    - [Prv] valuesForNoFees
    - [Ext] pushSwap #
    - [Prv] selectSwapEvent #
       - modifiers: lockTheSwap
    - [Prv] takeFees #
    - [Prv] _transferStandard #
    - [Ext] updateBuyFees #
       - modifiers: onlyOwner
    - [Ext] updateSellFees #
       - modifiers: onlyOwner
    - [Ext] updateTransferFees #
       - modifiers: onlyOwner
    - [Ext] updateMarketingWallet #
       - modifiers: onlyOwner
    - [Ext] updateCharityWallet #
       - modifiers: onlyOwner
    - [Ext] updateMaxTxSize #
       - modifiers: onlyOwner
    - [Ext] openTrading #
       - modifiers: onlyOwner
    - [Ext] pauseTrading #
       - modifiers: onlyOwner
    - [Ext] batchAirdrop #
    - [Prv] _batchAirdrop #
       - modifiers: lockTheSwap