PROOF Reflections

Smart Contract Audit Report

Audit Summary

PROOF Reflections is building a new platform where users can launch their own reflection tokens.

For this audit, we reviewed the project team's TokenCutter and proofTokenFactory contracts at commit 564ed9f5168456a1106d4c65d0d9750826e3b198 on the team's GitHub repository.

Audit Findings

Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
Date: April 1st, 2022.
Updated: April 5th, 2022 to reflect the changes made to the contract that resolves Finding #5.

Finding #1 - PROOFReflections - Informational

Description: Several functions are declared public, but are never called internally.
proofTokenFactory.finalizeToken, proofTokenFactory.cancelToken, TokenCutter.updateHldAdmin, TokenCutter.updateHldBurnerAddress, TokenCutter.swapTradingStatus, TokenCutter.setLaunchedAt, TokenCutter.cancelToken, TokenCutter.name, TokenCutter.symbol, TokenCutter.decimals, TokenCutter.totalSupply, TokenCutter.transfer, TokenCutter.approve, TokenCutter.transferFrom, TokenCutter.increaseAllowance, TokenCutter.decreaseAllowance, TokenCutter.allowance
Recommendation: These functions should be declared external for additional gas savings on each call.

Finding #2 - PROOFReflections - Informational

Description: Several state variables can never be modified, but are not declared constant.
TokenCutter._hldFee, TokenCutter._noTaxMode, proofTokenFactory.ZERO
Recommendation: These state variables should be declared constant for additional gas savings on each call.

Finding #3 - PROOFReflections - Informational

Description: Although the SafeMath library is utilized, the contracts are 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.

Finding #4 - TokenCutter - Informational

