PROOF

Smart Contract Audit Report

Audit Summary

PROOF Audit Report PROOF is building a new ERC-20 token, staking platform, and migrator contract.

For this audit, we reviewed the following contracts:

Audit Findings

No findings were identified, though some centralized aspects are present.
Date: October 5th, 2023.
Updated: October 26th, 2023 to reflect the ProofToken and ProofStaking contract's Mainnet addresses.

Contracts Overview

ProofToken Contract:
  • The total supply of the token is set to 100 million $PROOF [100,000,000] and is initially minted to the contract.
  • No public 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 489 total token holders. The token allocation is as follows:
  • Trading must be enabled by the owner before all transfers can take place on the platform. Only transfers where the sender is either the owner or the contract are permitted when trading is disabled.
  • The contract enforces a maximum transfer limit (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.
  • There is a Revenue fee, Staking fee, and Venture Fund fee on all transfers via Uniswap where neither the sender nor the recipient is excluded from fees.
  • The tokens collected through the fees are stored in the contract address. The tokens are swapped for ETH and sent to the team's Revenue address, Staking address, and Venture Fund address respectively when the following conditions are met:
    • The threshold number of tokens (determined by the owner) in the contract has been reached.
    • The caller is initiating a sell transaction via Uniswap.
    • The contract is not currently swapping tokens.
  • As the contract is implemented with Solidity v0.8.x, it is protected from overflows/underflows.
  • The contract complies with the ERC-20 token standard.

  • The owner can set the Revenue fee, Staking fee, and Venture Fund fee for both fee structures, ensuring that the total buy fee does not exceed 12% and the total sell fee does not exceed 17% at any time.
  • The owner can exclude and include accounts from transfer fees at any time.
  • The owner can exclude and include accounts from the maximum wallet and maximum transfer restrictions at any time.
  • The owner can airdrop any number of tokens from the contract to any number of users at any time.
  • The owner can set the maximum wallet amount and maximum transfer amount to any values greater than zero at any time.
  • The owner can enable/disable trading at any time.
  • The owner can update the threshold number of tokens that triggers the automatic token swapping functionality to any value at any time.
  • The owner can enable/disable the automatic token swapping functionality at any time.
  • The owner can update the Revenue address, Staking address, and Venture Fund address at any time.
  • The owner can withdraw any Proof tokens (besides any tokens collected through fees) from the contract at any time.
ProofStaking Contract:
  • Any user can specify a number of Proof tokens to deposit into the contract at any time. The user must grant the contract a sufficient allowance in order for the deposit to successfully occur.
  • If the user has any pending unstaked tokens, the staked amount is deducted from these tokens.
  • Any user can initiate a withdrawal for any of their previously staked tokens at any time. The specified number of tokens to withdraw are marked as pending and the withdrawal can be manually finalized once the unstake duration (set by the owner) has passed since the withdraw was initiated.
  • Users may elect to restake any current pending unstaked tokens at any time.
  • Any pending ETH rewards are automatically calculated on staking, unstaking, and restaking transactions.
  • Users can claim the total amount of rewards due to them at any time.
  • Any user can directly send ETH to this contract to fund rewards for stakers at any time.
  • The owner can withdraw the contract's full ETH balance at any time. Any withdrawn ETH is added as "ETH debt".
  • The owner can refresh the reward pool which will allocate any ETH sent to this contract while there were currently no active stakers towards rewards.
  • The owner can set the unstaking duration to any value at any time.
HLDtoProofMigrator Contract:
  • This contract allows users to convert their HLD tokens into PROOF tokens.
  • Any user can specify a number of HLD tokens that will be transferred to the contract. The user must grant the contract a sufficient allowance in order for the transfer to successfully occur
  • PROOF tokens are transferred to the user from the contract based on a conversion ratio of 1 PROOF for every 10,000 HLD tokens.

Audit Results

Vulnerability Category Notes Result
Arbitrary Jump/Storage Write N/A PASS
Centralization of Control
  • The owner can pause trading at any time ProofToken contract.
  • The owner can set the unstaking duration to any value at any time in the ProofStaking contract.
PASS
Compiler Issues N/A PASS
Delegate Call to Untrusted Contract N/A PASS
Dependence on Predictable Variables N/A PASS
Ether/Token Theft N/A PASS
Flash Loans N/A PASS
Front Running The automatic token swapping functionality may be susceptible to front-running. The team should monitor, and if any suspicious activity is detected, should lower the swapThreshold value. PASS
Improper Events N/A PASS
Improper Authorization Scheme N/A PASS
Integer Over/Underflow N/A PASS
Logical Issues N/A PASS
Oracle Issues N/A PASS
Outdated Compiler Version N/A PASS
Race Conditions N/A PASS
Reentrancy N/A PASS
Signature Issues N/A PASS
Sybil Attack N/A PASS
Unbounded Loops N/A PASS
Unused Code N/A PASS
Overall Contract Safety   PASS

ProofToken Contract

Smart Contract Audit - Inheritance

Smart Contract Audit - Graph


 ($) = 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 #

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

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

 +  Pausable (Context)
    - [Pub]  #
    - [Pub] paused
    - [Int] _requireNotPaused
    - [Int] _requirePaused
    - [Int] _pause #
       - modifiers: whenNotPaused
    - [Int] _unpause #
       - modifiers: whenPaused

 + [Lib] EnumerableSet 
    - [Prv] _add #
    - [Prv] _remove #
    - [Prv] _contains
    - [Prv] _length
    - [Prv] _at
    - [Prv] _values
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] values
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] values
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] values

 + [Int] IProofToken 
    - [Ext] enableTrading #
    - [Ext] setBots #
    - [Ext] setMaxWallet #
    - [Ext] setMaxTransfer #
    - [Ext] delBots #
    - [Ext] setRevenue #
    - [Ext] setStakingContract #
    - [Ext] setVentureFund #
    - [Ext] setTaxForBuy #
    - [Ext] setTaxForSell #
    - [Ext] withdrawRestAmount #
    - [Ext] setSwapBackSettings #
    - [Ext] excludeWalletsFromTxLimit #
    - [Ext] excludeWalletsFromMaxWallet #
    - [Ext] excludeWalletsFromFees #

 + [Int] IProofAirdrop 
    - [Ext] setProofToken #
    - [Ext] enableAirdrop #
    - [Ext] setBots #
    - [Ext] delBots #
    - [Ext] setAirdropReleaseTime #
    - [Ext] setMinHLDAmountForAirdrop #
    - [Ext] requestAirdrop #
    - [Ext] claimLiquidityAmount #

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

 + [Int] IUniswapV2Factory 
    - [Ext] feeTo
    - [Ext] feeToSetter
    - [Ext] getPair
    - [Ext] allPairs
    - [Ext] allPairsLength
    - [Ext] createPair #
    - [Ext] setFeeTo #
    - [Ext] setFeeToSetter #

 +  ProofToken (Ownable, Pausable, IERC20, IProofToken)
    - [Pub]  #
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals
    - [Ext] totalSupply
    - [Pub] balanceOf
    - [Ext] airdrop #
       - modifiers: onlyOwner
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #
    - [Ext] excludeWalletsFromTxLimit #
       - modifiers: onlyOwner
    - [Ext] excludeWalletsFromMaxWallet #
       - modifiers: onlyOwner
    - [Ext] excludeWalletsFromFees #
       - modifiers: onlyOwner
    - [Ext] enableTrading #
       - modifiers: onlyOwner
    - [Ext] setMaxWallet #
       - modifiers: onlyOwner
    - [Ext] setMaxTransfer #
       - modifiers: onlyOwner
    - [Ext] setSwapBackSettings #
       - modifiers: onlyOwner
    - [Ext] setBots #
       - modifiers: onlyOwner
    - [Ext] delBots #
       - modifiers: onlyOwner
    - [Ext] setRevenue #
       - modifiers: onlyOwner
    - [Ext] setStakingContract #
       - modifiers: onlyOwner
    - [Ext] setVentureFund #
       - modifiers: onlyOwner
    - [Ext] setTaxForBuy #
       - modifiers: onlyOwner
    - [Ext] setTaxForSell #
       - modifiers: onlyOwner
    - [Ext] withdrawRestAmount #
       - modifiers: onlyOwner
    - [Ext]  ($)
    - [Int] _transfer #
    - [Int] _basicTransfer #
    - [Int] _takeFee #
    - [Int] _distributeFees #
    - [Int] _swapTokensToETH #
    - [Int] _transferETH #
    - [Prv] _approve #
    - [Int] _createPair #
    - [Int] _getWrappedToken

