Introduction
We express our gratitude to the Commoncentz team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
Commoncentz is an ERC-20 Fiat Token project. It has regular ERC-20 token functionalities with blacklist feature. Owner can add malicious users to blacklist so they will not be able to transfer their tokens.
title | content |
---|---|
Platform | EVM |
Language | Solidity |
Tags | ERC-20,Fiat |
Timeline | 05.01.2024 - 15.01.2024 |
Methodology | https://hackenio.cc/sc_methodology→ |
Review Scope | |
---|---|
Repository | https://github.com/commoncentz/commoncentz-contract→ |
Commit | 13d8809 |
Review Scope
- Commit
- 13d8809
Audit Summary
10/10
0%
8/10
6/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 Commoncentz |
Audited By | Kaan Caglan, Seher Saylik |
Approved By | Ataberk Yavuzer |
Website | http://commoncentz.com/→ |
Changelog | 08/01/2024 - Preliminary Report |
16/01/2024 - Final Report |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for Commoncentz
- Audited By
- Kaan Caglan, Seher Saylik
- Approved By
- Ataberk Yavuzer
- Website
- http://commoncentz.com/→
- Changelog
- 08/01/2024 - Preliminary Report
- 16/01/2024 - Final Report
System Overview
Commoncentz is a Fiat Token project with the following contracts.
FiatTokenV1 - Simple ERC-20 like token that has a blacklist feature.
FiatTokenV2 - Another token which has exactly same functionality with FiatTokenV1.
Privileged roles
Owner: Has the ability to stop the marketplace and perform critical administrative functions.
MasterMinter: Can configure and remove minters, as well as manage the minting allowance.
Blacklister: Can blacklist or unblacklist addresses, controlling who can participate in the network.
Executive Summary
Documentation quality
The total Documentation Quality score is 6 out of 10.
Functional requirements are not provided.
Natspec is sufficient.
Technical description is not provided.
Code quality
The total Code Quality score is 8 out of 10.
The code does not follow the Solidity best practices.
Test coverage
Code coverage of the project is 0% (branch coverage).
Coverage tool could not be run because there is no test case provided.
Security score
Upon auditing, the code was found to contain 0 critical, 0 high, 0 medium, and 1 low severity issue, 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.2. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.
Risks
The black lister role in the project has the right to blacklist any user address and burn the tokens they have.
Findings
Code ― | Title | Status | Severity | |
---|---|---|---|---|
F-2024-0361 | Non Disabled Implementation Contract | fixed | Low | |
F-2024-0377 | Unpacked Variables Consuming Gas | accepted | Observation | |
F-2024-0375 | Solidity version 0.8.20 might not work on all chains due to PUSH0 | accepted | Observation | |
F-2024-0363 | Style Guide Violation | accepted | Observation | |
F-2024-0362 | Use Ownable2Step library instead of Ownable | accepted | Observation | |
F-2024-0360 | Public Functions That Should Be External | accepted | Observation | |
F-2024-0359 | Owner Can Renounce Ownership | accepted | Observation | |
F-2024-0358 | Internal functions only called once can be inlined to save Gas | accepted | Observation | |
F-2024-0357 | Avoid Using State Variables Directly in emit for Gas Efficiency | accepted | Observation | |
F-2024-0356 | Custom Errors in Solidity for Gas Efficiency | accepted | Observation |
Identify vulnerabilities in your smart contracts.
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/commoncentz/commoncentz-contract→ |
Commit | 13d8809272e8f2e71552eb74b007716a5389cb77 |
Whitepaper | Not Provided |
Requirements | Not Provided |
Technical Requirements | Not Provided |
Scope Details
- Commit
- 13d8809272e8f2e71552eb74b007716a5389cb77
- Whitepaper
- Not Provided
- Requirements
- Not Provided
- Technical Requirements
- Not Provided