Description: The _noTaxMode state variable is used in the following if-statement but will always be false.
if(isFeeExempt[sender] || isFeeExempt[recipient] || _noTaxMode){
Recommendation: This state variable should either be removed or utilized in a way that fits the project team's intended functionality.

Finding #5 - TokenCutter - Informational (Resolved)

Description: The User struct, swapAndLiquifyEnabled state variable, and changeSwapBackSettings function are redundant in the contract.
Recommendation: These should either be removed or utilized in a way that fits the project team's intended functionality.
Resolution: The team has removed the redundant code from the contract.

Contracts Overview

proofTokenFactory Contract:
  • Any user can use this contract to generate their own token by specifying the token name, symbol, total supply, fee percentages, and an LP token unlock time greater than 30 days.
  • Users must also provide at least 0.2 ETH which will automatically be paired with the contract balance of the token and added as liquidity.
  • After the token is created, it can be finalized by the owner at any time.
  • Upon finalizing, the contract makes a call into an external token locking contract to lock the LP tokens for the duration specified by the owner, and trading will be enabled. The external token locking contract was out of scope for the purpose of this audit.
  • Before a token is finalized, it can be canceled by the owner at any time. The initial liquidity will be removed and the returned tokens and ETH will be transferred to the owner.
  • The owner can update the Router address, Locker address, HLDBurner address, and HLDAdmin address to any addresses at any time.
TokenCutter Contract:
  • The total supply of each token will be set by the team upon deployment.
  • No mint or burn functions are present; though the circulating supply can be reduced by sending tokens to the 0x..dead address if desired.

  • The contract enforces a maximum transaction amount (determined by the owner) which imposes a limit to the number of tokens that can be transferred in a single transaction.
  • Blacklisted accounts (set by the PROOF team) are prohibited from participating in transfers.
  • There is a Tax fee and a Dev fee on all transfers where neither the sender nor the recipient is excluded from fees.
  • The tokens collected through the Tax fee are removed from the circulating supply; This serves as a frictionless fee redistribution that automatically benefits all token holders at the time of each transaction.
  • The tokens collected from the Dev fee are stored in the contract address. The tokens are swapped for ETH when the following conditions are met:
    • Trading is currently enabled.
    • The contract is not currently swapping tokens for ETH.
    • The caller is not initiating a buy transaction via Uniswap.
  • The number of tokens used for swapping cannot exceed 5% of the current token balance of the Pair address.
  • 80% of the received ETH is sent to the team's Dev wallet.
  • The remaining 20% of the received ETH is sent to the Burner contract. This contract was out of scope for the purpose of this audit.

  • Upon deployment, the PROOF team can assign an address to an HLD Admin role which can be used to maintain control over various role-restricted functions within the contract.
  • The HLD Admin can manually add accounts to the transfer blacklist at any time.
  • The HLD Admin can update the HLD Burner address to any address at any time.
  • The HLD Admin can transfer their role to another address at any time.

  • The owner can set the Tax fee to any value up to 10%, and the Dev fee to any value up to 5%.
  • The owner can exclude/include accounts from transfer fees at any time.
  • The owner can set the maximum transaction amount to any value after 24 hours has passed since launch.
  • The owner can exclude/include accounts from the maximum transaction amount at any time after 24 hours has passed since launch.
  • The owner can reduce the percentage of received ETH that is allocated to the Burner contract after the token swapping functionality occurs to 10% after 72 hours has passed since launch.
  • The owner can remove accounts from the transfer blacklist at any time.
  • The owner can set the team's Dev wallet to any address at any time.

Audit Results

Vulnerability CategoryNotesResult
Arbitrary Jump/Storage WriteN/APASS
Centralization of Control
  • The team retains the ownership functionality described above.
  • The PROOF team can blacklist accounts from token transfers.
WARNING
Compiler IssuesN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
Ether/Token TheftN/APASS
Flash LoansN/APASS
Front RunningN/APASS
Improper EventsN/APASS
Improper Authorization SchemeN/APASS
Integer Over/UnderflowN/APASS
Logical IssuesN/APASS
Oracle IssuesN/APASS
Outdated Compiler VersionN/APASS
Race ConditionsN/APASS
ReentrancyN/APASS
Signature IssuesN/APASS
Unbounded LoopsN/APASS
Unused CodeN/APASS
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

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

 + [Int] IERC20Metadata (IERC20)
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 + [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

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

 + [Int] IBURNER 
    - [Ext] burnEmUp ($)

 + [Int] IUniswapV2Factory 
    - [Ext] createPair #

 + [Int] IUniswapV2Router02 
    - [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #
    - [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
    - [Ext] factory
    - [Ext] WETH
    - [Ext] addLiquidityETH ($)
    - [Ext] removeLiquidityETH #

 + [Int] ITeamFinanceLocker 
    - [Ext] lockTokens ($)

 + [Int] ITokenCutter 
    - [Ext] swapTradingStatus #
    - [Ext] setLaunchedAt #
    - [Ext] cancelToken #

 + [Lib] Fees 

 +  TokenCutter (Context, IERC20, IERC20Metadata)
    - [Pub]  #
    - [Pub] updateHldAdmin #
       - modifiers: onlyHldAdmin
    - [Pub] updateHldBurnerAddress #
       - modifiers: onlyHldAdmin
    - [Ext] setBots #
       - modifiers: onlyHldAdmin
    - [Pub] swapTradingStatus #
       - modifiers: onlyFactory
    - [Pub] setLaunchedAt #
       - modifiers: onlyFactory
    - [Pub] cancelToken #
       - modifiers: onlyFactory
    - [Ext] changeFees #
       - modifiers: onlyOwner
    - [Ext] reduceHldFee #
       - modifiers: onlyOwner
    - [Ext] changeTxLimit #
       - modifiers: onlyOwner
    - [Ext] changeIsFeeExempt #
       - modifiers: onlyOwner
    - [Ext] changeIsTxLimitExempt #
       - modifiers: onlyOwner
    - [Ext] setDevWallet #
       - modifiers: onlyOwner
    - [Ext] changeSwapBackSettings #
       - modifiers: onlyOwner
    - [Ext] delBot #
       - modifiers: onlyOwner
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] approve #
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Prv] tokenFromReflection
    - [Pub] transferFrom #
    - [Prv] removeAllFee #
    - [Prv] restoreAllFee #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Prv] _transfer #
    - [Prv] _tokenTransfer #
    - [Prv] _approve #
    - [Prv] _takeDev #
    - [Prv] _reflectFee #
    - [Prv] _transferStandard #
    - [Prv] _getValues
    - [Prv] _getTValues
    - [Prv] _getRate
    - [Prv] _getCurrentSupply
    - [Prv] _getRValues
    - [Prv] swapTokensForEth #
       - modifiers: lockTheSwap
    - [Ext]  ($)

 +  proofTokenFactory (Ownable)
    - [Pub]  #
    - [Ext] createToken ($)
    - [Pub] finalizeToken ($)
    - [Pub] cancelToken #
    - [Ext] setLockerAddress #
       - modifiers: onlyOwner
    - [Ext] setRouterAddress #
       - modifiers: onlyOwner
    - [Ext] setHldBurner #
       - modifiers: onlyOwner
    - [Ext] setHldAdmin #
       - 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 $10 billion U.S. dollars in on-chain value.
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.