Q1 2025 Web3 Security ReportAccess control failures led to $1.63 billion in losses
Discover report insights
  • Hacken
  • Audits
  • squidgrow
  • [SCA] SquidGrow / SquidGrow V3 Contract / Aug2024

SquidGrow

Audit name:

[SCA] SquidGrow / SquidGrow V3 Contract / Aug2024

Date:

Sep 3, 2024

Table of Content

Introduction
Audit Summary
System Overview
Risks
Findings
Appendix 1. Severity Definitions
Appendix 2. Scope
Disclaimer

Want a comprehensive audit report like this?

Introduction

We express our gratitude to the SquidGrow team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

SquidGrow's Ecosystem has multiple products including a DEX, NFT Marketplace, & Liquidity Locker. Ecosystem supports Ethereum, & Binance Smart Chain.

Document

NameSmart Contract Code Review and Security Analysis Report for SquidGrow
Audited ByKornel Światłowski
Approved ByPrzemyslaw Swiatowiec
Websitehttps://www.squidgrow.com/
Changelog30/08/2024 - Preliminary Report; 03/09/2024 - Final Report
PlatformEthereum, BSC
LanguageSolidity
TagsERC20
Methodologyhttps://hackenio.cc/sc_methodology
  • Document

    Name
    Smart Contract Code Review and Security Analysis Report for SquidGrow
    Audited By
    Kornel Światłowski
    Approved By
    Przemyslaw Swiatowiec
    Changelog
    30/08/2024 - Preliminary Report; 03/09/2024 - Final Report
    Platform
    Ethereum, BSC
    Language
    Solidity
    Tags
    ERC20

Review Scope

Repositoryhttps://github.com/shibtoshi/SquidGrowV3-Token
Commit0f0f9f748515b896a1a1bbea04e7ff69e0a570a0

Audit Summary

5Total Findings
0Resolved
5Accepted
0Mitigated

The system users should acknowledge all the risks summed up in the risks section of the report

Documentation quality

  • Functional requirements are present, but only in a limited capacity.

  • Technical description is not provided.

Code quality

  • Insufficient Gas modeling.

  • The development environment is configured.

Test coverage

Code coverage of the project is 30% (branch coverage).

  • Negative cases coverage is missing. Some functions are not covered with test.

System Overview

The SquidGrow smart contract implements a custom ERC20 token, "SQGROW," with additional security and control features. It includes role-based access control to manage key functionalities, such as enabling trading, pausing transfers, and managing a whitelist. The contract enforces strict conditions on when trading can be initiated and includes mechanisms to pause trading under specific circumstances. It also allows for certain addresses to be whitelisted, enabling them to trade even when the contract is paused. All initial supply is minted to a deployer. Additional minting is not allowed. It has the following attributes:

  • Name: SquidGrow

  • Symbol: SQGROW

  • Decimals: 9

  • Total supply: 1000000_000.

Privileged roles

There is a privileged role defined by the AccessControl mechanism, specifically the DEFAULT_ADMIN_ROLE. This role has extensive control over the contract's functionality. Below are the key actions that the holder of this role can perform:

  • Pauses all token transfers for exactly one hour. This can only be done once every 24 hours.

  • Adds or removes addresses from the whitelist, allowing them to trade even when the contract is paused.

  • Enables trading of the token, setting the tradingEnabled flag to true. This can only be done once, and trading can be delayed by a specified amount of time.

Risks

Absence of a Token Burn Mechanism: The project lacks a mechanism to burn tokens, facing challenges in managing supply dynamically, affecting the token's value stability and inflation control.

Potential Blacklist Mechanism: The DEFAULTADMINROLE can block a given address from trading for 1 hour every 24 hours.

Findings

Code
Title
Status
Severity
F-2024-5634Missing Events For Critical Actions
accepted

Observation
F-2024-5633Excessive Use of DEFAULTADMINROLE for Routine Operations in SquidGrow
accepted

Observation
F-2024-5630Redundant Import
accepted

Observation
F-2024-5629Assignment of Default Value to Variables Increases Gas Consumption
accepted

Observation
F-2024-5628Floating Pragma
accepted

Observation
1-5 of 5 findings

Identify vulnerabilities in your smart contracts.

Appendix 1. Severity Definitions

When auditing smart contracts, Hacken is using a risk-based approach that considers Likelihood, Impact, Exploitability and Complexity metrics to evaluate findings and score severities.

Reference on how risk scoring is done is available through the repository in our Github organization:

Severity

Description

Critical
Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation.

High
High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation.

Medium
Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category.

Low
Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution, do not affect security score but can affect code quality score.
  • Severity

    Critical

    Description

    Critical vulnerabilities are usually straightforward to exploit and can lead to the loss of user funds or contract state manipulation.

    Severity

    High

    Description

    High vulnerabilities are usually harder to exploit, requiring specific conditions, or have a more limited scope, but can still lead to the loss of user funds or contract state manipulation.

    Severity

    Medium

    Description

    Medium vulnerabilities are usually limited to state manipulations and, in most cases, cannot lead to asset loss. Contradictions and requirements violations. Major deviations from best practices are also in this category.

    Severity

    Low

    Description

    Major deviations from best practices or major Gas inefficiency. These issues will not have a significant impact on code execution, do not affect security score but can affect code quality score.

Appendix 2. Scope

The scope of the project includes the following smart contracts from the provided repository:

Scope Details

Repositoryhttps://github.com/shibtoshi/SquidGrowV3-Token
Commit0f0f9f748515b896a1a1bbea04e7ff69e0a570a0
Whitepaper-
Requirements-
Technical Requirements-

Contracts in Scope

contracts
SquidGrow.sol - contracts/SquidGrow.sol

Disclaimer