ProofStaking Contract

Smart Contract Audit - Inheritance

Smart Contract Audit - Graph


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public
 
 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

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

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

 + [Int] IERC20Permit 
    - [Ext] permit #
    - [Ext] nonces
    - [Ext] DOMAIN_SEPARATOR

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Int] functionStaticCall
    - [Int] functionStaticCall
    - [Int] functionDelegateCall #
    - [Int] functionDelegateCall #
    - [Int] verifyCallResultFromTarget
    - [Int] verifyCallResult
    - [Prv] _revert

 + [Lib] SafeERC20 
    - [Int] safeTransfer #
    - [Int] safeTransferFrom #
    - [Int] safeIncreaseAllowance #
    - [Int] safeDecreaseAllowance #
    - [Int] forceApprove #
    - [Int] safePermit #
    - [Prv] _callOptionalReturn #
    - [Prv] _callOptionalReturnBool #

 + [Lib] EnumerableSet 
    - [Prv] _add #
    - [Prv] _remove #
    - [Prv] _contains
    - [Prv] _length
    - [Prv] _at
    - [Prv] _values
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] values
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] values
    - [Int] add #
    - [Int] remove #
    - [Int] contains
    - [Int] length
    - [Int] at
    - [Int] values

 +  ReentrancyGuard 
    - [Pub]  #

 + [Int] IProofStaking 
    - [Ext] setUnstakingDuration #
    - [Ext] refreshPool #
    - [Ext] stake #
    - [Ext] unstake #
    - [Ext] restakeToken #
    - [Ext] claimUnstakedToken #
    - [Ext] claimRewards #
    - [Ext] getAllETHRecvHistory
    - [Ext] getClaimableRewards
    - [Ext] getStakers
    - [Ext] getClaimableUnstakedToken
    - [Ext] getPendingUnstakeAmount

 +  ProofStaking (Ownable, ReentrancyGuard, IProofStaking)
    - [Pub]  #
    - [Ext] setUnstakingDuration #
       - modifiers: onlyOwner
    - [Ext] stake #
       - modifiers: nonReentrant
    - [Ext] unstake #
       - modifiers: nonReentrant
    - [Ext] restakeToken #
    - [Ext] claimUnstakedToken #
    - [Pub] claimRewards #
    - [Ext] getAllETHRecvHistory
    - [Pub] getClaimableRewards
    - [Pub] getClaimableUnstakedToken
    - [Ext] getPendingUnstakeAmount
    - [Ext] getStakers
    - [Ext] refreshPool #
       - modifiers: onlyOwner
    - [Ext]  ($)
    - [Int] _availableClaimUnstaked
    - [Int] _distributeRewards #
    - [Int] _updateRewardAmount #
    - [Int] _updatePendingUnstakings #
    - [Int] _transferETH #
    - [Int] _claimRewards #

HLDtoProofMigrator Contract

Smart Contract Audit - Inheritance

Smart Contract Audit - Graph


 ($) = 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 #

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

 +  HLDtoProofMigrator 
    - [Ext] migrateFromHLD #

About SourceHat

SourceHat has quickly grown to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1800+ 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!
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 SourceHat Audit?

Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A SourceHat 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.