The Hacken 2025 TRUST ReportKey findings on trust, security maturity, and the factors driving blockchain adoption.
Learn more

Audit name:

[SCA] Zesh AI Layer | Zesh-Coin | Dec2024

Date:

Dec 17, 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 Zesh AI Layer team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

Zesh AI Layer (ZAI) currency is a SUI coin that facilitates seamless initialization and minting of tokens to the deployer address.

Document

NameSmart Contract Code Review and Security Analysis Report for Zesh AI Layer
Audited ByJakub Heba
Approved ByPrzemyslaw Swiatowiec
Websitehttps://zesh.ai
Changelog16/12/2024 - Preliminary Report, 17/12/2024 - Secondary Report
PlatformSui
LanguageMOVE
TagsSui, Coin
Methodologyhttps://hackenio.cc/sc_methodology
  • Document

    Name
    Smart Contract Code Review and Security Analysis Report for Zesh AI Layer
    Audited By
    Jakub Heba
    Approved By
    Przemyslaw Swiatowiec
    Changelog
    16/12/2024 - Preliminary Report, 17/12/2024 - Secondary Report
    Platform
    Sui
    Language
    MOVE
    Tags
    Sui, Coin

Review Scope

Repositoryhttps://github.com/ZeshDev/zesh-coin
Commit6f34f9f34e4f5e579ca4d3bb1ee62020218feef8

Audit Summary

1Total Findings
1Resolved
0Accepted
0Mitigated

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

Documentation quality

  • Functional requirements are listed in README.md file.

  • Technical description is partially provided.

Code quality

  • The code duplicates commonly known Coin initialization standard.

Test coverage

Code coverage of the project is 0% (branch coverage), with a mutation score of 0%.

  • All tests are commented-out.

System Overview

ZAI  — simple Sui coin that mints all initial supply to a deployer. Additional minting is not allowed.

It has the following attributes:

  • Name: Zesh AI Layer

  • Symbol: ZAUI

  • Decimals: 6

  • Total supply: 500m tokens.

Privileged roles

  • The deployer of ZAI is minting 500m supply of tokens to himself during initialization.

  • No other privileges are assigned to that address.

Potential Risks

Total token supply is minted to the deployer account without allocation logic, which could lead to concerns over transparency and control in token distribution.

Findings

Code
Title
Status
Severity
F-2024-7705Wrong value hardcoded in TOTAL_SUPPLY leads to too few minted tokens
fixed

Medium
1-1 of 1 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/ZeshDev/zesh-coin
Commit6f34f9f34e4f5e579ca4d3bb1ee62020218feef8
Whitepaper-
Requirementshttps://github.com/ZeshDev/zesh-coin/README.md
Technical Requirementshttps://github.com/ZeshDev/zesh-coin/README.md

Assets in Scope

zesh_coin.move - zesh_coin.move

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