Q2 2026 Security & Compliance Report67 incidents, $764M in losses, 88% from operational failures.
Get the report →

Audit name:

[SCA] Hubz | Hubz-Aidrop | Dec2024

Date:

Dec 18, 2024

Table of Content

→Introduction
→Audit Summary
→System Overview
→Potential Risks
→Findings
→Appendix 1. Definitions
→Appendix 2. Scope
→Disclaimer

Want a comprehensive audit report like this?

Introduction

We express our gratitude to the Hubz team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.

Hubz is a Jetton Airdrop solution.

Document

NameSmart Contract Code Review and Security Analysis Report for Hubz
Audited ByOlesia Bilenka
Approved ByAtaberk Yavuzer
Websitehttp://hubz.io/→
Changelog11/12/2024 - Preliminary Report
18/12/2024 - Final Report
PlatformTON
LanguageFunC
TagsFungible Token; Airdrop
Methodologyhttps://hackenio.cc/sc_methodology→
  • Document

    Name
    Smart Contract Code Review and Security Analysis Report for Hubz
    Audited By
    Olesia Bilenka
    Approved By
    Ataberk Yavuzer
    Changelog
    11/12/2024 - Preliminary Report
    18/12/2024 - Final Report
    Platform
    TON
    Language
    FunC
    Tags
    Fungible Token; Airdrop

Review Scope

Repositoryhttps://github.com/cumberlandlabs/hubz_airdrop→
Commitfd54f18

Audit Summary

3Total Findings
0Resolved
3Accepted
0Mitigated

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

Documentation quality

  • Functional requirements are not provided.

  • Technical description is not provided.

Code quality

  • The code mostly follows best practices.

  • The development environment is configured.

Test coverage

Code coverage of the project can not be calculated due to the lack of a test coverage measurement tool for func.

  • Deployment and basic user interactions are covered with tests

System Overview

Hubz is a Jetton airdrop system with the following contracts:

airdrop - is a contract designed to process Jetton token airdrop claims. It enables the validation of claims and token transfers.

airdrop-helper - is a smart contract responsible for managing claims in the context of an airdrop system. It ensures that claims are validated, prevents duplicate claims, and securely interacts with the airdrop contract to process and confirm claims.

constants - is a contract that defines constants for operation codes, error codes, and balance requirements. Operation codes identify actions like wallet deployment, claim processing, and token transfers. Error codes standardize failures such as duplicate claims, insufficient balance, and invalid proofs. Balance and fee constants ensure the contract maintains the minimum required funds for smooth execution.

jetton-minter — is a smart contract that manages jetton token issuance, minting, and burning, as well as wallet address provision. It stores key data such as the total supply of jettons, admin address, and jetton wallet code. The contract allows for minting of new jettons, which can only be performed by the admin, and tracks token ownership through jetton wallets. It also handles burn notifications, reducing the total supply when tokens are burned. Additionally, the contract supports changing the admin and updating content, along with providing wallet addresses upon request.

jetton-wallet — is a contract that manages the transfer, reception, and burning of jettons for individual wallet addresses. It tracks the balance of jettons, the owner’s address, the associated master contract address, and the wallet code. The contract handles both internal and external transfers, ensuring that the sender has a sufficient balance and that all transfers are processed securely. It also supports burning jettons, reducing the balance accordingly, and can receive tokens from the master contract. Additionally, the contract is capable of sending notifications about token burns and transfers while preventing failed actions in the computation phase to avoid bouncing messages.

jetton-utils — is a contract that provides functions that compile data about the balance, owner address, master address, and wallet code into a cell. Based on this data, the wallet state is generated. The wallet address is then created by hashing the state and constructing a slice representing the wallet's address.

op-codes - is a contract that provides constants that represent operation codes for various actions in the smart contract. The codes do actions such as transferring tokens, sending notifications for transfers or burns, internal transfers, handling excess tokens, and minting new tokens by the minter. Each operation is associated with a unique hexadecimal value for easy identification during contract execution.

params - is a contract that provides a workchain function that returns the current workchain, which is set to 0. The force_chain function checks if the workchain ID of a given address matches the current workchain and throws an error if it doesn't, ensuring that operations are only performed within the specified workchain.

stdlib - is a library that provides standard FunC functions.

Privileged roles

  • The admin of the jetton-minter contract has the exclusive ability to mint tokens, change the admin address, and update contract content.

Potential Risks

Centralized Control of Minting Process: The token contract’s design allows for centralized control over the minting process, posing a risk of unauthorized token issuance, potentially diluting the token value, and undermining trust in the project's economic governance.

Owner's Unrestricted State Modification: The absence of restrictions on state variable modifications by the owner leads to arbitrary changes, acting contract integrity and user trust, especially during critical operations like minting phases.

Findings

F-2024-7589Missing Bounced Messages Handling
Status
accepted
Severity

Low
F-2024-7588Potential Transaction Failures Due to Hardcoded Fees
Status
accepted
Severity

Low
F-2024-7587Magic Numbers Usage Reduces Code Readability
Status
accepted
Severity

Observation
Code
―
Title
Status
Severity
F-2024-7589Missing Bounced Messages Handling
accepted

Low
F-2024-7588Potential Transaction Failures Due to Hardcoded Fees
accepted

Low
F-2024-7587Magic Numbers Usage Reduces Code Readability
accepted

Observation
1-3 of 3 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/cumberlandlabs/hubz_airdrop→
Commitfd54f18063824c79946797bae8891a2807fa994d
WhitepaperN/A

Assets in Scope

contracts
airdrop.fc - contracts › airdrop.fc
airdrop_helper.fc - contracts › airdrop_helper.fc
constants.fc - contracts › constants.fc
imports
stdlib.fc - contracts › imports › stdlib.fc
jetton
jetton_minter.fc - contracts › jetton › jetton_minter.fc
jetton_wallet.fc - contracts › jetton › jetton_wallet.fc
jetton-utils.fc - contracts › jetton › jetton-utils.fc
op-codes.fc - contracts › jetton › op-codes.fc
params.fc - contracts › jetton › params.fc

Disclaimer