Vault Contracts - Aria Protocol


Prepared by:

Halborn Logo

HALBORN

Last Updated 05/27/2025

Date of Engagement: April 28th, 2025 - May 1st, 2025

Summary

100% of all REPORTED Findings have been addressed

All findings

7

Critical

0

High

0

Medium

0

Low

2

Informational

5


1. Introduction

Aria Protocol engaged Halborn to conduct a security assessment on their smart contracts beginning on April 28th, 2025 and ending on May 1st, 2025. The security assessment was scoped to the smart contracts provided to Halborn. Commit hashes and further details can be found in the Scope section of this report.


The Aria Protocol codebase in scope mainly consists of smart contracts for creating and managing intellectual property (IP) vaults that enable the tokenization and fractionalization of IP assets, with support for fundraising and whitelist-based distribution mechanisms.

2. Assessment Summary

Halborn was provided 4 days for the engagement and assigned 1 full-time security engineer to review the security of the smart contracts in scope. The engineer is a blockchain and smart contract security expert with advanced penetration testing and smart contract hacking skills, and deep knowledge of multiple blockchain protocols.


The purpose of the assessment is to:

    • Identify potential security issues within the smart contracts.

    • Ensure that smart contract functionality operates as intended.


In summary, Halborn identified some improvements to reduce the likelihood and impact of risks, which were partially addressed by the Aria Protocol team. The main ones are the following:

    • Add the _checkAndUpdateState() call at the beginning of both claimFractionalTokens() implementations.

    • Consider implementing proper validation of the USDC address.

    • Consider implementing a registry mechanism at the factory level to track and validate token identifiers.


All addressed findings have been consolidated and incorporated into version v1.0.5, available in the following commit: https://github.com/AriaProtocol/main-contracts/tree/83cbf9a4b2b67f54f524a7daae33e7a49efb2860.

3. Test Approach and Methodology

Halborn performed a combination of manual review of the code and automated security testing to balance efficiency, timeliness, practicality, and accuracy in regard to the scope of this assessment. While manual testing is recommended to uncover flaws in logic, process, and implementation; automated testing techniques help enhance coverage of smart contracts and can quickly identify items that do not follow security best practices.

The following phases and associated tools were used throughout the term of the assessment:

    • Research into architecture, purpose and use of the platform.

    • Smart contract manual code review and walkthrough to identify any logic issue.

    • Thorough assessment of safety and usage of critical Solidity variables and functions in scope that could led to arithmetic related vulnerabilities.

    • Local testing with custom scripts (Foundry).

    • Fork testing against main networks (Foundry).

    • Static analysis of security for scoped contract, and imported functions (Slither).


4. Static Analysis Report

4.1 Description

Halborn used automated testing techniques to enhance the coverage of certain areas of the smart contracts in scope. Among the tools used was Slither, a Solidity static analysis framework. After Halborn verified the smart contracts in the repository and was able to compile them correctly into their abis and binary format, Slither was run against the contracts. This tool can statically verify mathematical relationships between Solidity variables to detect invalid or inconsistent usage of the contracts' APIs across the entire code-base.


The security team assessed all findings identified by the Slither software, however, findings with related to external dependencies are not included in the below results for the sake of report readability.

4.2 Output

The findings obtained as a result of the Slither scan were reviewed, and some were not included in the report because they were determined as false positives.



5. RISK METHODOLOGY

Every vulnerability and issue observed by Halborn is ranked based on two sets of Metrics and a Severity Coefficient. This system is inspired by the industry standard Common Vulnerability Scoring System.
The two Metric sets are: Exploitability and Impact. Exploitability captures the ease and technical means by which vulnerabilities can be exploited and Impact describes the consequences of a successful exploit.
The Severity Coefficients is designed to further refine the accuracy of the ranking with two factors: Reversibility and Scope. These capture the impact of the vulnerability on the environment as well as the number of users and smart contracts affected.
The final score is a value between 0-10 rounded up to 1 decimal place and 10 corresponding to the highest security risk. This provides an objective and accurate rating of the severity of security vulnerabilities in smart contracts.
The system is designed to assist in identifying and prioritizing vulnerabilities based on their level of risk to address the most critical issues in a timely manner.

