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

Audit name:

[SCA] Optimus.venture | ERC20 + Staking + ERC721 | May2023

Date:

May 18, 2023

Table of Content

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

Want a comprehensive audit report like this?

Introduction

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

Optimus Ventures is a staking project that takes and rewards ERC20, which generates an ERC721 token for its users as a pinkslip.

titlecontent
PlatformBNB Chain
LanguageSolidity
TagsERC20 token, Staking, ERC721 token
Timeline20/03/2023 - 17/05/2023
Methodologyhttps://hackenio.cc/sc_methodology→

    Review Scope

    Repositoryhttps://github.com/OptimusVentures/HODLAudit→
    Commitc6cd38fbea2aafbe346de04010f6dbc77aa301a0

    Audit Summary

    Total9.1/10
    Security Score

    10/10

    Test Coverage

    94.80%

    Code Quality Score

    8/10

    Documentation Quality Score

    7/10

    12Total Findings
    12Resolved
    0Accepted
    0Mitigated

    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 Optimus.ventures
    Audited ByHacken
    Changelog24/03/2023 – Initial Review
    19/04/2023 - Second Review
    03/05/2023 - Third Review
    17/05/2023 - Fourth Review
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for Optimus.ventures
      Audited By
      Hacken
      Changelog
      24/03/2023 – Initial Review
      19/04/2023 - Second Review
      03/05/2023 - Third Review
      17/05/2023 - Fourth Review

    System Overview

    Optimus Ventures is a staking project that takes and rewards ERC20, which generates an ERC721 token for its users as a pinkslip. The project contains the following contracts:

    • HODLStakingFactory — HODL ERC20 staking pools, farms and manages ownership and control over it.

    • HODLStaking — HODL staking pool contract, to stake ERC20 tokens with a dynamic APY.

    • HODLBase — contains structs and global variables.

    • HODLCoreNFT - The HODLCoreNFT contract is a ERC721 token (NFT) collection representing HODL staking positions. It also provides royalty payments to a specified address.

    Privileged roles

    • The owner of the HODLStakingFactory contract has the authority to pause/unpause the contract. They may also set the coreNFT, pool master contract, pool creation payment token address, project fee, minimum staking period, pool creation price, and pool fee ranges.

    • The onlyProjectWallet role of the HODLStaking contract is responsible for pausing/unpausing the contract, initiating the staking period after the deposit time has elapsed, and in the event of an emergency, terminating the contract and withdrawing any unearned rewards.

    • The onlyOwner role of the HODLStaking contract is tasked with halting user fund deposits via the setDepositable function.

    • The owner role of the HODLCoreNFT contract has the authority to set URI to any token ID.

    • The minter role within the HODLCoreNFT contract is capable of minting new tokens and adding new minter addresses to the system.

    Executive Summary

    Documentation quality

    The total Documentation quality score is 7 out of 10.

    • Functional requirements are partially provided.

    • Use cases and business logic are missing.

    • Technical description is provided.

    Code quality

    The total Code quality score is 8 out of 10.

    • Template code patterns were found (TransferHelper).

    • The development environment is configured.

    Test coverage

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

    • Deployment and basic user interactions are covered with tests.

    • Deployment instructions are not provided.

    Security score

    Upon auditing, the code was found to contain 0 critical, 3 high, 6 medium, and 3 low severity issues. Out of these, 12 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 9.1. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.

    Risks

    There are complex fee and reward formulas used in the project. However, since no documentation is provided, only the mathematical correctness of these formulas can be checked. It is not possible to check if the formulas actually return the intended values.

    Findings

    F-2023-1466Highly Permissive Role Access
    Status
    fixed
    Severity

    High
    F-2023-1465Highly Permissive Role Access
    Status
    fixed
    Severity

    High
    F-2023-1464Unverifiable Logic
    Status
    fixed
    Severity

    High
    F-2023-147Requirements Violations
    Status
    fixed
    Severity

    Medium
    F-2023-1471Contradiction - Function Name - Functionality Mismacth
    Status
    fixed
    Severity

    Medium
    F-2023-147Tautology
    Status
    fixed
    Severity

    Medium
    F-2023-146Contradiction - Missing validation
    Status
    fixed
    Severity

    Medium
    F-2023-1468Denial of Service
    Status
    fixed
    Severity

    Medium
    F-2023-1467Inconsistent data - Variable is not limited
    Status
    fixed
    Severity

    Medium
    F-2023-147Missing Zero Check Before Transfer
    Status
    fixed
    Severity

    Low
    Code
    ―
    Title
    Status
    Severity
    F-2023-1466Highly Permissive Role Access
    fixed

    High
    F-2023-1465Highly Permissive Role Access
    fixed

    High
    F-2023-1464Unverifiable Logic
    fixed

    High
    F-2023-147Requirements Violations
    fixed

    Medium
    F-2023-1471Contradiction - Function Name - Functionality Mismacth
    fixed

    Medium
    F-2023-147Tautology
    fixed

    Medium
    F-2023-146Contradiction - Missing validation
    fixed

    Medium
    F-2023-1468Denial of Service
    fixed

    Medium
    F-2023-1467Inconsistent data - Variable is not limited
    fixed

    Medium
    F-2023-147Missing Zero Check Before Transfer
    fixed

    Low
    1-10 of 12 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/OptimusVentures/HODLAudit→
    Commitc6cd38fbea2aafbe346de04010f6dbc77aa301a0
    WhitepaperNot provided
    RequirementsProvided
    Technical RequirementsProvided

    Contracts in Scope

    contracts
    HODLBase.sol - contracts › HODLBase.sol
    HODLCoreNFT.sol - contracts › HODLCoreNFT.sol
    HODLStaking.sol - contracts › HODLStaking.sol
    HODLStakingFactory.sol - contracts › HODLStakingFactory.sol
    Interfaces
    IHODLNFTCore.sol - contracts › Interfaces › IHODLNFTCore.sol
    IHODLStaking.sol - contracts › Interfaces › IHODLStaking.sol
    IPair.sol - contracts › Interfaces › IPair.sol

    Disclaimer