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

Audit name:

[SCA] Upcade | Vault | Jan2024

Date:

Feb 5, 2024

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

Upcade is a vault system integrating user deposits and withdrawals between blockchain and the Upcade gaming platform.

titlecontent
PlatformPolkadot
LanguageRust
TagsVault
Timeline17/01/2024 - 19/01/2024
Methodologyhttps://hackenio.cc/sc_methodology→

    Review Scope

    Repositoryhttps://github.com/GameDev-Tube/Upcade.Vault.A0→
    Commit7f8c6e2

    Audit Summary

    Total9.6/10
    Security Score

    10/10

    Test Coverage

    100%

    Code Quality Score

    8/10

    Documentation Quality Score

    10/10

    2Total Findings
    1Resolved
    1Accepted
    0Mitigated

    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 Upcade
    Audited ByEren Gonen
    Approved ByAtaberk Yavuzer
    Websitehttps://azero.upcade.xyz/→
    Changelog22/01/2024 - Preliminary Report
    24/01/2024 - Final Report
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for Upcade
      Audited By
      Eren Gonen
      Approved By
      Ataberk Yavuzer
      Changelog
      22/01/2024 - Preliminary Report
      24/01/2024 - Final Report

    System Overview

    Upcade is a vault where users can deposit tokens. The owners manage these tokens, rewards, and withdrawals through defined roles in the system, such as 'owner' and 'manager,' with the following contracts:

    upcade_vault  — The contract serves as a vault for user-deposited tokens, encompassing functions for withdrawals and rewards, which are controlled by specific roles within the system. Additionally, this contract features an access control mechanism to manage the addresses of owners and managers.

    Privileged roles

    • The owner of the contract can add, remove manager addresses.

    • The owner has the capability to withdraw tokens to a specific address from the contract's balance.

    • The owner has the capability to withdraw all tokens from the contract's balance.

    • The owner and manager can distribute rewards from the contract's balance.

    Executive Summary

    Documentation quality

    The total Documentation Quality score is 10 out of 10.

    • Functional requirements are partially provided.

    • Technical description is provided.

    Code quality

    The total Code Quality score is 8 out of 10.

    • The development environment is configured.

    • The reward withdrawal mechanism is centralized.

    Test coverage

    Code coverage of the project is 100%

    • Deployment and user interactions are thoroughly tested, covering both negative and positive cases.

    Security score

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

    Risks

    The contract owner has the authority to withdraw all tokens deposited in the contract.

    The algorithm for the reward mechanism incorporates logic outside the contract - which is out of the scope.

    Findings

    F-2024-0538Lack of On-Chain Record for Deposits and Centralized Reward Withdrawal Mechanism
    Status
    accepted
    Severity

    Low
    F-2024-0537Missing Events
    Status
    fixed
    Severity

    Observation
    Code
    ―
    Title
    Status
    Severity
    F-2024-0538Lack of On-Chain Record for Deposits and Centralized Reward Withdrawal Mechanism
    accepted

    Low
    F-2024-0537Missing Events
    fixed

    Observation
    1-2 of 2 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 - initial

    Repositoryhttps://github.com/GameDev-Tube/Upcade.Vault.A0/→
    Commitbbaf806336ecd5f374c06dcebf419a7ff2a0ce8e
    WhitepaperN/A
    RequirementsREADME→
    Technical RequirementsREADME→

    Scope Details - second

    Repositoryhttps://github.com/GameDev-Tube/Upcade.Vault.A0/→
    Commit7f8c6e2654ebf89b9cb21eab2831c46994deb2a2
    WhitepaperN/A
    RequirementsREADME→
    Technical RequirementsREADME→

    Contracts in Scope

    contracts
    lib.rs - contracts › lib.rs
    errors
    upcade_errors.rs - contracts › errors › upcade_errors.rs
    mod.rs - contracts › errors › mod.rs
    extensions
    access_control.rs - contracts › extensions › access_control.rs
    mod.rs - contracts › extensions › mod.rs

    Disclaimer