Introduction
We express our gratitude to the Destra Network team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
Destra Network provides a comprehensive suite of decentralized solutions, including decentralized cloud infrastructure, AI computing, decentralized storage solutions, decentralized database, and decentralized DNS.
Document | |
|---|---|
| Name | Smart Contract Code Review and Security Analysis Report for Destra Network |
| Audited By | Andy Cho |
| Approved By | Grzegorz Trawinski |
| Website | https://destra.network→ |
| Changelog | 23/08/2024 - Preliminary Report |
| 29/08/2024 - Final Report | |
| Platform | Ethereum |
| Language | Solidity |
| Tags | Token |
| Methodology | https://hackenio.cc/sc_methodology→ |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for Destra Network
- Audited By
- Andy Cho
- Approved By
- Grzegorz Trawinski
- Website
- https://destra.network→
- Changelog
- 23/08/2024 - Preliminary Report
- 29/08/2024 - Final Report
- Platform
- Ethereum
- Language
- Solidity
- Tags
- Token
- Methodology
- https://hackenio.cc/sc_methodology→
Review Scope | |
|---|---|
| Repository | https://github.com/DestraNetwork/DSync→ |
| Commit | 804d9ca |
Review Scope
- Repository
- https://github.com/DestraNetwork/DSync→
- Commit
- 804d9ca
Audit Summary
The system users should acknowledge all the risks summed up in the risks section of the report
Documentation quality
Functional requirements are provided.
Technical description is provided.
Code quality
The development environment is configured.
Test coverage
Code coverage of the project is 36.62% (branch coverage).
Deployment and basic user interactions are covered with tests.
Negative cases coverage is missed.
System Overview
DestraNetwork — ERC-20 token with a tax included on purchases and sales.
Privileged roles
The owner of the contract can addLiquidityPool, setSwapBackRateLimit, setTxLimit, setMaxWallet, setIsFeeExempt, setFees, and setFeeReceivers.
Risks
Centralized Control of Setting Fee Rates: The token contract's design allows for centralized control over setting fee rates, potentially undermining trust in the project's economic governance.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2024-5507 | Should Revert or Emit an Event If The Transfer to Marketing Wallet Is Failed | fixed | Low | |
| F-2024-5500 | blacklistCount Does Not Match The Actual Number Of Blacklisted Wallets | fixed | Low | |
| F-2024-5506 | Missing Zero Address Validation | fixed | Observation | |
| F-2024-5504 | Missing Events For Key Value Updates | fixed | Observation | |
| F-2024-5501 | State Variables That Should Be Constant | 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/DestraNetwork/DSync→ |
| Commit | 804d9ca733b37bc0f891e8ab8c8fac49151ce55c |
| Whitepaper | https://destra-network.gitbook.io/documentation→ |
| Technical Requirements | TECHNICAL_DESCRIPTION.md |
| Functional Requirements | REQUIREMENTS.md |
Scope Details
- Repository
- https://github.com/DestraNetwork/DSync→
- Commit
- 804d9ca733b37bc0f891e8ab8c8fac49151ce55c
- Technical Requirements
- TECHNICAL_DESCRIPTION.md
- Functional Requirements
- REQUIREMENTS.md