Chooky

Smart Contract Audit Report

Audit Summary

Chooky Audit Report Chooky is a new ERC-20 token on Ethereum.

For this audit, we reviewed the project team's Chooky contract at 0x244748587f145c0571e92e85429d711d1b4cc43a on the Ethereum Mainnet.

Audit Findings

Informational findings were identified and the team may want to review them. In addition, some centralized aspects are present.
Date: August 28th, 2023.
Updated: August 30th, 2023 to reflect the contract's newly deployed Mainnet address.

Finding #1 - Chooky - Informational

Description: The following state variables can only be set one time in the constructor but are not declared immutable.
WETH, pair, router
Recommendation: The above state variables could be declared immutable for additional gas savings on each reference.

Finding #2 - Chooky - Informational

Description: The following state variables cannot be modified but are not declared constant.
DEAD, ZERO, _totalSupply
Recommendation: The above state variables could be declared constant for additional gas savings on each reference.

Finding #3 - Chooky - 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, deployment costs, and gas costs on all transactions that utilize it.

Contract Overview

  • The total supply of the token is set to 21 million $CHOO [21,000,000].
  • No mint or burn functions are publicly accessible, though the circulating supply can be decreased by sending tokens to the 0x..dead address.
  • At the time of writing this report, 62.46% of the total supply is stored in a PinkSale token locking contract.
  • The remaining 37.54% of the total supply has been sent to an unverified contract.

  • Trading must be enabled by the owner before all transfers can take place on the platform. Only accounts excluded from fees can participate in transfers when trading is disabled. Once trading is enabled it can never be disabled.
  • Blacklisted accounts are prohibited from participating in transfers.
  • The contract enforces a maximum wallet amount that prevents a buy or peer-to-peer transfer from occurring if the recipient's token balance will exceed the limit number of tokens (determined by the owner) after the transfer occurs.
  • Any user that attempts to buy tokens before the contract's anti-snipe number of blocks has passed since trading was enabled is automatically added to the transfer blacklist.
  • There is a fee charged on all transfers where neither the sender nor the recipient is excluded from fees. The contract includes separate fee structures to apply different fee percentages to buys, sells, and peer-to-peer transfers.
  • The tokens collected through fees are stored in the contract address. The tokens are swapped for ETH and sent to the team's Marketing wallet when the following conditions are met:
    • The automatic token swapping 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 swap.
    • The caller is not initiating a buy transaction via Uniswap.
  • 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.
Ownership Controls:
  • The owner can add/remove any address from the transfer blacklist at any time.
  • The owner can withdraw any tokens from the contract at any time.
  • The owner can set the anti-sniper block limit to any value less than 15 blocks at any time.
  • The owner can add/remove any address as an Automated Market Maker Pair at any time.
  • The owner can add/remove any address from the Authorized role at any time.
  • Authorized addresses can set the buy fee, sell fee, and peer-to-peer transfer fee to any percentage up to 5% each at any time.
  • Authorized addresses can exclude and include accounts from fees at any time.
  • Authorized addresses can set the maximum wallet amount to any value greater than 2,100 tokens at any time.
  • Authorized addresses can exclude and include accounts from the maximum wallet limit at any time.
  • Authorized addresses can update the threshold number of tokens needed to trigger the contract's automatic token swapping functionality to any value at any time.
  • Authorized addresses can enable/disable the contract's automatic token swapping functionality at any time.
  • Authorized addresses can withdraw all of the ETH from the contract at any time.
  • Authorized addresses can set the team's Marketing wallet to any address at any time.

Audit Results

Vulnerability Category Notes Result
Arbitrary Jump/Storage Write N/A PASS
Centralization of Control The owner can add any address to the transfer blacklist at any time. WARNING
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

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

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

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

 +  Auth 
    - [Pub]  #
    - [Pub] authorize #
       - modifiers: onlyOwner
    - [Pub] unauthorize #
       - modifiers: onlyOwner
    - [Pub] isOwner
    - [Pub] isAuthorized
    - [Pub] transferOwnership #
       - modifiers: onlyOwner

 + [Int] IDEXFactory 
    - [Ext] createPair #

 + [Int] IDEXRouter 
    - [Ext] factory
    - [Ext] WETH
    - [Ext] addLiquidity #
    - [Ext] addLiquidityETH ($)
    - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
    - [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
    - [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #

 +  Chooky (ERC20, Auth)
    - [Pub]  #
       - modifiers: Auth
    - [Ext]  ($)
    - [Ext] totalSupply
    - [Ext] decimals
    - [Ext] symbol
    - [Ext] name
    - [Ext] getOwner
    - [Pub] balanceOf
    - [Ext] allowance
    - [Pub] approve #
    - [Ext] approveMax #
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Int] _transferFrom #
    - [Int] _basicTransfer #
    - [Int] takeBuyFee #
    - [Int] takeSellFee #
    - [Int] takeTransferFee #
    - [Int] shouldSwapBack
    - [Ext] clearStuckBalance #
       - modifiers: authorized
    - [Ext] rescueERC20 #
       - modifiers: onlyOwner
    - [Ext] tradingStatus #
       - modifiers: onlyOwner
    - [Int] swapBack #
       - modifiers: swapping
    - [Ext] setMaxWallet #
       - modifiers: authorized
    - [Ext] setBL #
       - modifiers: onlyOwner
    - [Ext] updateF #
       - modifiers: onlyOwner
    - [Ext] setIsFeeExempt #
       - modifiers: authorized
    - [Ext] setIsMaxWalletExempt #
       - modifiers: authorized
    - [Ext] setBuyFee #
       - modifiers: authorized
    - [Ext] setSellFee #
       - modifiers: authorized
    - [Ext] setTransferFee #
       - modifiers: authorized
    - [Ext] setMarketingFeeReceivers #
       - modifiers: authorized
    - [Ext] setSwapBackSettings #
       - modifiers: authorized
    - [Pub] setAutomatedMarketMakerPair #
       - modifiers: onlyOwner
    - [Pub] getCirculatingSupply

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.