Q1 2025 Web3 Security ReportAccess control failures led to $1.63 billion in losses
Discover report insights
  • Hacken
  • Audits
  • whitebit
  • [SCA] WhiteBIT / Vesting / Jul2022
WhiteBIT logo

WhiteBIT

Audit name:

[SCA] WhiteBIT / Vesting / Jul2022

Date:

Aug 24, 2022

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

WhiteBIT is the largest European cryptocurrency exchange. WhiteBIT’s goal is to contribute to the mass adoption and popularization of blockchain technologies by implementing the most effective trading and staking tools on the most convenient terms.

titlecontent
PlatformEVM
LanguageSolidity
TagsVesting
Timeline19/07/2022 - 25/08/2022
Methodologyhttps://hackenio.cc/sc_methodology

    Review Scope

    Repositoryhttps://github.com/whitebit-exchange/wbt-token/
    Commit7303a11b04a6ede4aa36bb9b25b25725c3315283

    Audit Summary

    Total9.9/10
    Security Score

    10/10

    Test Coverage

    9/10

    Code Quality Score

    10/10

    Documentation Quality Score

    10/10

    16Total Findings
    15Resolved
    0Accepted
    1Mitigated

    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 WhiteBIT
    Audited ByHacken
    Websitehttps://whitebit.com/ua
    Changelog22/07/2022 - Initial Review
    02/08/2022 - Second Review
    25/08/2022 - Third Review
    • Document

      Name
      Smart Contract Code Review and Security Analysis Report for WhiteBIT
      Audited By
      Hacken
      Changelog
      22/07/2022 - Initial Review
      02/08/2022 - Second Review
      25/08/2022 - Third Review

    System Overview

    WBT: Private Sale Vesting is a vesting project with the following contracts:

    • Escrow — is a vesting contract that allows the distribution of WBT tokens (the contract allows the distribution of any tokens). The time ranges for 5 schedules during which tokens are distributed are defined during the contract deployment. Before the schedules start, the owner adds the information about the vesting for each user (address and the amount of tokens). The amount is divided into 5 schedules (per 20% for each schedule) and is available to be transferred to the user by the contract owner at the appropriate time.

    • CustomOwnable — is a contract with the owner access mechanism, inherited by the Escrow contract.

    • testToken — is an ERC-20 token contract used for testing purposes.

    • IERC20 — is an interface for ERC-20 tokens, used in the Escrow contract, inherited by the testToken contract.

    Privileged roles

    • The owner of the Escrow contract can add the information about the vesting for users before the distribution starting time, and remove the information for the vesting anytime. The owner triggers the vest (tokens distribution).

    Executive Summary

    Documentation quality

    The total Documentation quality score is 10 out of 10.

    • Functional requirements and a technical description were provided.

    Code quality

    The total Code quality score is 10 out of 10.

    • Most of the code follows official language style guides.

    • Unit tests were provided.

    Architecture quality

    The architecture quality score is 9 out of 10.

    • The architecture is clear.

    • The development environment was provided, but the instructions on how to deploy the code were not provided.

    Security score

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

    Risks

    The tokens distribution, the correctness of amounts, and the receivers can not be guaranteed, as the contract owner adds and removes the information for the distribution tokens (users and amounts), and triggers the distribution.

    There are contracts in the repository not included in the audit scope.

    Findings

    Code
    Title
    Status
    Severity
    F-2022-1928Funds lock
    fixed

    High
    F-2022-1927Denial of Service vulnerability
    fixed

    High
    F-2022-1934Unoptimized loops usage
    fixed

    Medium
    F-2022-1933 Checks-Effects-Interaction pattern violation
    fixed

    Medium
    F-2022-1932Missing events emit on changing important values
    fixed

    Medium
    F-2022-1931Unoptimized loops usage
    fixed

    Medium
    F-2022-1930Unoptimized loops usage
    fixed

    Medium
    F-2022-1929Failing tests
    fixed

    Medium
    F-2022-1942Missing zero address validation
    fixed

    Low
    F-2022-1941Division before multiplication
    fixed

    Low
    1-10 of 16 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/whitebit-exchange/wbt-token/
    Commit7303a11b04a6ede4aa36bb9b25b25725c3315283
    WhitepaperNot provided
    RequirementsProvided
    Technical RequirementsProvided

    Contracts in Scope

    escrow-private
    contracts
    CustomOwnable.sol - escrow-private/contracts/CustomOwnable.sol
    Escrow.sol - escrow-private/contracts/Escrow.sol
    interfaces
    IERC20.sol - escrow-private/contracts/interfaces/IERC20.sol
    testToken.sol - escrow-private/contracts/testToken.sol

    Disclaimer