Introduction
We express our gratitude to the TenPointOne team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
TenPointOne provides decentralized self-custody vaults, encoded with battle-tested compliance controls used by global financial institutions.
| title | content |
|---|---|
| Platform | EVM |
| Language | Solidity |
| Tags | Factory |
| Timeline | 26/02/2024 - 03/04/2023 |
| Methodology | https://hackenio.cc/sc_methodology→ |
Review Scope | |
|---|---|
| Repository | https://github.com/hknio/RP-Backend-V2-060aa1ee41679dcacd1501ff0→ |
| Commit | a094e82dd1c704feddb29183429e560f0ad3753d |
Review Scope
- Commit
- a094e82dd1c704feddb29183429e560f0ad3753d
Audit Summary
10/10
98.2%
8/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 TenPointOne |
| Audited By | Hacken |
| Website | https://tenpoint.one/→ |
| Changelog | 02/03/2023 - Initial Review |
| 03/04/2023 - Second Review |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for TenPointOne
- Audited By
- Hacken
- Website
- https://tenpoint.one/→
- Changelog
- 02/03/2023 - Initial Review
- 03/04/2023 - Second Review
System Overview
TenPointOne is a contract factory system with the following contracts:
DeployRCUP_ — is a head smart contract that stores information about smart contracts factories in the system.
vFactv112 — is a smart contract factory for Vaultv112.
Vaultv112 — is a head smart contract over SEGAv112 that manages assets between SEGAv112_ smart contracts.
sFactv112 — is a smart contract factory for SEGAv112.
SEGAv112 — is a smart contract that is managed by Vaultv112 and available to call third party methods and send assets.
Privileged roles
The owner of the DeployRCUP_ contract can arbitrarily change the owner and addresses of factories.
The owner of the vFactv112 contract can change the field address RCU_.
The owner of the Vaultv112 contract can arbitrarily set a backup account, unlock period, transfer native and token assets. Moreover, create controlled Segav112 smart contracts and manage them.
The Vaultv112 smart contract has a backupAccount_ role. This role can become the owner of the smart contract.
The SEGAv112 smart contract has a trader_ role. This role can call external functions, transfer native and token assets.
Executive Summary
Documentation quality
The total Documentation quality score is 10 out of 10.
Project overview is detailed.
All roles in the system are described..
Use cases are described and detailed.
All interactions are described.
Run instructions are provided.
Technical specification is provided.
NatSpec is sufficient.
Code quality
The total Code quality score is 8 out of 10.
Solidity Style Guide violations.
Best practices violations.
Test coverage
Code coverage of the project is 98.2% (branch coverage).
Deployment and basic user interactions are covered with tests.
Interactions with several users are tested.
Security score
Upon auditing, the code was found to contain 0 critical, 0 high, 1 medium, and 6 low severity issues. Out of these, 5 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.6. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.
Risks
The view function returns a dynamic array of unlimited size. It is theoretically possible that the Gas cost for executing this function will exceed the Gas limit set in the node.
Functions that are available to call external functions ignore returned data.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2023-0001 | Gas Limit and Loops | fixed | Medium | |
| F-2023-0008 | Unnecessary state variable | fixed | Low | |
| F-2023-0007 | Missing Zero Address Validation | unfixed | Low | |
| F-2023-0006 | State variables default visibility | fixed | Low | |
| F-2023-0005 | Solidity Code Style Guide Violations | unfixed | Low | |
| F-2023-0004 | Unused arguments | fixed | Low | |
| F-2023-0003 | Floating Pragma | 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/hknio/RP-Backend-V2-060aa1ee41679dcacd1501ff0→ |
| Commit | a094e82dd1c704feddb29183429e560f0ad3753d |
| Whitepaper | Provided→ |
| Requirements | Provided→ |
| Technical Requirements | Provided→ |