Q2 2026 Security & Compliance Report67 incidents, $764M in losses, 88% from operational failures.
Get the report →

Audit name:

[SCA] HyperCycle | Staking + Marketplace | May2023

Date:

May 29, 2023

Table of Content

Introduction
Audit Summary
Document Information
System Overview
Executive Summary
Findings
Appendix 1. Severity Definitions
Appendix 2. Scope
Disclaimer

Want a comprehensive audit report like this?

Introduction

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

HyperCycle is the Internet of AI. Their mission is to facilitate direct AI-to-AI communication without the need for intermediaries. Their network constantly increases its overall intelligence and revolutionises global AI consumption.

titlecontent
PlatformEVM
LanguageSolidity
TagsERC721; Staking; Markeplace
Timeline04/05/2023 - 30/05/2023
Methodologyhttps://hackenio.cc/sc_methodology

    Review Scope

    Repositoryhttps://gitlab.com/dliendo05/hypc-polygon/-/tree/develop
    Commite60234e9e8558e05f4614ed25a9ba883cec565d9

    Audit Summary

    Total10/10
    Security Score

    10/10

    Test Coverage

    100.0%

    Code Quality Score

    10/10

    Documentation Quality Score

    10/10

    31Total Findings
    30Resolved
    0Accepted
    1Mitigated

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

    Document Information

    This report may contain confidential information about IT systems and the intellectual property of the Customer, as well as information about potential vulnerabilities and methods of their exploitation.

    The report can be disclosed publicly after prior consent by another Party. Any subsequent publication of this report shall be without mandatory consent.

    Document

    NameSmart Contract Code Review and Security Analysis Report for HyperCycle
    Audited ByHacken
    Websitehttps://www.hypercycle.ai
    Changelog11/05/2023 - Initial Review
    29/05/2023 - Second Review
    30/05/2023 - Third Review
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for HyperCycle
      Audited By
      Hacken
      Changelog
      11/05/2023 - Initial Review
      29/05/2023 - Second Review
      30/05/2023 - Third Review

    System Overview

    Hypercycle is a staking protocol with the following contracts:

    • CHYPC — an ERC721 NFT collection that includes the functionality to mint, burn, and assign custom data to NFT tokens. The contract interacts with two other contracts, HYPCSwap and HYPC, and supports the management of token ownership and data assignment, while ensuring proper initialization and contract interactions.

    • CrowdFundPoolHYPC — a crowdfunding pool for Hypercycle (HYPC) tokens, allowing users to create proposals, deposit funds, and earn interest over time. It manages the lifecycle of proposals and the interactions between users, such as depositing, withdrawing, and updating interest earnings, as well as handling token swaps and NFT assignments.

    • HYPCSwap – a smart contract used to swap HYPC tokens for a CHYPC NFT and vice versa. It manages the token and NFT balances while maintaining an up-to-date record of NFTs available for swapping.

    • ICHYPC – an interface for the CHYPC smart contract.

    • IHYPC – an interface for the HYPC ERC20 token smart contract.

    • IHYPCSwap – an interface for the HYPCSwap smart contract.

    Privileged roles

    • CHYPCNFT.sol :

      • Contract Owner :

        • Can init the contract.

        • Can mint tokens.

      • Token Owner :

        • Can burn the token.

        • Can set an assignment to the token.

    • HyperCycleSwap.sol :

      • Token Contract (CHYPCAddress) :

        • Can add an NFT.

    • CrowdFundHYPCPool.sol :

      • Proposal owner :

        • Can cancel a proposal.

        • Can finish the proposal.

        • Can change the assignment.

    Executive Summary

    Documentation quality

    The total Documentation quality score is 10 out of 10.

    • Functional requirements are present, but only at a high-level.

      • Functional requirements for how the system should work are provided.

      • The documentation has a detailed description of the math calculations.

    • Technical description is provided.

      • Run instructions are provided.

      • Technical specification is provided.

      • NatSpec is sufficient.

    Code quality

    The total Code quality score is 10 out of 10.

    • The development environment was configured.

    • The code is well-designed and follows best practices.

    Test coverage

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

    • Deployment and basic user interactions are covered with tests.

    • Tests are not configured to run in a local environment.

    Security score

    Upon auditing, the code was found to contain 1 critical, 3 high, 4 medium, and 8 low severity issues. Out of these, 15 issues have been addressed and resolved, leading to a Security score of 10 out of 10.

    All identified issues are detailed in the “Findings” section of this report.

    Summary

    The comprehensive audit of the customer's smart contract yields an overall score of 10. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.

    Findings

    Code
    Title
    Status
    Severity
    F-2023-0159Invalid Validation; Funds Lock; Data Consistency
    fixed

    Critical
    F-2023-0162Race Condition; Undocumented Behaviour
    fixed

    High
    F-2023-0161Undocumented Behaviour
    fixed

    High
    F-2023-0160Requirements Violation
    fixed

    High
    F-2023-0166Race Condition; Undocumented Behaviour
    fixed

    Medium
    F-2023-0165Inconsistent Data
    fixed

    Medium
    F-2023-0164Inefficient Gas Model
    fixed

    Medium
    F-2023-0163Unfinalized Code
    fixed

    Medium
    F-2023-0174Missing Validation
    fixed

    Low
    F-2023-0173Interfaces Mismatch
    fixed

    Low
    1-10 of 31 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://gitlab.com/dliendo05/hypc-polygon/-/tree/develop
    Commite60234e9e8558e05f4614ed25a9ba883cec565d9
    WhitepaperProvided
    RequirementsProvided
    Technical RequirementsProvided

    Contracts in Scope

    contracts
    ethereum
    core
    CHYPC.sol - contracts › ethereum › core › CHYPC.sol
    CrowdFundPoolHYPC.sol - contracts › ethereum › core › CrowdFundPoolHYPC.sol
    HYPCSwap.sol - contracts › ethereum › core › HYPCSwap.sol
    interfaces
    ICHYPC.sol - contracts › ethereum › interfaces › ICHYPC.sol
    IHYPC.sol - contracts › ethereum › interfaces › IHYPC.sol
    IHYPCSwap.sol - contracts › ethereum › interfaces › IHYPCSwap.sol

    Disclaimer