Q1 2025 Web3 Security ReportAccess control failures led to $1.63 billion in losses
Discover report insights
  • Hacken
  • Audits
  • wow-max
  • [SCA] WOW Max / DEX / Aug2023
WoW Max logo

WoW Max

Audit name:

[SCA] WOW Max / DEX / Aug2023

Date:

Aug 28, 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 WoW Max team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

The project "WoW Max" is a decentralized exchange (DEX) aggregator designed with the objective of optimizing exchange amounts. Its primary function involves analyzing token prices across multiple DEX platforms and identifying the most efficient exchange path among various exchange protocols.

titlecontent
PlatformEVM
LanguageSolidity
TagsDEX
Timeline01/08/2023 - 29/08/2023
Methodologyhttps://hackenio.cc/sc_methodology

    Review Scope

    Repositoryhttps://github.com/wowswap-io/wowmax-contracts
    Commite34a1be3c45996ba52861a1fa4ec843071a20b37

    Audit Summary

    Total10/10
    Security Score

    10/10

    Test Coverage

    100%

    Code Quality Score

    10/10

    Documentation Quality Score

    10/10

    12Total Findings
    8Resolved
    0Accepted
    4Mitigated

    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 WoW Max
    Audited ByHacken
    Websitehttps://wowmax.exchange/
    Changelog07/08/2023 - Initial Review
    29/08/2023 - Second Review
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for WoW Max
      Audited By
      Hacken
      Changelog
      07/08/2023 - Initial Review
      29/08/2023 - Second Review

    System Overview

    The project "WoW Max" is a decentralized exchange (DEX) aggregator designed with the objective of optimizing exchange amounts. Its primary function involves analyzing token prices across multiple DEX platforms and identifying the most efficient exchange path among various exchange protocols.

    By doing so, WOWMAX aims to provide users with the best possible returns on their token exchanges, maximizing their gains while reducing potential losses.

    The files in the scope:

    • WowmaxRouter.sol - The contract that the users interact with. Responsible for the swapping logic of WoW Max which interacts with several verified DEXes.

    • WowmaxSwapReentrancyGuard.sol - The reentrancy guard implementation for the WowmaxRouter.sol which does not allow for reentry during any swapping operations.

    • IWETH.sol - Interface for the native token wrapper.

    • IWowmaxRouter.sol - Interface for WowmaxRouter.sol

    • Curve.sol - Swapping library for Curve like swapping protocols.

    • DODOV1.sol - Swapping library for DODOV1 swapping protocol.

    • DODOV2.sol - Swapping library for DODOV2 swapping protocol.

    • Fulcrom.sol - Swapping library for Fulcron swapping protocol.

    • Hashflow.sol - Swapping library for Hashflow swapping protocol.

    • Level.sol - Swapping library for Level swapping protocol.

    • PancakeSwapStable.sol - Swapping library for PancakeSwap like protocols.

    • Saddle.sol - Swapping library for Saddle swapping protocol.

    • UniswapV2.sol - Swapping library for UniswapV2 swapping protocol.

    • UniswapV3.sol - Swapping library for UniswapV3 swapping protocol.

    • Wombat.sol - Swapping library for Wombat swapping protocol.

    • WooFi.sol - Swapping library for WooFi swapping protocol.

    Privileged roles

    • Owner: Can withdraw excess funds from the contract, in case of leftovers after a swap, or invalid swap requests.

    • User: Can interact with the WowmaxRouter.swap to swap tokens.

    Executive Summary

    Documentation quality

    The total Documentation quality score is 10 out of 10.

    • Functional requirements are provided.

    • Technical description is provided.

    • Description of the development environment is present.

    Code quality

    The total Code quality score is 10 out of 10.

    • The code follows the Solidity style guides.

    • The development environment is configured.

    Test coverage

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

    • Deployment and user interactions are covered with tests.

    Security score

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

    Risks

    The implementations of the swapping logic used in the system are out of scope of this contract, and therefore their safety cannot be verified.

    The amountOutExpected parameter during swaps is user-provided. A check for it to be non-zero is implemented; however, the value cannot be fully monitored and the risk for it to be invalid is present.

    Findings

    Code
    Title
    Status
    Severity
    F-2023-0747Missing Validation
    mitigated

    Critical
    F-2023-0746Balance Manipulation
    mitigated

    Critical
    F-2023-0745Access Control Violation
    mitigated

    Critical
    F-2023-0749 Possible Funds Loss
    fixed

    High
    F-2023-0748Sandwich Attack
    fixed

    High
    F-2023-0752Unsafe Usage of Third Party Protocol
    mitigated

    Medium
    F-2023-0751Missing Validation
    fixed

    Medium
    F-2023-0750Usage Of Built-in Transfer
    fixed

    Medium
    F-2023-0754Redundant Import
    fixed

    Low
    F-2023-0753Out-Of-Bounds Array Access
    fixed

    Low
    1-10 of 12 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/wowswap-io/wowmax-contracts
    Commite34a1be3c45996ba52861a1fa4ec843071a20b37
    WhitepaperProvided
    RequirementsProvided
    Technical RequirementsProvided

    Contracts in Scope

    contracts
    WowmaxRouter.sol - contracts/WowmaxRouter.sol
    WowmaxSwapReentrancyGuard.sol - contracts/WowmaxSwapReentrancyGuard.sol
    interfaces
    IWETH.sol - contracts/interfaces/IWETH.sol
    IWowmaxRouter.sol - contracts/interfaces/IWowmaxRouter.sol
    libraries
    Curve.sol - contracts/libraries/Curve.sol
    DODOV1.sol - contracts/libraries/DODOV1.sol
    DODOV2.sol - contracts/libraries/DODOV2.sol
    Fulcrom.sol - contracts/libraries/Fulcrom.sol
    Hashflow.sol - contracts/libraries/Hashflow.sol
    Level.sol - contracts/libraries/Level.sol
    PancakeSwapStable.sol - contracts/libraries/PancakeSwapStable.sol
    Saddle.sol - contracts/libraries/Saddle.sol
    UniswapV2.sol - contracts/libraries/UniswapV2.sol
    UniswapV3.sol - contracts/libraries/UniswapV3.sol
    Wombat.sol - contracts/libraries/Wombat.sol
    WooFi.sol - contracts/libraries/WooFi.sol

    Disclaimer