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

Audit name:

[SCA] CarbonPath | ERC20 + ERC721 + Token Sales | Mar2023

Date:

Mar 17, 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 CarbonPath, Inc. team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

CarbonPath’s mission is to eliminate significant quantities of greenhouse gas (GHG) emissions by stopping the release of these climate change causing compounds at their source - oil and natural gas wells.

titlecontent
PlatformEthereum, BNB Chain, Arbitrum, Polygon, Optimism
LanguageSolidity
TagsERC20 token, ERC721 token, Token Sale
Timeline15/02/2023 - 16/03/2023
Methodologyhttps://hackenio.cc/sc_methodology→

    Review Scope

    Repositoryhttps://github.com/orgs/carbonpathio/repositories→
    Commit4e406bb3386b583f630e41b9e26bdbf09e70ea4d

    Audit Summary

    Total9.7/10
    Security Score

    10/10

    Test Coverage

    100%

    Code Quality Score

    10/10

    Documentation Quality Score

    7/10

    20Total Findings
    18Resolved
    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 CarbonPath, Inc.
    Audited ByHacken
    Websitehttps://www.carbonpath.io/→
    Changelog22/02/2023 – Initial Review
    16/03/2023 - Second Review
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for CarbonPath, Inc.
      Audited By
      Hacken
      Changelog
      22/02/2023 – Initial Review
      16/03/2023 - Second Review

    System Overview

    CarbonPath is a system that helps to close old oil and natural gas wells. Each unique NFT token of the system represents a real-life well and each fungible token equals a tonne of sequestered carbon emissions. The protocol is designed to allow users to take part in the retirement of abandoned and orphaned wells that pollute the environment.

    The files in the audit scope:

    • CarbonPathAdmin - a contract that handles different interactions with CarbonPathToken (CPCO2) and CarbonPathNFT and serves as an admin for both contracts. Users can buy CPC02 tokens and retire them for a certain well.

    • CarbonPathNFT - ERC721 token that bounds to a well. Contains the geolocation of a well and additional metadata.

    • CarbonPathToken - ERC20 mintable and burnable token that represents locked carbon emission.

    Privileged roles

    DefaultAdmin:

    • CarbonPathAdmin: can grant and revoke minter role, set receiver of CP fee, non-profit address, buffer pool address, seller address.

    • CarbonPathToken: can grant and revoke minter role.

    Owner:

    • CarbonPathNFT: can set admin address.

    Admin:

    • CarbonPathNFT: can set metadata and URI for a specific token, mint new tokens, and increase the amount of retired CPCO2 tokens.

    Minter:

    • CarbonPathAdmin: can mint new tokens, update token URI and metadata.

    • CarbonPathToken: can mint, burn tokens.

    Executive Summary

    Documentation quality

    The total Documentation quality score is 7 out of 10.

    • There are some gaps in the functional requirements (there is no explanation of the buffer pool and advanced mint amounts of the CPCO2 token).

    • Technical requirements are partially provided.

    • NatSpec comments are detailed.

    Code quality

    The total Code quality score is 10 out of 10.

    • The development environment is configured.

    • Code is well-written and designed.

    Test coverage

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

    Security score

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

    Risks

    The system is not adequately documented. It is difficult to determine compliance with requirements due to gaps in the requirements.

    The system describes the sellerAddress (single address) used in the CarbonPathAdmin contract as the CarbonPath Wallets; the security of the CarbonPath Wallets functionality is not part of this audit.

    The system relies on the security of the privileged roles’ private keys, which can impact the execution flow and security of the funds. We recommend those accounts to be at least ⅗ multi-sig.

    Findings

    F-2023-1098Requirements Violation
    Status
    fixed
    Severity

    Critical
    F-2023-1097 Requirements Violation
    Status
    fixed
    Severity

    Critical
    F-2023-1100 Undocumented Behavior
    Status
    mitigated
    Severity

    High
    F-2023-1099Highly Permissive Role Access
    Status
    mitigated
    Severity

    High
    F-2023-1106Inconsistent Data: Missing Event for Critical Value Update
    Status
    fixed
    Severity

    Medium
    F-2023-1105Contradiction: Redundant Ownable
    Status
    fixed
    Severity

    Medium
    F-2023-1104Inefficient Gas Model: SafeMath in Solidity ^0.8.0
    Status
    fixed
    Severity

    Medium
    F-2023-110Unscalable Functionality: Check Repetition
    Status
    fixed
    Severity

    Medium
    F-2023-1102Unscalable Functionality: Check Repetition
    Status
    fixed
    Severity

    Medium
    F-2023-1101Unscalable Functionality: Check Repetition
    Status
    fixed
    Severity

    Medium
    Code
    ―
    Title
    Status
    Severity
    F-2023-1098Requirements Violation
    fixed

    Critical
    F-2023-1097 Requirements Violation
    fixed

    Critical
    F-2023-1100 Undocumented Behavior
    mitigated

    High
    F-2023-1099Highly Permissive Role Access
    mitigated

    High
    F-2023-1106Inconsistent Data: Missing Event for Critical Value Update
    fixed

    Medium
    F-2023-1105Contradiction: Redundant Ownable
    fixed

    Medium
    F-2023-1104Inefficient Gas Model: SafeMath in Solidity ^0.8.0
    fixed

    Medium
    F-2023-110Unscalable Functionality: Check Repetition
    fixed

    Medium
    F-2023-1102Unscalable Functionality: Check Repetition
    fixed

    Medium
    F-2023-1101Unscalable Functionality: Check Repetition
    fixed

    Medium
    1-10 of 20 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/orgs/carbonpathio/repositories→
    Commit4e406bb3386b583f630e41b9e26bdbf09e70ea4d
    WhitepaperProvided→
    RequirementsProvided→
    Technical RequirementsProvided→

    Contracts in Scope

    contracts
    CarbonPathAdmin.sol - contracts › CarbonPathAdmin.sol
    CarbonPathNFT.sol - contracts › CarbonPathNFT.sol
    CarbonPathToken.sol - contracts › CarbonPathToken.sol

    Disclaimer