Executive Summary

From July 24, 2024, to July 26, 2024, the NETZ project engaged Fuzzland to conduct a thorough security audit of their swap project. The primary objective was to identify and mitigate potential security vulnerabilities, risks, and coding issues to enhance the project's robustness and reliability. Fuzzland conducted this assessment over 4 person-days, involving 2 engineers who reviewed the code over a span of 2 days. Employing a multifaceted approach that included static analysis, fuzz testing, and manual code review, Fuzzland team identified 4 issues across different severity levels and categories.

Scope

Project Name NETZ
Filename swap-smart-contract-dev-liquidity.zip
Checksum c396cef9068cc4db86f23c8bdc4204b0
Fix Checksum -
Language Solidity / Ethereum

Vulnerability Severity

We divide severity into four distinct levels: high, medium, low, and info. This classification helps prioritize the issues identified during the audit based on their potential impact and urgency.

Below is a summary of the vulnerabilities with their current status, highlighting the number of issues identified in each severity category and their resolution progress.

Number Resolved
High Severity Issues 4 -
Medium Severity Issues 0 0
Low Severity Issues 0 0
Informational Severity Issues 0 0

Disclaimer

The audit does not ensure that it has identified every security issue in the project, and it should not be seen as a confirmation that there are no more vulnerabilities. While we have conducted an analysis to the best of our ability, it is our recommendation for high-value projects to commission several independent audits, a public bug bounty program, as well as continuous onchain security auditing and monitoring. Additionally, this report should not be interpreted as personal financial advice or recommendations.

Findings

[High] Incorrect Investor Address Used in Profit Calculation

In the updateInvestorProfits function, there is a critical error where the wrong address is used to calculate the investor's eligible investment amount. The function uses _msgSender() instead of the investor parameter passed to the function.

function updateInvestorProfits(address investor, uint256 liquidityCounter) internal {
    uint256 eligibleInvestmentAmount = getInvestmentAmount(_msgSender());
    uint256 feeShare = (eligibleInvestmentAmount * totalFeesCollectedUSDT) / liquidityCounter;
    totalFeesCollectedUSDT -= feeShare;

    investors[investor].feeProfits.push(FeeProfit(feeShare, block.number));
}