Introduction
We express our gratitude to the THE NEXT WORLD team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
THE NEXT WAR is a blockchain-based Battle Royale inspired by Call of Duty. A shooter game featuring world-class tournaments bringing shooter enthusiasts to a whole new level of extreme gaming.
| title | content |
|---|---|
| Platform | EVM |
| Language | Solidity |
| Timeline | 16/05/2022 - 25/05/2022 |
| Methodology | https://hackenio.cc/sc_methodology→ |
Review Scope | |
|---|---|
| Repository | https://github.com/TheNextWar/Contracts→ |
| Commit | 334fe81ea7282ac4f768de077c37a7932c0302de |
Review Scope
- Repository
- https://github.com/TheNextWar/Contracts→
- Commit
- 334fe81ea7282ac4f768de077c37a7932c0302de
Audit Summary
10/10
10/10
10/10
10/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 THE NEXT WORLD |
| Audited By | Hacken |
| Website | https://www.thenextwar.io→ |
| Changelog | 16/05/2022 - Initial Review |
| 25/05/2022 - Second Review |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for THE NEXT WORLD
- Audited By
- Hacken
- Website
- https://www.thenextwar.io→
- Changelog
- 16/05/2022 - Initial Review
- 25/05/2022 - Second Review
System Overview
THE NEXT WAR is a blockchain-based Battle Royale inspired by Call of Duty. A shooter game featuring world-class tournaments bringing shooter enthusiasts to a whole new level of extreme gaming. The system has the following contracts:
TngToken — a simple ERC-20 token that mints all initial supply to a specified during deploy address. Additional minting is not allowed.
It has the following attributes:
Name: THE NEXT WAR GEM
Symbol: TNG
Decimals: 18
Total supply: 5b (token supply could not be verified before the contract deploy)
TncToken — simple ERC-20 token with not limited minting.
It has the following attributes:
Name: THE NEXT WAR COIN
Symbol: TNC
Decimals: 18
Total supply: Unlimited
Staking — a contract that rewards users for staking their tokens.
Distribution — a contract that is responsible for token allocation distribution to users. Users can claim allocated tokens according to the vesting rules.
Privileged roles
The owner of the Distribution contract can allocate tokens for a specific address.
The owner of the Distribution contract can reset token allocation for a specific address.
The owner of the Distribution contract can change the vesting period and percentage per vesting round.
The owner of the Distribution contract can transfer any token sent to the contract.
The owner of the Staking contract can change emergency withdrawal fee. The max fee is limited to 20%.
The owner of the Staking contract can change the staking lock period.
The owner of the Staking contract can change the staking reward amount.
Executive Summary
Documentation quality
The total Documentation quality score is 10 out of 10.
The Customer provided a whitepaper with technical documentation that includes functional requirements.
Code quality
The total Code quality score is 10 out of 10.
Code is well structured.
Good unit tests coverage.
Many comments.
Architecture quality
The Architecture quality score is 10 out of 10.
The logic is separated for different files, following a single responsibility principle.
Security score
Upon auditing, the code was found to contain 1 critical, 3 high, 3 medium, and 3 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 10. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2022-1558 | Inconsistent data | fixed | Critical | |
| F-2022-1561 | Stable imports | fixed | High | |
| F-2022-1560 | Insufficient rewards balance | fixed | High | |
| F-2022-1559 | Missing validation | fixed | High | |
| F-2022-1564 | Unchecked transfer | fixed | Medium | |
| F-2022-1563 | TncToken access loss is possible | fixed | Medium | |
| F-2022-1562 | Unnecessary SafeMath usage | fixed | Medium | |
| F-2022-1567 | Missing events arithmetic | fixed | Low | |
| F-2022-1566 | The public function could be declared external | fixed | Low | |
| F-2022-1565 | Variable Shadowing | 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/TheNextWar/Contracts→ |
| Commit | 334fe81ea7282ac4f768de077c37a7932c0302de |
| Whitepaper | Provided |
| Technical Requirements | Provided |
Scope Details
- Repository
- https://github.com/TheNextWar/Contracts→
- Commit
- 334fe81ea7282ac4f768de077c37a7932c0302de
- Whitepaper
- Provided
- Technical Requirements
- Provided