Introduction
We express our gratitude to the Prospective World team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
PROS NFT collection is a part of Prospective blockchain infrastructure, providing everyone access to a personalized digital future on the Tron Blockchain.
Document | |
|---|---|
| Name | Smart Contract Code Review and Security Analysis Report for Prospective World |
| Audited By | Niccolò Pozzolini, Viktor Lavrenenko |
| Approved By | Ataberk Yavuzer |
| Website | http://prospective.world/→ |
| Changelog | 24/10/2024 - Preliminary Report |
| 06/12/2024 - Final Report | |
| Platform | Tron Network |
| Language | Solidity |
| Tags | ERC721 ; ERC2981 ; Ownable ; Royalties |
| Methodology | https://hackenio.cc/sc_methodology→ |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for Prospective World
- Audited By
- Niccolò Pozzolini, Viktor Lavrenenko
- Approved By
- Ataberk Yavuzer
- Website
- http://prospective.world/→
- Changelog
- 24/10/2024 - Preliminary Report
- 06/12/2024 - Final Report
- Platform
- Tron Network
- Language
- Solidity
- Tags
- ERC721 ; ERC2981 ; Ownable ; Royalties
- Methodology
- https://hackenio.cc/sc_methodology→
Review Scope | |
|---|---|
| Repository | https://github.com/Pros-Venture-Dao/prospective-contracts-review→ |
| Commit | f603104 |
Review Scope
- Commit
- f603104
Audit Summary
The system users should acknowledge all the risks summed up in the risks section of the report
Documentation quality
Functional requirements are partially missed:
Uses cases are partially provided.
Project's features are missing.
Technical description is not provided.
Key functions descriptions are missing for the files in the scope.
Architectural overview is missing.
Roles and authorization are missing.
No information on used technologies provided.
Code quality
The development environment is not properly configured, client's instructions are insufficient to make it run.
Test coverage
Code coverage of the project is 16.25% (branch coverage),
System Overview
Prospective World is a project with the following contracts:
ProsNft.sol— an ownable ERC-721 collection divided in 6 tiers that supports royalties and additional minting.
It has the following attributes:
Name: Passed as a constructor parameter and cannot be validated before deployment.
Symbol: Passed as a constructor parameter and cannot be validated before deployment.
Total supply: 150.000 tokens.
VerifySignature.sol — a contract containing functionality for signature verifications.
TIP712TronHelper.sol - a contract responsible for the implementation of the TIP712 helper methods.
Privileged roles
The owner of the
ProsNft.solcan:mint additional NFTs via
adminMintPros()function.set a signer address via
setSigningAddress()function.change the address of the
prosTokenviachangeProsAddress()function.call the pausing functionality via
flipPause()function.withdraw the prosTokens via
withdraw()function.transfer the contract's ownership via the
transferOwnership()function.
Potential Risks
The project is partially centralized, introducing single points of failure and control. This centralization can lead to vulnerabilities in decision-making and operational processes, making the system more susceptible to targeted attacks or manipulation. The administrator is able to arbitrarily mint tokens, and update the royalty percentage of users' tokens.
The digital contract architecture relies on administrative keys for critical operations. Centralized control over these keys presents a significant security risk, as compromise or misuse can lead to unauthorized actions or loss of funds. It is recommended to use a multi-signature wallet.
The project contains a broken development environment posing significant risks to the project's stability, security, and overall reliability.
The functionality and security of system contracts may rely on external off-chain systems or processes that are not covered by this audit. This creates a risk that these off-chain dependencies could fail, be manipulated, or behave unexpectedly, potentially leading to unintended behavior of the system.
The development team is planning to use the PROS token, (which is out of scope of this audit, thus cannot be audited), as the only payment token for the system. If the PROS token will be replaced with other tokens including fee-on-transfer as well as deflationary tokens, it can lead to the unexpected behavior of the system.
The ProsNft contract contains the pausable functionality, which means that the contract owner can pause the mintPros() and reserve() functions at any moment.
Commits Containing Additional Code in the Remediation Stage: During the remediation phase of this audit, code that was not directly related to the fixes was introduced. This poses a risk of new vulnerabilities emerging from the additional code, which was not reviewed by Hacken's team. To ensure that no security issues are overlooked in these commits, we recommend conducting a re-audit.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2024-6703 | Problematic Triple Loop in NFT Minting Process | fixed | High | |
| F-2024-6691 | Function internalMint Vulnerable to Parameter Manipulation | fixed | High | |
| F-2024-6690 | Signature Malleability and Insufficient Signature Validation | fixed | High | |
| F-2024-6722 | Redundant Use of preventReentrancy Modifier | fixed | High | |
| F-2024-6702 | Supply Check Bypass in internalMint Function | fixed | Medium | |
| F-2024-6717 | Compilation Errors | fixed | Low | |
| F-2024-6707 | Insufficient Validation of Royalty Percentage in internalMint Function | fixed | Low | |
| F-2024-6713 | Presence of Unused flipPause() Function And Unfinished Pausing Functionality | fixed | Observation | |
| F-2024-6712 | Custom errors are more gas-efficient | fixed | Observation | |
| F-2024-6711 | Missing Zero Address Validation | fixed | 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 | |
|---|---|
| Repository | https://github.com/Pros-Venture-Dao/prospective-contracts-review→ |
| Commit | f603104ef9fa4118953e1f71889ec9c8fe9ffc4d |
| Whitepaper | https://prospective.gitbook.io/prospective-docs/pros-venture-overview/white-paper→ |
| Requirements | https://prospective.gitbook.io/prospective-docs→ |
| Technical Requirements | N/A |
Scope Details
- Commit
- f603104ef9fa4118953e1f71889ec9c8fe9ffc4d
- Requirements
- https://prospective.gitbook.io/prospective-docs→
- Technical Requirements
- N/A