Q1 2026 Security & Compliance Report44 incidents, $482M in losses, insights from 11 industry leaders.
Read the report

Audit name:

[SCA] Snag Solutions | MarketHybrid | Nov2024

Date:

Nov 29, 2024

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 Snag Solutions team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

The Snag web application is a white-label NFT marketplace and loyalty solution which is a multi-tenant system.

Document

NameSmart Contract Code Review and Security Analysis Report for Snag Solutions
Audited BySeher Saylik, Giovanni Franchi
Approved ByAtaberk Yavuzer
Websitehttps://www.snagsolutions.io/
Changelog06/11/2024 - Preliminary Report
Changelog25/11/2024 - Final Report
PlatformBase, ApeChain/Xai (arb l3s), Polygon, ZKSync
LanguageSolidity
TagsMarketPlace, ERC-721
Methodologyhttps://hackenio.cc/sc_methodology
  • Document

    Name
    Smart Contract Code Review and Security Analysis Report for Snag Solutions
    Audited By
    Seher Saylik, Giovanni Franchi
    Approved By
    Ataberk Yavuzer
    Changelog
    06/11/2024 - Preliminary Report
    Changelog
    25/11/2024 - Final Report
    Platform
    Base, ApeChain/Xai (arb l3s), Polygon, ZKSync
    Language
    Solidity
    Tags
    MarketPlace, ERC-721

Review Scope

Repositoryhttps://github.com/Snag-Solutions/contracts
Commit148512c

Audit Summary

12Total Findings
3Resolved
9Accepted
0Mitigated

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

Documentation quality

  • Functional requirements are mostly provided.

  • Technical description is not provided.

  • NatSpecs are provided and sufficient.

Code quality

  • The code violates best practises in terms of gas efficiency.

  • The code presents some misalignment in common best practises related to contract ownership and proxy layout.

  • The development environment is configured.

Test coverage

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

  • Tests cover the primary functions including deployment, signature generation, and calling the purchaseItems function.

  • The coverage for edge cases such as invalid signatures, expired deadlines, non-existent orgId keys etc. is missing.

System Overview

SnagMarketHybridV2 — It is a white-label market place with multiple tenants. Each tenant represent a Snag client and a market owner.  The intent of the system is to facilitate NFT purchase with signatures and off-chain loyalty payments.

Privileged roles

  • The owner can add, remove a modify signing keys related to a specific operator id.

  • The owner can cancel orders.

Potential Risks

The protocol flow is partially managed off-chain, specifically the points payment process, which is handled entirely off-chain. It is important to highlight that this audit cannot guarantee the correctness of these off-chain operations. Therefore, users are advised to carefully consider this aspect before deciding to interact with the protocol.

Flexibility and Risk in Contract Upgrades: The project's contracts are upgradable, allowing the administrator to update the contract logic at any time. While this provides flexibility in addressing issues and evolving the project, it also introduces risks if upgrade processes are not properly managed or secured, potentially allowing for unauthorized changes that could compromise the project's integrity and security.

Findings

Code
Title
Status
Severity
F-2024-6957Inadequate Validation of fromAddress in purchaseItems Function
fixed

High
F-2024-6960Solidity Version 0.8.20 Might Not Work On All Chains Due To PUSH0
accepted

Low
F-2024-6953Missing Storage Gaps for Upgradeable Contracts
fixed

Low
F-2024-6945Violation of Checks-Effects-Interactions (CEI) Pattern
accepted

Low
F-2024-6944Risk of Hash Collisions from Using abi.encodePacked in Array Hashing
accepted

Low
F-2024-6964Unneeded Initializations Of Integer Variable To 0
accepted

Observation
F-2024-6962Use private Rather than public for Constants
accepted

Observation
F-2024-6961Contract Uses Both require()/revert() As Well As Custom Errors
accepted

Observation
F-2024-6951Custom errors can be used to improve gas efficiency
accepted

Observation
F-2024-6950Missing disableInitializers() Can Lead to Unwanted Initialization
accepted

Observation
1-10 of 12 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/Snag-Solutions/contracts
Commit148512ce64a3e6748ca7d81fdcdc143da1e5f977
WhitepaperN/A
Requirements./docs/V2AuditContext.md
Technical RequirementsN/A

Assets in Scope

SnagMarketHybridV2.sol - SnagMarketHybridV2.sol

Appendix 3. Additional Valuables

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