Web3 · Smart Contract Audit

Unich Security Audit

softstack completed a smart contract audit of Unich's OTC Contracts Solana & EVM in March 2025, reporting 16 findings (2 high, 5 medium, 7 low and 2 informational). The full report is published in the softstack public audit archive.

Key facts

Client
Unich
Completed
Languages
Solidity, Rust
Commit
6ef4bd743e5f

About the project

Unich is an over-the-counter trading platform where users buy and sell tokens, points and options before those assets are listed. It has expanded into Unich Network, which pairs social networking features with on-chain rewards paid in its Freedom Coin. The platform is operated from Hong Kong and supports assets on Solana and Ethereum.

Scope

Source repositorygithub.com/unich-labs/evm-contracts

Components reviewed

1 module
  1. See the published report for the file list

Findings

0Critical
2High
5Medium
7Low
2Informational
IDTitleSeverityStatus
6.2.1Unchecked Delegatecall in diamondCut

The diamondCut function in the Diamond Standard implementation allows unrestricted delegatecall to an arbitrary _init address with user-provided _calldata.

Highfixed
6.2.2Reinitialization Vulnerability

The initialize function in the MarketFacet contract lacks an initializer modifier, allowing the contract owner to reinitialize critical protocol configurations (e.g., feeWallet, teamWallet) multiple times.

Highfixed
6.2.3Fee/Pledge Rate Inconsistency

The updateConfig function updates the global feeSettle parameter without validating it against existing markets’ pledgeRate.

Mediumfixed
6.2.4Gas Limit Issues in Order Matching

The _matchOrders function uses a while (availableAmountBuy > 0 && availableAmountSell > 0) loop that relies on cached initial values of availableAmountBuy and availableAmountSell.

Mediumacknowledged
6.2.6Unsafe Use of init_if_needed Exposing Vault Accounts to Re-initialization Attacks

The current implementation uses Anchor's init_if_needed constraint for token vault accounts without implementing proper safeguards against re-initialization attacks.

Mediumfixed
6.2.7Silent Error Swallowing in Cost Accounting Logic

The codebase contains multiple instances where the sponsor_creation_cost function result is explicitly discarded using the let _ = ... pattern.

Mediumfixed
6.2.8Order State Management

The order state management system lacks explicit validation checks for extreme edge cases during partial fills, potentially leading to incorrect order states.

Lowfixed
6.2.9Unsafe transferFrom in BatchTransfer

The batchTransfer function uses msg.sender as the from address in transferFrom, requiring users to pre-approve the contract. Tokens like USDT require resetting allowance to zero before approval,

Lowfixed
6.2.10Inconsistent Tick Boundaries

The contract defines ZERO_TICK and MAX_TICK using the absolute minimum/maximum values of int24 (-8,388,608 and 8,388,607), which conflict with the standardized Uniswap V3 tick range of - 887,272 to 887,272.

Lowfixed
6.2.11Inconsistent Signer Mutability Requirements in Multi- Signature Governance

In multiple instruction handlers requiring multi-signature operations, there are inconsistencies in how signers are marked as mutable.

Lowfixed
6.2.12Logical Inconsistency in Owner Removal Process

In the remove_owner_handler function, there is a logical inconsistency between the account constraint definition and the handler implementation.

Lowfixed
6.2.13Potential Panic in Event Emission Due to Unwrap on Optional Value

The update_market_handler function contains a potentially unsafe use of unwrap() when emitting the UpdateMarketEvent. The code attempts to unwrap an Option<u64> value without first verifying that the value exists.

Lowfixed
6.2.14Counterintuitive Price Matching Validation Logic

The smart contract contains counterintuitive validation logic in multiple order matching functions.

Lowfixed
6.2.15Redundant Fee Calculation in Cashout

The outputValue calculation in _takeCashoutFeeWithPrice redundantly adjusts fees (e.g., outputValue = (outputValue - fees) + fees), introducing unnecessary complexity.

Informationalfixed
6.2.16Typos and Naming Inconsistencies in Codebase

Multiple typographical errors have been identified in struct names and error message identifiers across the smart contract code.

Informationalfixed

About this engagement

A smart contract audit reviews on-chain code for flaws an attacker could exploit. Engineers trace how assets move through the contracts, check who can call privileged functions, and test the arithmetic, external calls and upgrade paths. Each finding is rated by severity, and fixes are re-checked before the final report.

How softstack runs smart contract audits

Methodology

Review process

  1. Scoping and threat modelling

    The commit hash is frozen and the attack surface is mapped: asset flows, trust assumptions, privileged roles and the external systems the code depends on.

  2. Automated analysis

    Static analysers sweep the full codebase to surface known weakness patterns, unreachable states and deviations from established conventions.

  3. Manual code review

    Independent engineers read the code line by line, concentrating on business logic, access control, arithmetic and the handling of external calls.

  4. Adversarial testing

    Property-based fuzzing and invariant tests attack the assumptions the protocol relies on, targeting states that ordinary unit tests never reach.

  5. Reporting

    Every finding is documented with a severity rating, its impact, the steps to reproduce it and a concrete remediation the team can act on.

  6. Remediation verification

    Submitted fixes are re-reviewed against the original finding, and the final report records the resolved state of each one.

FAQ

Unich was audited by softstack GmbH, a German Web3 security and software company based in Flensburg and certified to ISO/IEC 27001 by TÜV SÜD. softstack completed a smart contract audit for Unich in March 2025. The full report is linked on this page and published in the softstack public audit archive.

The review reported 16 findings: 2 high, 5 medium, 7 low and 2 informational.

The review covered the code in github.com/unich-labs/evm-contracts at commit 6ef4bd7. The published report lists every file covered.

This report covers the code as reviewed in March 2025 at commit 6ef4bd7. Any code changed after that point is outside the reviewed scope.

Related audits

Browse all security audits

Disclaimer

This audit represents a point-in-time security assessment of the reviewed codebase and is intended for informational purposes only. While Softstack applies industry-standard security review methodologies, no audit can guarantee the absence of vulnerabilities, bugs, or other security risks. This report does not constitute financial, legal, regulatory, or investment advice, nor does it endorse the project, its business model, products, or services. Security is an ongoing process, and we strongly recommend conducting a new assessment following any material code changes or at least every 6 months to address newly emerging threats, vulnerabilities, and ecosystem developments.