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

Audit name:

[SCA] Decubate | Farming + Staking | Sep2022

Date:

Dec 4, 2022

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 Decubate team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

Decubate is a mixed-purpose project which includes Staking Liquidity Farming and NFT Staking.

titlecontent
PlatformEVM
LanguageSolidity
TagsLiquidity Farming; LP Staking; NFT Staking
Timeline15/09/2022 - 06/12/2022
Methodologyhttps://hackenio.cc/sc_methodology→

    Review Scope

    Repositoryhttps://github.com/Decubate-com/ats-contracts→
    Commitfddd1a87638d6d409c96c8051dd409c06fdc20ad

    Audit Summary

    Total8.3/10
    Security Score

    10/10

    Test Coverage

    78.5%

    Code Quality Score

    9/10

    Documentation Quality Score

    3/10

    22Total Findings
    20Resolved
    0Accepted
    2Mitigated

    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 Decubate
    Audited ByHacken
    Websitehttps://www.decubate.com/→
    Changelog27/09/2022 - Initial Review
    20/10/2022 - Second Review
    16/11/2022 - Third Review
    06/12/2022 - Fourth Review
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for Decubate
      Audited By
      Hacken
      Changelog
      27/09/2022 - Initial Review
      20/10/2022 - Second Review
      16/11/2022 - Third Review
      06/12/2022 - Fourth Review

    System Overview

    Decubate - is a mixed-purpose project which includes Staking Liquidity Farming and NFT Staking. It has the following contracts.

    The files in the scope:

    • DecubateMasterChef \- handles the single asset staking. It uses the DCBVault contract to automatically compound user rewards.

    • DCBVault \- a contract that is responsible for the auto compounding of rewards. Users deposit their token to the DCBVault contract, and the DCBVault contract then deposits to MasterChef.

    • DCBNFTStaking \- a contract for staking Decubate NFTs and getting rewards accordingly.

    • DCBLiquidityLocker \- a contract to add liquidity to DCB pools and lock the earned lp tokens.

    Privileged roles

    • Owner of the DecubateMasterChef can:

      • update fee percent

      • update fee receiver

      • update compounder

      • add a new period to the pool

      • update pools’ end date, hard cap and max transferrable amount information

    • Owner of the DCBVaults can:

      • update fee percent

      • pause and unpause the contract

    • Owner of DCBNFTStaking can:

      • add a new period to the pool

      • update pools’ end date and hard cap information

      • update pools’ NFT information

    • Owner of DCBLiquidityLocker can:

      • add a new period to the pool

      • update pools’ end date information

    • Owner of DecubateStaking contract can:

      • update pools’ end date and hard cap information

      • update fee percent and time gap

      • add a new period the pool

      • set the max transfer input and max transfer reward

    Executive Summary

    Documentation quality

    The total Documentation quality score is 3 out of 10.

    • Partial functional requirements are provided.

    • Technical description of DCBNFTStaking and DCBLiquidityLocker was not found in the provided documentation.

    • Function parameter explanations in NatSpec format were partially missed.

    • Weakly documented README file.

    Code quality

    The total Code quality score is 9 out of 10.

    • Code mostly follows the official style guide.

    • Testing setup requires a global truffle coverage install pegged to version v5.5.18

    Test coverage

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

    • Deployment and basic user interactions are covered with tests.

    • Negative cases coverage is missed.

    • Interactions by several users are not tested thoroughly.

    Security score

    Upon auditing, the code was found to contain 1 critical, 11 high, 2 medium, and 8 low severity issues. Out of these, 20 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 8.3. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.

    Risks

    DCBVault functions limited by the notContract modifier do not work with multisig wallets and similar constructs.

    If the number of NFTs is big enough, some transactions, such as claim function, can fail due to exceeding Gas.

    Findings

    F-2022-1877Compilation Issues
    Status
    fixed
    Severity

    Critical
    F-2022-1888Insufficient Balance
    Status
    fixed
    Severity

    High
    F-2022-1887Highly Permissive Owner Access
    Status
    fixed
    Severity

    High
    F-2022-1886Highly Permissive Owner Access
    Status
    fixed
    Severity

    High
    F-2022-1885Highly Permissive Owner Access
    Status
    fixed
    Severity

    High
    F-2022-1884Highly Permissive Owner Access
    Status
    fixed
    Severity

    High
    F-2022-1883Insufficient Balance
    Status
    fixed
    Severity

    High
    F-2022-1882Possible Hard Cap Overload
    Status
    fixed
    Severity

    High
    F-2022-1881Highly Permissive Owner Access
    Status
    fixed
    Severity

    High
    F-2022-1880Possible Denial of Service Vulnerability
    Status
    mitigated
    Severity

    High
    Code
    ―
    Title
    Status
    Severity
    F-2022-1877Compilation Issues
    fixed

    Critical
    F-2022-1888Insufficient Balance
    fixed

    High
    F-2022-1887Highly Permissive Owner Access
    fixed

    High
    F-2022-1886Highly Permissive Owner Access
    fixed

    High
    F-2022-1885Highly Permissive Owner Access
    fixed

    High
    F-2022-1884Highly Permissive Owner Access
    fixed

    High
    F-2022-1883Insufficient Balance
    fixed

    High
    F-2022-1882Possible Hard Cap Overload
    fixed

    High
    F-2022-1881Highly Permissive Owner Access
    fixed

    High
    F-2022-1880Possible Denial of Service Vulnerability
    mitigated

    High
    1-10 of 22 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/Decubate-com/ats-contracts→
    Commitfddd1a87638d6d409c96c8051dd409c06fdc20ad
    WhitepaperNot provided
    RequirementsProvided→
    Technical RequirementsNot provided

    Contracts in Scope

    contracts
    DCBLiquidityLocker.sol - contracts › DCBLiquidityLocker.sol
    DCBNFTStaking.sol - contracts › DCBNFTStaking.sol
    DCBVault.sol - contracts › DCBVault.sol
    DecubateMasterChef.sol - contracts › DecubateMasterChef.sol
    interfaces
    IDecubateMasterChef.sol - contracts › interfaces › IDecubateMasterChef.sol
    IStaking.sol - contracts › interfaces › IStaking.sol
    libraries
    InterestHelper.sol - contracts › libraries › InterestHelper.sol

    Disclaimer