Introduction
We express our gratitude to the ZeroSix team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
ZeroSix is scaling a digital solution for a new era of high-quality carbon credits.
| title | content |
|---|---|
| Platform | EVM |
| Language | Solidity |
| Tags | ERC1155 token, Certification |
| Timeline | 23/04/2023 -06/06/2023 |
| Methodology | https://hackenio.cc/sc_methodology→ |
Review Scope | |
|---|---|
| Repository | https://github.com/482solutions/Zero6→ |
| Commit | da0ae264338f188276e9f6c385667676b00a3e1e |
Review Scope
- Repository
- https://github.com/482solutions/Zero6→
- Commit
- da0ae264338f188276e9f6c385667676b00a3e1e
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 ZeroSix |
| Audited By | Hacken |
| Website | https://zerosix.co/→ |
| Changelog | 01/05/2023 - Initial Review |
| 24/05/2023 - Second Review | |
| 06/06/2023 - Third Revie |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for ZeroSix
- Audited By
- Hacken
- Website
- https://zerosix.co/→
- Changelog
- 01/05/2023 - Initial Review
- 24/05/2023 - Second Review
- 06/06/2023 - Third Revie
System Overview
ZeroSix is an extended and modified ERC-1155 implementation which is named ERC-1888. System explanation can be found in the following contracts:
Registry — an extended ERC-1155 contract that can certify a token and assign an issuer to give the entire control of the related token id. A certificate is basically a token id (ERC-1155) that can be minted an infinite amount by only its issuer to any address. The issuer can not be changed later once it is issued. Every certificate has an expiration time and users cannot transfer or claim tokens once it is expired.
Issuer — a management contract that helps requesting/approving workflows for issuing ERC-1888 certificates. Issuer contract is the owner of the Registry contract. ERC-1888 operations are controlled here.
RegistryExtended — an extended version of Registry contract with multiple batch issuing and multiple batch transfers. It inherits the Registry contract.
TokenAccount — a modified IERC1155Receiver contract that acts as an intermediary that receives ERC1155 tokens and forwards them to a specified wallet address.
CommonConstants — a basic contract that is inherited by TokenAccount to store constant variables.
Privileged roles
The owner of the RegistryExtended contract can:
issue an ERC-1155 token id to itself (msg.sender).
handle batch issues and batch multiple issues.
The owner of the Issuer contract can:
set a private issuer.
approve requested certification requests.
issue a certification without needing certification request.
mint more volume to existing certificates.
Executive Summary
Documentation quality
The total Documentation quality score is 10 out of 10.
Functional requirements are provided.
Technical description is provided.
Code quality
The total Code quality score is 10 out of 10.
The project follows the official Solidity style guide →.
Test coverage
Code coverage of the project is 100% (branch coverage).
Deployment and basic user interactions are covered with tests.
Security score
Upon auditing, the code was found to contain 0 critical, 0 high, 1 medium, and 8 low severity issues. Out of these, 8 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
No potential risks were found.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2023-0973 | Uninitialized Implementation | fixed | Medium | |
| F-2023-0981 | Missing Zero Address Validation | fixed | Low | |
| F-2023-0980 | Functions That Can Be Declared External | fixed | Low | |
| F-2023-0979 | Reading Array Length in a Loop | fixed | Low | |
| F-2023-0978 | Redundant Implementation | mitigated | Low | |
| F-2023-0977 | Missing Validation | fixed | Low | |
| F-2023-0976 | Missing Validation | fixed | Low | |
| F-2023-0975 | Floating Pragma | fixed | Low | |
| F-2023-0974 | Outdated Solidity Version | fixed | Low | |
| I-2023-0262 | Variables That Can Be Declared Immutable | fixed | Observation |
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/482solutions/Zero6→ |
| Commit | da0ae264338f188276e9f6c385667676b00a3e1e |
| Whitepaper | Not provided |
| Requirements | Provided |
| Technical Requirements | Provided |
Scope Details
- Repository
- https://github.com/482solutions/Zero6→
- Commit
- da0ae264338f188276e9f6c385667676b00a3e1e
- Whitepaper
- Not provided
- Requirements
- Provided
- Technical Requirements
- Provided