Introduction
We express our gratitude to the VOLO team for the collaborative engagement that enabled the execution of this Smart Contract Security Assessment.
Volo is an LSD platform that integrates decentralized Liquid Staking and LSD Vaults on SUI Network.
| title | content |
|---|---|
| Platform | Sui |
| Language | Move |
| Tags | Liquid Staking |
| Timeline | 15/08/2023 - 22/09/2023 |
| Methodology | https://hackenio.cc/sc_methodology→ |
Review Scope | |
|---|---|
| Repository | https://github.com/Ankr-network/stakefi-sui-smart-contract/→ |
| Commit | 6662d76109670a458cde7f739938b203cf183780 |
Review Scope
- Commit
- 6662d76109670a458cde7f739938b203cf183780
Audit Summary
9/10
82.16%
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 VOLO |
| Audited By | Hacken |
| Website | http://volo.fi/→ |
| Changelog | 22/08/2023 - Initial Review |
| 22/09/2023 - Second Review |
Document
- Name
- Smart Contract Code Review and Security Analysis Report for VOLO
- Audited By
- Hacken
- Website
- http://volo.fi/→
- Changelog
- 22/08/2023 - Initial Review
- 22/09/2023 - Second Review
System Overview
The VOLO Liquid Staking is a protocol that allows users to exchange SUI tokens for special voloSUI tokens that could be used in the VOLO Ecosystem and other DeFi protocols partnered with VOLO Protocol.
The SUI tokens are staked using the native suisystem_ module, whose implementation is out of the audit scope.
Stakers are able to request exchanging their voloSUI for SUI with rewards accrued, unstaked funds will be returned in the current or the next epoch.
There are several smart contracts in the audit scope:
ownership — manages owner and operator capabilities.
cert — voloSUI token contract, stores and updates SUI to voloSUI exchange rate.
nativepool — contract allows exchange SUI for voloSUI_ and requests to exchange it back at a possibly better rate.
math — math utility contract.
validatorset_ — a contract that manages validators.
unstaketicket_ — a contract that handles tickets, which serve as proof of unstaking, while waiting to exchange tokens.
Privileged roles
The Owner and Operator are able to transfer their permission independently of each other.
cert:
Owner — Update the contract and migrate the associated objects to it.
ownership:
Owner — Transfer the owner role to another address.
Operator - Transfer operator role to another address.
nativepool_:
Owner - Change min stake amount.
Owner - Change unstake fee threshold (not more than 100%).
Owner - Change base unstake fee (not more than 100%).
Owner - Change base reward fee (not more than 100%).
Owner - Update rewards threshold.
Owner - Can withdraw fees from the contract.
Owner - Can pause or unpause contract. In the paused contract it is not possible for the owner to withdraw fees, sort validators, burn tickets to release unstaking, stake SUI and update rewards.
Owner — Update the contract and migrate the associated objects to it.
Operator — Add new validators with specified priorities.
Operator - Can increase the ratio of reward tokens.
Executive Summary
Documentation quality
The total Documentation quality score is 10 out of 10.
Public documentation provides the system basics.
Internal documentation provides valuable insights into the system architecture and general interaction flow.
The configuration instructions are insufficient.
Code quality
The total Code quality score is 9 out of 10.
The code is well-written and designed.
The code contains unused variables.
Contradiction in variable naming exists.
Test coverage
Code coverage of the project is 82.16%.
Security score
Upon auditing, the code was found to contain 0 critical, 2 high, 1 medium, and 2 low severity issues. Out of these, 3 issues have been addressed and resolved, leading to a Security score of 9 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.5. This score reflects the combined evaluation of documentation, code quality, test coverage, and security aspects of the project.
Risks
Users are unable to withdraw their funds immediately. They burn their voloSUI and register in a queue to get SUI in return.
The smart contracts system is designed to be upgradeable. The owner may change the system logic in the future.
The owner is able to pause all the pool functionality.
The owner may set arbitrary minimum thresholds for stake and unstake amounts.
Findings
Code ― | Title | Status | Severity | |
|---|---|---|---|---|
| F-2023-0404 | Requirements Violation; Data Consistency | fixed | High | |
| F-2023-0403 | Invalid Calculations; Data Consistency | fixed | High | |
| F-2023-0405 | Denial Of Service & Inefficient Gas Model | unfixed | Medium | |
| F-2023-0407 | Missing Event Emit | fixed | Low | |
| F-2023-0406 | Unused Variables/Structs | unfixed | Low | |
| I-2023-0084 | Contradiction | 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/Ankr-network/stakefi-sui-smart-contract/→ |
| Commit | 6662d76109670a458cde7f739938b203cf183780 |
| Whitepaper | Not Provided |
| Requirements | Provided→ |
| Technical Requirements | Provided→ |