Introduction
We express our gratitude to the EverValue Coin team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
EverValue Coin (EVA) is an ERC20 token designed to work on the Arbitrum network, offering a decentralized finance (DeFi) ecosystem centered around token burns and exchanges. EVA is burnable and interacts with various smart contracts, allowing holders to increase their value by burning tokens for a share of wBTC reserves, thus creating a dynamic share system.
| title | content |
|---|---|
| Platform | Arbitrum(EVM) |
| Language | Solidity |
| Tags | ERC20, wBTC, Token Sale, |
| Timeline | 22/05/2024 - 23/05/2024 |
| Methodology | https://hackenio.cc/sc_methodology→ |
Review Scope | |
|---|---|
| Repository | https://github.com/devervalue/evervaluecoin→ |
| Commit | 96585f2 |
Review Scope
- Commit
- 96585f2
Audit Summary
10/10
100%
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 EverValue Coin |
| Audited By | Eren Gönen |
| Approved By | Ataberk Yavuzer |
| Changelog | 28/05/2024 - Preliminary Report |
| 03/07/2024 - Final Report |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for EverValue Coin
- Audited By
- Eren Gönen
- Approved By
- Ataberk Yavuzer
- Changelog
- 28/05/2024 - Preliminary Report
- 03/07/2024 - Final Report
System Overview
EverValue Coin is an ERC20 token with a burnable feature that interacts with other contracts like EVAMarket and EVABurnVault. These contracts allow users to buy, sell, or burn EVA tokens and receive market tokens or wBTC in return. The following contracts are involved:
EverValueCoin — A burnable ERC20 token with a limited supply, designed to work on the Arbitrum network. This contract manages the minting and burning of EVA tokens, with a capped total supply of 21,000,000 tokens. It has the following attributes:
Name: EverValueCoin
Symbol: EVA
Decimals: 18
Total supply: 21 m tokens.
EVABurnVault — A vault that allows users to burn EVA tokens in exchange for backing wBTC tokens. The contract facilitates the burning of EVA tokens and ensures fair distribution of wBTC tokens.
EVAMarket — A centralized market for buying and selling EVA tokens at administratively defined rates. The contract allows users to buy or sell EVA tokens using a defined market token, with adjustable rates and fees.
Privileged roles
The owner of the EVAMarket contract can set the transaction fee for selling EVA tokens and withdraw all tokens from the contract.
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 8 out of 10.
The development environment is configured.
Some best practices are missed.
Test coverage
Code coverage of the project is 100% (branch coverage).
Everything covered with tests.
Security score
Upon auditing, the code was found to contain 0 critical, 0 high, 1 medium, and 0 low severity issues. Out of these, 1 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
Solidity Version Compatibility: The Solidity version 0.8.20 employs the recently introduced PUSH0 opcode in the Shanghai EVM. This opcode might not be universally supported across all blockchain networks and Layer 2 solutions. Thus, as a result, it might be not possible to deploy solution with version 0.8.20 >= on some blockchains.
Centralized Minting to a Single Address: The project concentrates minting tokens in a single address, raising the risk of fund mismanagement or theft, especially if key storage security is compromised.
Absence of Pausable Feature for Unexpected Events: Without the pausable feature, the contract cannot be immediately paused in the event of unexpected occurrences.
Insufficient Multi-signature Controls for Critical Functions: The lack of multi-signature requirements for key operations centralizes decision-making power, increasing vulnerability to single points of failure or malicious insider actions, potentially leading to unauthorized transactions or configuration changes.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2024-4200 | Sales made with low amounts can be made for free due to lack of control | fixed | Medium | |
| F-2024-3282 | Inadequate Management of Transaction Fees in Token Sale Function | accepted | Observation | |
| F-2024-3279 | Lack of Upper Bound on marketTokenPer100Eva Parameter | accepted | Observation | |
| F-2024-3274 | Redundant _msgSender(), Meta-Transactions Not Implemented | accepted | Observation | |
| F-2024-3273 | State Variables Only Set in The Constructor Should Be Declared immutable | accepted | Observation | |
| F-2024-3272 | Redundant imports | accepted | Observation | |
| F-2024-3271 | Functions that Can Be Declared External | accepted | Observation | |
| F-2024-3270 | Missing Events | accepted | 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/devervalue/evervaluecoin→ |
| Commit | 96585f24084b3be7936a1288c20e439e78d0c251 |
| Remediation Commit | 4631b7b8241f5c08313a2222d16187b847fa90df |
| Whitepaper | N/A |
| Requirements | https://github.com/devervalue/evervaluecoin/blob/main/API.md→ |
| Technical Requirements | https://github.com/devervalue/evervaluecoin/blob/main/README.md→ |
Scope Details
- Commit
- 96585f24084b3be7936a1288c20e439e78d0c251
- Remediation Commit
- 4631b7b8241f5c08313a2222d16187b847fa90df
- Whitepaper
- N/A
- Technical Requirements
- https://github.com/devervalue/evervaluecoin/blob/main/README.md→
Deployed Contracts | Arbitrum |
|---|---|
| addrEva | 0x45d9831d8751b2325f3dbf48db748723726e1c8c |
| addrBurnVault | 0xA89d65deF0A001947d8D5fDda93F9C4f8453902e |
| addrMarket | 0x53314ba4c6015466b881d614F3840CF0d038e94C |
Deployed Contracts
- addrEva
Arbitrum
- 0x45d9831d8751b2325f3dbf48db748723726e1c8c
Deployed Contracts
- addrBurnVault
Arbitrum
- 0xA89d65deF0A001947d8D5fDda93F9C4f8453902e
Deployed Contracts
- addrMarket
Arbitrum
- 0x53314ba4c6015466b881d614F3840CF0d038e94C