Introduction
We express our gratitude to the Cofinex team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
Cofinex is a global digital asset and cryptocurrency exchange platform.
Document | |
|---|---|
| Name | Smart Contract Code Review and Security Analysis Report for Cofinex |
| Audited By | Viktor Lavrenenko |
| Approved By | Ivan Bondar |
| Website | http://cofinex.io/→ |
| Changelog | 20/08/2025 - Preliminary Report |
| 22/08/2025 - Final Report | |
| Platform | BSC |
| Language | Solidity |
| Tags | ERC20; Pausable; Burnable; Permit |
| Methodology | https://hackenio.cc/sc_methodology→ |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for Cofinex
- Audited By
- Viktor Lavrenenko
- Approved By
- Ivan Bondar
- Website
- http://cofinex.io/→
- Changelog
- 20/08/2025 - Preliminary Report
- 22/08/2025 - Final Report
- Platform
- BSC
- Language
- Solidity
- Tags
- ERC20; Pausable; Burnable; Permit
- Methodology
- https://hackenio.cc/sc_methodology→
Review Scope | |
|---|---|
| Deployed Code | https://bscscan.com/address/0xdea0b8ad5806d8be6ea38ba4e5fc36118808eb04→ |
| Repository | https://github.com/cofinex/cofinex_contract→ |
| Commit | 0ab4927 |
Review Scope
- Commit
- 0ab4927
Audit Summary
The system users should acknowledge all the risks summed up in the risks section of the report
Documentation quality
Functional requirements are complete:
The project’s purpose is described.
Business logic is provided.
Use cases are provided.
Project’s features are explained.
Technical description is complete:
Key function descriptions are provided for the files in the scope.
Roles and authorization are described.
Information on used technologies is provided.
Code quality
Best practices are followed.
The development environment is configured.
Test coverage
Code coverage of the project is 100% (branch coverage):
Deployment and basic user interactions are covered with tests.
Negative cases coverage is provided.
Interactions by several users are tested thoroughly.
System Overview
CNX.sol — Burnable and Pausable ERC-20 token with permit functionality that mints all initial supply to a deployer. Additional minting is not allowed.
It has the following attributes:
Name: Cofinex.
Symbol: CNX.
Decimals: 18.
Total supply: 500000000 * 10**18.
Privileged roles
The owner of the
Cofinexsmart-contract can:pause and unpause the token functionality via the
pause()/unpause()functions.transfer the contract ownership via the
transferOwnership()function.
Potential Risks
The project concentrates minting tokens in a single address, raising the risk of fund mismanagement or theft, especially if key storage security is compromised.
The Cofinex token contract is pausable meaning that the contract owner can pause the token's functionality at any time.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2025-1229 | Potential Loss of Ownership Control in Contract Using Ownable | mitigated | Observation |
Appendix 1. Definitions
Severities
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. |
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.
Potential Risks
The "Potential Risks" section identifies issues that are not direct security vulnerabilities but could still affect the project’s performance, reliability, or user trust. These risks arise from design choices, architectural decisions, or operational practices that, while not immediately exploitable, may lead to problems under certain conditions. Additionally, potential risks can impact the quality of the audit itself, as they may involve external factors or components beyond the scope of the audit, leading to incomplete assessments or oversight of key areas. This section aims to provide a broader perspective on factors that could affect the project's long-term security, functionality, and the comprehensiveness of the audit findings.
Appendix 2. Scope
The scope of the project includes the following smart contracts from the provided repository:
Scope Details | |
|---|---|
| Deployed Code | https://bscscan.com/address/0xdea0b8ad5806d8be6ea38ba4e5fc36118808eb04→ |
| Repository | https://github.com/cofinex/cofinex_contract→ |
| Commit | 0ab492704d47da3e6b6bd0e8d3fe652f2c9e3b31 |
| Whitepaper | https://images.cofinex.io/docs/CNX_whitepaper_en_v1.1.1.pdf→ |
| Requirements | https://images.cofinex.io/docs/CNX_whitepaper_en_v1.1.1.pdf→ |
| Technical Requirements | NatSpec |
Scope Details
- Commit
- 0ab492704d47da3e6b6bd0e8d3fe652f2c9e3b31
- Technical Requirements
- NatSpec
Assets in Scope
Appendix 3. Additional Valuables
The smart contracts in the scope of this audit could benefit from the introduction of automatic emergency actions for critical activities, such as unauthorized operations like ownership changes or proxy upgrades, as well as unexpected fund manipulations, including large withdrawals or minting events. Adding such mechanisms would enable the protocol to react automatically to unusual activity, ensuring that the contract remains secure and functions as intended.
To improve functionality, these emergency actions could be designed to trigger under specific conditions, such as:
Detecting changes to ownership or critical permissions.
Monitoring large or unexpected transactions and minting events.
Pausing operations when irregularities are identified.
These enhancements would provide an added layer of security, making the contract more robust and better equipped to handle unexpected situations while maintaining smooth operations.