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

Audit name:

[SCA] Nucleon | Voting + Yield Farming | Jan2023

Date:

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

Conflux enables creators, communities, and markets to connect across borders and protocols.

titlecontent
PlatformConflux
LanguageSolidity
TagsVoting, Yield Farming
Timeline08/10/2022 - 24/01/2023
Methodologyhttps://hackenio.cc/sc_methodology→

    Review Scope

    Repositoryhttps://github.com/article-i/espace/tree/in-test; https://github.com/article-i/core-pos-pool/tree/test→
    Commitb793f4db6cf6644bd046ae25c1c5c19682c45fb0; 35299a5071cda0ee1b51659c5608127b7ca92e9f

    Audit Summary

    Total7.6/10
    Security Score

    10/10

    Test Coverage

    78.86%

    Code Quality Score

    3/10

    Documentation Quality Score

    8/10

    43Total Findings
    31Resolved
    0Accepted
    8Mitigated

    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 Nucleon
    Audited ByHacken
    Websitehttps://confluxnetwork.org/→
    Changelog13/10/2022 – Initial Review
    09/12/2022 - Second Review
    19/01/2023 - Third Review
    24/01/2023 - Fourth Review
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for Nucleon
      Audited By
      Hacken
      Changelog
      13/10/2022 – Initial Review
      09/12/2022 - Second Review
      19/01/2023 - Third Review
      24/01/2023 - Fourth Review

    System Overview

    Nucleon is a project that rewards its users based on the amount of CFX token they deposit:

    • Exchangeroom.sol - A staking contract for CFX token.

    • CoreBridgemultipool.sol_ - A bridge contract to connect Conflux POS pools and Exchange rooms.

    • PoSPoolmini.sol - A small Conflux POS pool contract with basic usages.

    • PoolAPY.sol - A library contract operates users' stake information.

    • PoolContext.sol - An abstract contract to call Staking and Register contracts functions.

    • VotePowerQueue.sol - A library contract queues users' voting rights and processes them sequentially.

    • UnstakeQueueCFX.sol - A library contract adds users who unstake the CFX token to the queue.

    • IExchange.sol - An interface contract used for the PoSPoolmini contract.

    Privileged roles

    • The owner of the CoreBridgemultipool_ contract can add, delete and modify the pool addresses stored. The owner can set xCFX, bridge, treasury, and trusted triggers addresses.

    • The trusted triggers addresses of the CoreBridgemultipool_ contract can synchronize all pools.

    • The owner of the Exchangeroom contract can set lock periods, exchange limits, pool name and bridge, exchange, storage, xCFX addresses.

    • The bridge and exchange addresses of the Exchangeroom contract can exchange CFX for xCFX, dequeue pending queue. These addresses can set locked votes, unstaked votes. The bridge can set directly xcfxvalues, xCFXincrease variables.

    • The owner of the PoSPoolmini contract can register the pool contract to the PoS internal contract. The owner can set bridge addresses, lock periods, pool name, CFX count of one vote.

    • The bridge of the PoSPoolmini contract can increase, decrease, and withdraw CFX tokens. The bridge can claim all the interest from the pool.

    Executive Summary

    Documentation quality

    The total Documentation quality score is 8 out of 10.

    • Functional requirements are mostly provided.

    • Technical description is provided.

    Code quality

    The total Code quality score is 3 out of 10.

    • The code contains duplicate patterns and contracts.

    • The development environment is configured.

    • Style guide → violations found in code, including public functions starting with underscores, deviations from mixed casing and variable naming conventions, and missing camel-case usage. \-Slither can be used to detect and fix these style guide violations.

    • There are two different repositories for code and one for the tests.

    Test coverage

    Code coverage of the project is 78.86%.

    • Unit tests are provided, but several contracts are not covered at all.

    • There are scenarios implemented for basic behavior and user interactions.

    Security score

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

    Risks

    The repository contains a code that is out of the audit scope. The secureness of contracts that are not mentioned in the Scope sedition of the report cannot be guaranteed.

    Findings

    F-2023-122Unverifiable Logic
    Status
    fixed
    Severity

    Critical
    F-2023-122 Invalid Calculations
    Status
    fixed
    Severity

    Critical
    F-2023-1226Token Supply Manipulation
    Status
    mitigated
    Severity

    Critical
    F-2023-1234Highly Permissive Role Access
    Status
    fixed
    Severity

    High
    F-2023-1233Requirements Violation
    Status
    fixed
    Severity

    High
    F-2023-1232Unverifiable Logic
    Status
    mitigated
    Severity

    High
    F-2023-1231Requirements Violation
    Status
    fixed
    Severity

    High
    F-2023-123 Requirements Violation
    Status
    fixed
    Severity

    High
    F-2023-122Data Consistency
    Status
    mitigated
    Severity

    High
    F-2023-1244Contradiction
    Status
    fixed
    Severity

    Medium
    Code
    ―
    Title
    Status
    Severity
    F-2023-122Unverifiable Logic
    fixed

    Critical
    F-2023-122 Invalid Calculations
    fixed

    Critical
    F-2023-1226Token Supply Manipulation
    mitigated

    Critical
    F-2023-1234Highly Permissive Role Access
    fixed

    High
    F-2023-1233Requirements Violation
    fixed

    High
    F-2023-1232Unverifiable Logic
    mitigated

    High
    F-2023-1231Requirements Violation
    fixed

    High
    F-2023-123 Requirements Violation
    fixed

    High
    F-2023-122Data Consistency
    mitigated

    High
    F-2023-1244Contradiction
    fixed

    Medium
    1-10 of 43 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/article-i/espace/tree/in-test; https://github.com/article-i/core-pos-pool/tree/test→
    Commitb793f4db6cf6644bd046ae25c1c5c19682c45fb0; 35299a5071cda0ee1b51659c5608127b7ca92e9f
    WhitepaperProvided→
    RequirementsProvided→
    Technical RequirementsNot provided

    Contracts in Scope

    contracts
    IExchange.sol - contracts › IExchange.sol
    eSpace
    CoreBridge_multipool.sol - contracts › eSpace › CoreBridge_multipool.sol
    Exchangeroom.sol - contracts › eSpace › Exchangeroom.sol
    PoolContext.sol - contracts › PoolContext.sol
    PoSPoolmini.sol - contracts › PoSPoolmini.sol
    VotePowerQueue.sol - contracts › VotePowerQueue.sol
    XCFX.sol - contracts › XCFX.sol

    Disclaimer