PROOF

Smart Contract Audit Report

Audit Summary

PROOF is building a new platform where users can launch their own dividend-paying tokens.

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

Audit Findings

Please ensure trust in the team prior to investing as they have notable control in the ecosystem.
Date: March 25th, 2022.
Updated: March 29th, 2022 to reflect the changes made from commit c0744b3fe03e09223a926618e58eb405ec6727d6 to commit f64467d9b773a9863f6b70bb26cfd97a194c4f57.

Finding #1 - PROOF - Informational (Resolved)

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.removeHldAdmin, TokenCutter.getCirculatingSupply, TokenCutter.name, TokenCutter.symbol, TokenCutter.decimals, TokenCutter.totalSupply, TokenCutter.transfer, TokenCutter.approve, TokenCutter.transferFrom, TokenCutter.increaseAllowance, TokenCutter.decreaseAllowance
Recommendation: These functions should be declared external for additional gas savings on each call.
Resolution: The team has declared the above functions external.

Finding #2 - PROOF - Informational (Resolved)

Description: Several state variables can never be modified, but are not declared constant.
TokenCutter.DEAD, TokenCutter.ZERO, TokenCutter.distributorGas, TokenCutter.hldFee, proofTokenFactory.ZERO
Recommendation: These state variables should be declared constant for additional gas savings on each call.
Resolution: The team has declared the above state variables constant.

Finding #3 - PROOF - 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 - DividendDistributor - Informational (Resolved)

Description: The initialization modifier is not used in the contract.
Recommendation: This modifier should either be removed or utilized in a way that fits the project team's intended functionality.
Resolution: The team has removed the initialization modifier.

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, Reward token address, and an LP token unlock time greater than 30 days.
  • Users must also provide at least 1 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 and DividendDistributor Contracts:
  • 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.
  • The contract enforces a maximum wallet amount that prevents a transfer from occurring if the recipient's token balance will exceed the limit number of tokens (determined by the owner) after the transfer occurs.
  • Blacklisted accounts (set by the PROOF team) are prohibited from participating in transfers.
  • There is a Reflections fee, Liquidity fee, Dev fee, and HLD fee on all transfers 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 when the user is selling tokens via Uniswap.
  • The tokens collected from fees are stored in the contract address. The tokens are swapped for ETH for the purpose of funding Uniswap 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 caller is not initiating a buy transaction via Uniswap.
  • Liquidity-adds are automatically performed by selling the tokens collected as fees, pairing the received ETH with the token, and adding it as liquidity to the ETH pair.
  • The LP tokens received through this process are sent to the 0x..dead address.
  • The tokens collected from the Dev Fee are swapped for ETH and sent to the team's Dev wallet.
  • The tokens collected from the HLD Fee are swapped for ETH and sent to the Burner contract. This contract was out of scope for the purpose of this audit.
  • The tokens collected from the Reflections Fee are swapped for ETH and sent to the DividendDistributor contract where it will be swapped for the Reward token set by the team and distributed as rewards.

  • Any user that holds any number of tokens is eligible to claim dividends once the amount of dividends they are due reaches the minimum threshold value determined by the team.
  • Once dividends are distributed, they will need to be claimed; claiming happens automatically on each transfer.
  • Alternatively, a user can manually claim dividends as an individual.
  • There is a wait-time (determined by the owner) between claiming dividend rewards.
  • Claimed dividends are sent to the user's wallet address.

  • 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 Reflections fee, Liquidity fee, and Dev fee to any values as long as the total fee percentages combined do not exceed 17% on sell transactions and 12% on all other token transfers. The HLD fee is set to 2% upon deployment.
  • The owner can exclude/include accounts from transfer fees at any time.
  • The owner can set the maximum transaction and maximum wallet amounts to any values after 24 hours have passed since launch.
  • The owner can exclude/include accounts from the maximum wallet and maximum transaction restrictions at any time after 24 hours have passed since launch.
  • The owner can enable/disable the maximum wallet restriction any time after 24 hours have passed since launch.
  • The owner can reduce the HLD fee to 1% at any time after 72 hours have passed since launch.
  • The owner can enable/disable automatic liquidity adds at any time.
  • The owner can update the threshold number of tokens needed to trigger an automatic liquidity add to any value at any time.
  • The owner can remove accounts from the transfer blacklist at any time.
  • The owner can update the minimum threshold of dividends a user must be due in order to claim rewards to any value at any time.
  • The owner can update the wait time between claiming rewards to any value at any time.
  • The owner can update the amount of gas used for processing to any value 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.
PASS
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] IDividendDistributor 
    - [Ext] setDistributionCriteria #
    - [Ext] setShare #
    - [Ext] deposit ($)
    - [Ext] process #

 +  DividendDistributor (IDividendDistributor)
    - [Pub]  #
    - [Ext] setDistributionCriteria #
       - modifiers: onlyToken
    - [Ext] setShare #
       - modifiers: onlyToken
    - [Ext] deposit ($)
       - modifiers: onlyToken
    - [Ext] process #
       - modifiers: onlyToken
    - [Int] shouldDistribute
    - [Int] distributeDividend #
    - [Ext] claimDividend #
    - [Pub] getUnpaidEarnings
    - [Int] getCumulativeDividends
    - [Int] addShareholder #
    - [Int] removeShareholder #

 + [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] changeFees #
       - modifiers: onlyHldAdmin
    - [Ext] setBots #
       - modifiers: onlyHldAdmin
    - [Pub] swapTradingStatus #
       - modifiers: onlyFactory
    - [Pub] setLaunchedAt #
       - modifiers: onlyFactory
    - [Pub] cancelToken #
       - modifiers: onlyFactory
    - [Pub] removeHldAdmin #
       - modifiers: onlyOwner
    - [Ext] changeTxLimit #
       - modifiers: onlyOwner
    - [Ext] changeWalletLimit #
       - modifiers: onlyOwner
    - [Ext] changeRestrictWhales #
       - modifiers: onlyOwner
    - [Ext] changeIsFeeExempt #
       - modifiers: onlyOwner
    - [Ext] changeIsTxLimitExempt #
       - modifiers: onlyOwner
    - [Ext] changeDistributorGas #
       - modifiers: onlyOwner	   
    - [Ext] setDevWallet #
       - modifiers: onlyOwner
    - [Ext] setOwnerWallet #
       - modifiers: onlyOwner	   
    - [Ext] changeSwapBackSettings #
       - modifiers: onlyOwner
    - [Ext] setDistributionCriteria #
       - modifiers: onlyOwner
    - [Ext] delBot #
       - modifiers: onlyOwner
    - [Pub] getCirculatingSupply
    - [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] _basicTransfer #
    - [Int] _approve #
    - [Int] _spendAllowance #
    - [Int] takeFee #
    - [Int] swapBack #
       - 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 $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 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.