5.1 EXPLOITABILITY

Attack Origin (AO):
Captures whether the attack requires compromising a specific account.
Attack Cost (AC):
Captures the cost of exploiting the vulnerability incurred by the attacker relative to sending a single transaction on the relevant blockchain. Includes but is not limited to financial and computational cost.
Attack Complexity (AX):
Describes the conditions beyond the attacker’s control that must exist in order to exploit the vulnerability. Includes but is not limited to macro situation, available third-party liquidity and regulatory challenges.
Metrics:
EXPLOITABILITY METRIC (mem_e)METRIC VALUENUMERICAL VALUE
Attack Origin (AO)Arbitrary (AO:A)
Specific (AO:S)
1
0.2
Attack Cost (AC)Low (AC:L)
Medium (AC:M)
High (AC:H)
1
0.67
0.33
Attack Complexity (AX)Low (AX:L)
Medium (AX:M)
High (AX:H)
1
0.67
0.33
Exploitability EE is calculated using the following formula:

E=meE = \prod m_e

5.2 IMPACT

Confidentiality (C):
Measures the impact to the confidentiality of the information resources managed by the contract due to a successfully exploited vulnerability. Confidentiality refers to limiting access to authorized users only.
Integrity (I):
Measures the impact to integrity of a successfully exploited vulnerability. Integrity refers to the trustworthiness and veracity of data stored and/or processed on-chain. Integrity impact directly affecting Deposit or Yield records is excluded.
Availability (A):
Measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability. This metric refers to smart contract features and functionality, not state. Availability impact directly affecting Deposit or Yield is excluded.
Deposit (D):
Measures the impact to the deposits made to the contract by either users or owners.
Yield (Y):
Measures the impact to the yield generated by the contract for either users or owners.
Metrics:
IMPACT METRIC (mIm_I)METRIC VALUENUMERICAL VALUE
Confidentiality (C)None (I:N)
Low (I:L)
Medium (I:M)
High (I:H)
Critical (I:C)
0
0.25
0.5
0.75
1
Integrity (I)None (I:N)
Low (I:L)
Medium (I:M)
High (I:H)
Critical (I:C)
0
0.25
0.5
0.75
1
Availability (A)None (A:N)
Low (A:L)
Medium (A:M)
High (A:H)
Critical (A:C)
0
0.25
0.5
0.75
1
Deposit (D)None (D:N)
Low (D:L)
Medium (D:M)
High (D:H)
Critical (D:C)
0
0.25
0.5
0.75
1
Yield (Y)None (Y:N)
Low (Y:L)
Medium (Y:M)
High (Y:H)
Critical (Y:C)
0
0.25
0.5
0.75
1
Impact II is calculated using the following formula:

I=max(mI)+mImax(mI)4I = max(m_I) + \frac{\sum{m_I} - max(m_I)}{4}

5.3 SEVERITY COEFFICIENT

Reversibility (R):
Describes the share of the exploited vulnerability effects that can be reversed. For upgradeable contracts, assume the contract private key is available.
Scope (S):
Captures whether a vulnerability in one vulnerable contract impacts resources in other contracts.
Metrics:
SEVERITY COEFFICIENT (CC)COEFFICIENT VALUENUMERICAL VALUE
Reversibility (rr)None (R:N)
Partial (R:P)
Full (R:F)
1
0.5
0.25
Scope (ss)Changed (S:C)
Unchanged (S:U)
1.25
1
Severity Coefficient CC is obtained by the following product:

C=rsC = rs

The Vulnerability Severity Score SS is obtained by:

S=min(10,EIC10)S = min(10, EIC * 10)

The score is rounded up to 1 decimal places.
SeverityScore Value Range
Critical9 - 10
High7 - 8.9
Medium4.5 - 6.9
Low2 - 4.4
Informational0 - 1.9

6. SCOPE

Files and Repository
(a) Repository: main-contracts
(b) Assessed Commit ID: 6dd92de
(c) Items in scope:
  • contracts/rwip/vault/admin/VaultAdmin.sol
  • contracts/rwip/vault/admin/children/VaultFundraiseAdmin.sol
  • contracts/rwip/vault/admin/children/VaultAssetRegistryAdmin.sol
