Q1 2025 Web3 Security ReportAccess control failures led to $1.63 billion in losses
Discover report insights
  • Hacken
  • Audits
  • neemo-finance
  • [SCA] Neemo / NeemoLiquifier / Jan2025

Neemo Finance

Audit name:

[SCA] Neemo / NeemoLiquifier / Jan2025

Date:

Feb 12, 2025

Table of Content

Introduction
Audit Summary
System Overview
Potential Risks
Findings
Appendix 1. Definitions
Appendix 2. Scope
Appendix 3. Additional Valuables
Disclaimer

Want a comprehensive audit report like this?

Introduction

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

Neemo Finance provides a multi-asset liquid staking and restaking token on Soneium.

Document

NameSmart Contract Code Review and Security Analysis Report for Neemo Finance
Audited ByNataliia Balashova
Approved ByGrzegorz Trawinski, Ataberk Yavuzer
Websitehttps://neemo.finance/
Changelog05/02/2025 - Preliminary Report
12/02/2025 - Final Report
PlatformEthereum and Soneium
LanguageSolidity
TagsLiquid Staking
Methodologyhttps://hackenio.cc/sc_methodology
  • Document

    Name
    Smart Contract Code Review and Security Analysis Report for Neemo Finance
    Audited By
    Nataliia Balashova
    Approved By
    Grzegorz Trawinski, Ataberk Yavuzer
    Changelog
    05/02/2025 - Preliminary Report
    12/02/2025 - Final Report
    Platform
    Ethereum and Soneium
    Language
    Solidity
    Tags
    Liquid Staking

Review Scope

Repositoryhttps://github.com/neemo-finance/neemo-staked-astar
Commitf6a2c88806daee4d75cb188a699c8d489e5d3b8f
Remediation Commitf2356864d176f95121e1f497b3dbf6a11f7eefd5

Audit Summary

2Total Findings
2Resolved
0Accepted
0Mitigated

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

Documentation quality

  • Functional requirements are partially missed.

  • Technical description is partially missed.

Code quality

  • The development environment is configured.

  • Template code patterns were found.

Test coverage

Code coverage of the project is 94.74% (branch coverage), with 100.00% function coverage.

  • Deployment and basic user interactions are covered with tests.

  • Negative cases are covered .

  • Interactions by several users are not tested thoroughly.

System Overview

The NeemoLiquifier contract is responsible for managing liquidity pools and enabling token swaps between two types of tokens: nsASTR (lstToken) and ASTR (underlyingToken). This contract provides functionalities for users to deposit, withdraw, and swap between these tokens. It also integrates with external systems such as the DappStakingManager and PauseController to manage liquidity, paused states, and permissions.

Privileged roles

NEEMO_DEV_ROLE:

  • Manage configuration, including treasury and fees.

  • Add/remove users from the whitelist and fee-exempt list.

  • Set swap fees.

TIMELOCK_ROLE:

  • Authorize contract upgrades.

  • Manage protocol withdrawals in emergency situations.

PAUSER_ROLE:

  • Pause and unpause actions like liquidity additions, withdrawals, and token swaps.

Potential Risks

Withdrawal functionality are disabled when paused, preventing users from accessing funds.

Fees on swaps can be adjusted, potentially reducing users' returns.

Users may be unable to withdraw liquidity if the pool lacks sufficient liquidity.

Functions like adding liquidity or swapping tokens can be paused, restricting user actions.

TIMELOCK_ROLE role can withdraw all the funds from the contract.

Findings

Code
Title
Status
Severity
F-2025-8648Missing nonReentrant Modifier
fixed

Low
F-2025-8649Event Emission Before State Change
fixed

Observation
1-2 of 2 findings

Identify vulnerabilities in your smart contracts.

Appendix 1. Definitions

Severities

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.
  • 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.

Potential Risks

The "Potential Risks" section identifies issues that are not direct security vulnerabilities but could still affect the project’s performance, reliability, or user trust. These risks arise from design choices, architectural decisions, or operational practices that, while not immediately exploitable, may lead to problems under certain conditions. Additionally, potential risks can impact the quality of the audit itself, as they may involve external factors or components beyond the scope of the audit, leading to incomplete assessments or oversight of key areas. This section aims to provide a broader perspective on factors that could affect the project's long-term security, functionality, and the comprehensiveness of the audit findings.

Appendix 2. Scope

The scope of the project includes the following smart contracts from the provided repository:

Scope Details

Repositoryhttps://github.com/hknio/neemo-finance___neemo-staked-astar/commits/main/
Commitf6a2c88806daee4d75cb188a699c8d489e5d3b8f
Remediation Commitf2356864d176f95121e1f497b3dbf6a11f7eefd5
Whitepaperhttps://hackenio.cc/hacken-methodologies
Requirements-
Technical Requirements-

Assets in Scope

l2
NeemoLiquifier.sol - l2/NeemoLiquifier.sol

Appendix 3. Additional Valuables

Verification of System Invariants

During the audit of Neemo Finance, Hacken followed its methodology by performing fuzz-testing on the project's main functions. Foundry was employed to check how the protocol behaves under various inputs. Due to the complex and dynamic interactions within the protocol, unexpected edge cases might arise. Therefore, it was important to use fuzz-testing to ensure that several system invariants hold true in all situations.

Fuzz-testing allows the input of many random data points into the system, helping to identify issues that regular testing might miss. A specific Echidna fuzzing suite was prepared for this task, and throughout the assessment, 4 invariants were tested over 80,000 runs. This thorough testing ensured that the system works correctly even with unexpected or unusual inputs.

Invariant

Test Result

Run Count

Add liquidity must work for every amount of astr token within a specified range, with checks for edge casesPassed20k+
Withdraw liquidity should work for any valid amount of astr token, with checks for edge cases.Passed20k+
Withdraw liquidity should work for any valid amount of lstToken, with checks for edge cases.Passed20k+
Add liquidity must work for every amount of lstToken within a specified rangePassed20k+
  • Invariant

    Add liquidity must work for every amount of astr token within a specified range, with checks for edge cases

    Test Result

    Passed

    Run Count

    20k+

    Invariant

    Withdraw liquidity should work for any valid amount of astr token, with checks for edge cases.

    Test Result

    Passed

    Run Count

    20k+

    Invariant

    Withdraw liquidity should work for any valid amount of lstToken, with checks for edge cases.

    Test Result

    Passed

    Run Count

    20k+

    Invariant

    Add liquidity must work for every amount of lstToken within a specified range

    Test Result

    Passed

    Run Count

    20k+

Additional Recommendations

The smart contracts in the scope of this audit could benefit from the introduction of automatic emergency actions for critical activities, such as unauthorized operations like ownership changes or proxy upgrades, as well as unexpected fund manipulations, including large withdrawals or minting events. Adding such mechanisms would enable the protocol to react automatically to unusual activity, ensuring that the contract remains secure and functions as intended.

To improve functionality, these emergency actions could be designed to trigger under specific conditions, such as:

  • Detecting changes to ownership or critical permissions.

  • Monitoring large or unexpected transactions and minting events.

  • Pausing operations when irregularities are identified.

These enhancements would provide an added layer of security, making the contract more robust and better equipped to handle unexpected situations while maintaining smooth operations.

Disclaimer