Introduction
We express our gratitude to the MetaTime team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
By completely self-funding its technology development stages, Metatime aims to establish the world’s most comprehensive and transparent ecosystem. Metatime continues to innovate and develop a wide range of products such as MetaChain, MetaWallet, Metatime Coin, MetaExchange, and MetaNFT, placing user needs at the forefront and designing from the ground up.
| title | content |
|---|---|
| Platform | EVM |
| Language | Solidity |
| Tags | ERC20 token, Vesting, Proxy, Factory |
| Timeline | 18/05/2023 - 19/06/2023 |
| Methodology | https://hackenio.cc/sc_methodology→ |
Review Scope | |
|---|---|
| Repository | https://github.com/Metatime-Technology-Inc/pool-contracts→ |
| Commit | 8b8d8e1 |
Review Scope
- Commit
- 8b8d8e1
Audit Summary
10/10
100%
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 MetaTime |
| Audited By | Hacken |
| Website | https://metatime.com/en→ |
| Changelog | 25/05/2023 - Initial Review |
| 09/06/2023 - Second Review | |
| 19/06/2023 - Third Review |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for MetaTime
- Audited By
- Hacken
- Website
- https://metatime.com/en→
- Changelog
- 25/05/2023 - Initial Review
- 09/06/2023 - Second Review
- 19/06/2023 - Third Review
System Overview
MetaTime is a multi purpose protocol with the following contracts:
MTC — custom ERC-20 token that mints all initial supply to pools determined by the deployer. Additional minting is not allowed. It has the following attributes:
Name: Metatime.
Symbol: MTC.
Decimals: 18.
Total supply: dynamic (documentation: 10b tokens).
Distributor — a pool contract that stores and distributes locked tokens related to the ecosystem tokenomics, such as Marketing Pool, Team Pool and Charity Pool.
TokenDistributor — a pool contract that stores and distributes locked tokens related to mass distribution, such as Seed Sale 1, Seed Sale 2 and Public Sale.
LiquidityPool — represents the Liquidity Pool in the MTC Tokenomics. It transfers funds when needed according to the market making purposes.
StrategicPool — used for burning purposes. It has a manual burning function and burning function that calculates the burn amount by using formula.
TokenDistributorWithNoVesting — custom TokenDistributor contract implementation with some differences, such as absence of periodic distribution, and it is not a proxy logic contract.
Privileged roles
The owner of the Distributor contract can claim claimable tokens from the pool.
The owner of the LiquidityPool contract can transfer tokens from the pool.
The owner of the TokenDistributorWithNoVesting contract can arbitrarily set claimable token amounts for users and sweep tokens balance after end time.
The owner of the StrategicPool contract can withdraw and burn tokens from the contract's balance.
The owner of the TokenDistributor contract can arbitrarily set claimable token amounts for users and sweep tokens balance after end time.
Executive Summary
Documentation quality
The total Documentation quality score is 10 out of 10.
Functional requirements are provided.
Technical and environment descriptions are provided.
Code quality
The total Code quality score is 10 out of 10.
The code follows best practices.
Test coverage
Code coverage of the project is 100% (branch coverage).
Deployment and basic user interactions are covered with tests.
All system features are covered with tests.
Security score
Upon auditing, the code was found to contain 0 critical, 4 high, 9 medium, and 17 low severity issues. Out of these, 30 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 10. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.
Risks
The owner of the vesting contract can extract all contract tokens (after the token distribution end time plus 100 days), leaving users empty-handed if they did not claim their tokens.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2023-0946 | Undocumented Functionality: Proxy System Architecture | fixed | High | |
| F-2023-0945 | Missing Validation; Data Consistency | fixed | High | |
| F-2023-0944 | Funds Lock | fixed | High | |
| F-2023-0943 | Invalid Calculations; Missing Validation | fixed | High | |
| F-2023-0955 | Requirements Violation | fixed | Medium | |
| F-2023-0954 | Funds Lock | fixed | Medium | |
| F-2023-0953 | Wrong Event Data | fixed | Medium | |
| F-2023-0952 | Missing Check: Loss of Funds | fixed | Medium | |
| F-2023-0951 | Division Before Multiplication | fixed | Medium | |
| F-2023-0950 | Best Practice Violation - Checks-Effects-Interactions Pattern | fixed | Medium |
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/Metatime-Technology-Inc/pool-contracts→ |
| Commit | 8b8d8e1 |
| Whitepaper | Provided→ |
| Requirements | Provided→ |
| Technical Requirements | Provided→ |