Introduction
We express our gratitude to the Ethereum Towers team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
Ethereum Towers is a community-centric, vertical megastructure consisting of 4,388 resident-owned apartments and a variety of communal areas, set in the forthcoming Ethereum Worlds Metaverse.
| title | content |
|---|---|
| Platform | EVM |
| Language | Solidity |
| Tags | Staking |
| Timeline | 16/06/2022 - 04/07/2022 |
| Methodology | https://hackenio.cc/sc_methodology→ |
Review Scope | |
|---|---|
| Repository | https://github.com/ethereumtowers/contracts→ |
| Commit | 94eb48031a02455bb3c48285ffe41fbbe3498079 |
Review Scope
- Commit
- 94eb48031a02455bb3c48285ffe41fbbe3498079
Audit Summary
10/10
10/10
9/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 Ethereum Towers |
| Audited By | Hacken |
| Website | https://ethereumtowers.com→ |
| Changelog | 17/06/2022 - Initial Review |
| 04/07/2022 - Second Review |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for Ethereum Towers
- Audited By
- Hacken
- Website
- https://ethereumtowers.com→
- Changelog
- 17/06/2022 - Initial Review
- 04/07/2022 - Second Review
System Overview
Ethereum Towers is a community-centric, vertical megastructure consisting of 4,388 resident-owned apartments and a variety of communal areas, set in the forthcoming Ethereum Worlds Metaverse with the following contracts:
EthereumWorldsNFTStaking — a contract that rewards users for staking their NFTs. Rewards are calculated off-chain.
Privileged roles
The owner of the EthereumWorldsNFTStaking contract can pause staking, unstacking, and claiming in case of emergency.
The owner of the EthereumWorldsNFTStaking contract can update the service signer address.
The owner of the EthereumWorldsNFTStaking contract can update the max amount of tokens in staking.
The owner of the EthereumWorldsNFTStaking contract can withdraw ERC20 tokens sent to the contract.
Executive Summary
Documentation quality
The total Documentation quality score is 10 out of 10.
Functional and technical requirements are provided.
Whitepaper describes the project adequately.
Code quality
The total Code quality score is 9 out of 10.
Code style and naming conventions are respected.
The “should restrict calling stake for non-existing token” test is failing and should be fixed.
Architecture quality
The Architecture quality score is 10 out of 10.
Contracts follow single responsibility principles.
Code is well-formatted.
Security score
Upon auditing, the code was found to contain 0 critical, 1 high, 1 medium, and 4 low severity issues, 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.9. This score reflects the combined evaluation of documentation, code quality, architecture quality, and security aspects of the project.
Risks
In case of an admin keys leak, an attacker can lock contract functionality.
In case the contract will not be funded with world tokens - it would not be possible to claim rewards.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2022-1589 | Inconsistent contract state | fixed | High | |
| F-2022-1590 | Unused renting logic | fixed | Medium | |
| F-2022-1594 | Redundant SafeCast library | unfixed | Low | |
| F-2022-1593 | Zero address is allowed | fixed | Low | |
| F-2022-1592 | Missing events arithmetic | fixed | Low | |
| F-2022-1591 | Variable Shadowing | fixed | Low |
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/ethereumtowers/contracts→ |
| Commit | 94eb48031a02455bb3c48285ffe41fbbe3498079 |
| Whitepaper | Provided→ |
| Requirements | Provided |
| Technical Requirements | Provided→ |