Introduction
We express our gratitude to the Blockscape Finance Ag team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
Blockscape Rocketscape is a smart contract solution that enables users to stake ETH and mint NFTs that represent their stake and rewards.
| title | content |
|---|---|
| Platform | EVM |
| Language | Solidity |
| Tags | NFT; Staking |
| Timeline | 01/03/2023 - 10/03/2023 |
| Methodology | https://hackenio.cc/sc_methodology→ |
Review Scope | |
|---|---|
| Repository | https://github.com/BlockscapeNetwork/rocketscape/tree/main/src→ |
| Commit | 5219b39c6c74a0d3a533a6f06fe589e574744da4 |
Review Scope
- Commit
- 5219b39c6c74a0d3a533a6f06fe589e574744da4
Audit Summary
10/10
59.68%
10/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 Blockscape Finance Ag |
| Audited By | Hacken |
| Website | https://blockscape.network/→ |
| Changelog | 10/03/2023 - Initial Review |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for Blockscape Finance Ag
- Audited By
- Hacken
- Website
- https://blockscape.network/→
- Changelog
- 10/03/2023 - Initial Review
System Overview
Blockscape Finance is an NFT staking system with the following contracts:
BlockscapeValidatorNFT — an NFT issued to a user who stakes 16 ETH with Blockscape. This NFT represents a Validator on the Blockscape platform. The user can monitor their validator performance, rewards, and penalties through the NFT.
BlockscapeETHStakeNFT - an NFT issued to a user who stakes any amount of ETH. This NFT entitles the user to participate in a pool of stakers that are staking for them on the Blockscape platform.
Privileged roles
The owner of the BlockscapeValidatorNFT contract can arbitrarily withdraw funds, stop the staking period, update the validator for a given token ID, set a withdrawal fee and change limits.
The owner of the BlockscapeETHStakeNFT contract can withdraw funds or change the withdrawal fee at any time.
Executive Summary
Documentation quality
The total Documentation quality score is 6 out of 10.
Functional requirements are actually API descriptions and a Readme file. These can be made more detailed to a non-technical user.
Technical description consists of deployment instructions.
Code is documented with NatSpec.
Running tests requires a lot of extra configuration. Testing should be possible to be executed without providing your own API keys.
Code quality
The total Code quality score is 10 out of 10.
Code follows language style guidelines and best practices.
The development environment is configured.
Test coverage
Code coverage of the project is 59.68% (branch coverage).
Basic user interactions are covered with tests.
Negative cases coverage is missing.
Interactions with several users are not tested thoroughly.
Security score
Upon auditing, the code was found to contain 1 critical, 2 high, 6 medium, and 24 low severity issues. Out of these, 32 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 8. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2023-0305 | Requirements Violation | fixed | Critical | |
| F-2023-0307 | Highly Permissive Role Access | fixed | High | |
| F-2023-0306 | Highly Permissive Role Access | fixed | High | |
| F-2023-0313 | Using transfer() to Send Native Tokens | fixed | Medium | |
| F-2023-0312 | Bad Practice | fixed | Medium | |
| F-2023-0311 | Writing Blank Data | fixed | Medium | |
| F-2023-0310 | Requirements Violation | fixed | Medium | |
| F-2023-0309 | Misleading Documentation | fixed | Medium | |
| F-2023-0308 | Wrong Data Type | fixed | Medium | |
| F-2023-0352 | Storage Abuse | 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/BlockscapeNetwork/rocketscape/tree/main/src→ |
| Commit | 5219b39c6c74a0d3a533a6f06fe589e574744da4 |
| Whitepaper | Not provided |
| Requirements | Provided→ |
| Technical Requirements | Provided→ |