↓ Expand ↓
Out-of-Scope: Third party dependencies and economic attacks.
Remediation Commit ID:
Out-of-Scope: New features/implementations after the remediation commit IDs.

7. Assessment Summary & Findings Overview

Critical

0

High

0

Medium

0

Low

2

Informational

5

Security analysisRisk levelRemediation Date
Missing state validation in claimFractionalTokens() functionLowSolved - 05/12/2025
Missing USDC address validation in fundraise initializationLowRisk Accepted - 05/12/2025
Lack of uniqueness validation for token identifiers across vaultsInformationalAcknowledged - 05/12/2025
Contract size too big for deploymentInformationalSolved - 05/12/2025
Suboptimal modifier orderingInformationalAcknowledged - 05/12/2025
Floating pragmaInformationalSolved - 05/12/2025
Unused importInformationalSolved - 05/12/2025

8. Findings & Tech Details

8.1 Missing state validation in claimFractionalTokens() function

//

Low

Description

The claimFractionalTokens() function in AriaIPVault does not call the _checkAndUpdateState() function before processing claims. This function is responsible for checking if the vault's expiration time has passed and updating the vault state from Open to Closed accordingly.


Other key functions such as deposit(), withdraw(), and registerIPAndFractionalize() correctly call this state validation function, but both implementations of claimFractionalTokens() (with and without Merkle proof) omit this check.


If no contract interaction has occurred after the vault has expired, the vault state will remain incorrectly set to Open even though it should be Closed. When users attempt to claim their fractional tokens, the function will revert with AriaIPVault__VaultNotClosed error because _checkFundraise() requires the vault state to be Closed.


This creates a situation where users can't claim their tokens after expiration until someone triggers a state update by calling another function that includes the _checkAndUpdateState() call. In extreme cases, if no other functions are called, users might be permanently unable to claim their tokens without protocol intervention.

BVSS
Recommendation

Add the _checkAndUpdateState() call at the beginning of both claimFractionalTokens() implementations.

Remediation Comment

SOLVED: The Aria Protocol team solved this finding in commit 3f52841 by following the mentioned recommendation.

Remediation Hash
References

8.2 Missing USDC address validation in fundraise initialization

//

Low

Description

The _initializeFundraise() function only validates that the usdcContractAddress is not the zero address, without verifying that it actually points to the legitimate USDC token. This allows vault deployers to specify any ERC20 token as the "USDC" contract for fundraising.


Without proper validation, vault deployers can create fundraising vaults that use alternative tokens while still labeling them as "USDC" within the protocol's context.

BVSS
Recommendation

Consider implementing proper validation of the USDC address using one of these approaches. This could be done by:


  1. Using hardcoded official USDC addresses for each supported chain.



  2. Creating an admin-controlled registry of approved stablecoins if the protocol intends to support multiple tokens.


This would ensure that vaults labeled as using USDC are actually using the legitimate token, increasing transparency and reducing the potential for confusion.

Remediation Comment

RISK ACCEPTED: The Aria Protocol team made a business decision to accept the risk of this finding and not alter the contracts.

References

8.3 Lack of uniqueness validation for token identifiers across vaults

//

Informational

Description

The AriaIPVaultFactory contract allows the creation of multiple vaults with identical token details (name, symbol) without any uniqueness validation. The factory deploys vaults through its deployFundraiseIpVault() and deployWhitelistIpVault() functions, passing token details directly without checking for duplicates.


When these details are stored in the AriaIPVaultStorage.VaultLayout struct, no mechanism exists to prevent or warn about duplicate identifiers.


This lack of uniqueness validation could lead to:


  1. Market confusion - Multiple fractional tokens with identical names/symbols but different contract addresses.



  2. Trading issues - Exchanges and aggregators typically rely on unique symbols for token identification.



  3. User interface problems - Wallet applications may not properly distinguish between identically-named tokens.



  4. Integration challenges - Third-party integrations could incorrectly identify or group tokens.


While this doesn't directly compromise security, it creates a poor user experience and increases the risk of user errors when interacting with these tokens.

BVSS
Recommendation

