Introduction
We express our gratitude to the ByTrade Venture Capital team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
ByTrade is the fastest-growing crypto trading platform in South Asia offering safe and secure blockchain solutions for users to manage transfers, deposits & storage of cryptocurrencies. ByTrade facilitates a future powered by blockchain technology that empowers users with boundless opportunities, greater equality, and massive freedom.
| title | content |
|---|---|
| Platform | BNB Chain |
| Language | Solidity |
| Tags | ERC20 |
| Timeline | 02/02/2023 - 23/02/2023 |
| Methodology | https://hackenio.cc/sc_methodology→ |
Review Scope | |
|---|---|
| Repository | https://github.com/bytradeio/Bytrade-ERC20Token→ |
| Commit | 510e568774ecfef28ab21ca6bf759fbcffdfd3cd |
Review Scope
- Commit
- 510e568774ecfef28ab21ca6bf759fbcffdfd3cd
Audit Summary
8/10
0%
5/10
7/10
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 | |
|---|---|
| Name | Smart Contract Code Review and Security Analysis Report for ByTrade Venture Capital |
| Audited By | Hacken |
| Changelog | 09/02/2023 – Initial Review |
| 23/02/2023 - Second Review |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for ByTrade Venture Capital
- Audited By
- Hacken
- Changelog
- 09/02/2023 – Initial Review
- 23/02/2023 - Second Review
System Overview
The Bytrade token meets the ERC20 standard, and is extended with the following functionalities (restricted to the contract owner):
Ability to pause/unpause transactions.
Ability to renounce ownership.
Ability to transfer ownership.
Privileged roles
The owner can pause the contract, blocking the possibility for any user to perform a token transfer or allowance modification.
Executive Summary
Documentation quality
The total Documentation quality score is 7 out of 10.
Functional requirements are provided.
Technical description is not sufficient.
Test coverage and running instructions are not provided.
Development environment is not configured.
Code quality
The total Code quality score is 5 out of 10.
Style Guide and Best practices are not followed.
The development environment is not configured.
Not all issues are fixed.
Presence of unused parameters and contracts.
Test coverage
Code coverage of the project is 0% (branch coverage).
Security score
Upon auditing, the code was found to contain 0 critical, 2 high, 3 medium, and 12 low severity issues. Out of these, 6 issues have been addressed and resolved, leading to a security score of 8 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 7.3. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.
Risks
Token can be paused/unpaused by the owner at any time.
The defined token in ByTradeToken uses the symbol BTT, which is already used by the BitTorrent token →.
The contract ByTradeToken implements a renounceOwnership() functionality, which will remove the contract ownership. Since the contract implements several functions that can only be called by the owner pause(), unpause(). Removing the owner will lock said functions. If renounceOwnership() is called when the contract is paused, the consequence is a Denial of Service for transfer(), transferFrom(), approve(), increaseAllowance() and decreaseAllowance().
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2023-1284 | BEP Standard Violation | fixed | High | |
| F-2023-1283 | Requirements Violation | fixed | High | |
| F-2023-1287 | SafeMath in ^0.8.0 | unfixed | Medium | |
| F-2023-1286 | Unscalable Functionality: Copy of Well-Known Contracts | unfixed | Medium | |
| F-2023-128 | Unscalable Functionality: Repeated Checks in Functions | fixed | Medium | |
| F-2023-129 | Unused Parameters | unfixed | Low | |
| F-2023-1298 | Redundant Initialization of Default Values | unfixed | Low | |
| F-2023-1297 | Unscalable Functionality: Missing Events Arguments | unfixed | Low | |
| F-2023-129 | Undocumented Literals | unfixed | Low | |
| F-2023-129 | Missing NatSpec | fixed | Low |
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 | |
|---|---|
| Repository | https://github.com/bytradeio/Bytrade-ERC20Token→ |
| Commit | 510e568774ecfef28ab21ca6bf759fbcffdfd3cd |
| Whitepaper | Provided |
| Requirements | Provided |
| Technical Requirements | Provided |
Scope Details
- Commit
- 510e568774ecfef28ab21ca6bf759fbcffdfd3cd
- Whitepaper
- Provided
- Requirements
- Provided
- Technical Requirements
- Provided