Implement a registry mechanism at the factory level to track and validate token identifiers. This could be achieved by:


  1. Maintaining a record of used token names and symbols in the factory contract.

  2. Validating new token details against this registry during vault deployment.

  3. Rejecting duplicate submissions or requiring admin override for exceptional cases.


Alternatively, enforce a naming convention system that ensures uniqueness, such as incorporating vault identifiers or sequential numbers into token names and symbols.

Remediation Comment

ACKNOWLEDGED: The Aria Protocol team made a business decision to acknowledge this finding and not alter the contracts.

References

8.4 Contract size too big for deployment

//

Informational

Description

The AriaIPVault contract has a large code size of 25,557 bytes with the current configuration, which exceeds the maximum limit of 24,576 bytes.






This could lead to potential deployment issues and limitations for new features.

BVSS
Recommendation

Consider using Solidity's compiler optimization settings with low values to reduce the contract's code size and allow for deployment.


Additionally, review the contract's functionality to identify areas where code refactoring or optimization can be applied to reduce the overall code size.

Remediation Comment

SOLVED: The Aria Protocol team solved this finding in commit 8e26a62 by following the mentioned recommendation.

Remediation Hash
References

8.5 Suboptimal modifier ordering

//

Informational

Description

Some functions of the contracts in scope have multiple modifiers, with one of them being nonReentrant which prevents reentrancy behavior on the functions. Ideally, the nonReentrant modifier should be the first one to prevent even the execution of other modifiers in case of reentrancy behavior.


In Solidity, if a function has multiple modifiers, they are executed in the order specified. If checks or logic of modifiers depend on other modifiers, this has to be considered in their ordering.


While there is currently no obvious vulnerability with nonReentrant not being the first modifier, placing it first ensures that all other modifiers are executed only if the call is non-reentrant. This is a safer practice and can prevent potential issues in future updates or unforeseen scenarios.

BVSS
Recommendation

Switch modifier order to consistently place the nonReentrant modifier as the first one to run so that all other modifiers are executed only if the call is non-reentrant.

Remediation Comment

ACKNOWLEDGED: The Aria Protocol team made a business decision to acknowledge this finding and not alter the contracts.

References

8.6 Floating pragma

//

Informational

Description

The VaultWhitelistAdmin contract currently uses floating pragma versions ^0.8.23 which means that the code can be compiled by any compiler version that is greater than or equal to 0.8.23, and less than 0.9.0, while other contract in scope have their compiler fixed to version 0.8.26.


Additionally, from Solidity versions 0.8.20 through 0.8.24, the default target EVM version is set to Shanghai, which results in the generation of bytecode that includes PUSH0 opcodes. Starting with version 0.8.25, the default EVM version shifts to Cancun, introducing new opcodes for transient storage, TSTORE and TLOAD.


In this aspect, it is crucial to select the appropriate EVM version when it's intended to deploy the contracts on networks other than the Ethereum mainnet, which may not support these opcodes. Failure to do so could lead to unsuccessful contract deployments or transaction execution issues.

BVSS
Recommendation

Lock the pragma version to the same version used during development and testing and make sure to specify the target EVM version when using Solidity versions from 0.8.20 and above if deploying to chains that may not support newly introduced opcodes.


Additionally, it is crucial to stay informed about the opcode support of different chains to ensure smooth deployment and compatibility.

Remediation Comment

SOLVED: The Aria Protocol team solved this finding in commit e1bd26c by following the mentioned recommendation.

Remediation Hash
References

8.7 Unused import

//

Informational

Description

In the VaultAssetRegistryAdmin contract, there is an import that is not used within the contract and that can be removed to improve code readability and maintainability:

import {IAriaIPDistributionContract} from "contracts/rwip/staking/IAriaIPDistributionContract.sol";

BVSS
Recommendation

Remove the unused import from the contract.

Remediation Comment

SOLVED: The Aria Protocol team solved this finding in commit ef0dff4 by following the mentioned recommendation.

Remediation Hash
References

Halborn strongly recommends conducting a follow-up assessment of the project either within six months or immediately following any material changes to the codebase, whichever comes first. This approach is crucial for maintaining the project’s integrity and addressing potential vulnerabilities introduced by code modifications.

© Halborn 2025. All rights reserved.