#45405 [SC-Insight] Insufficient Documentation for Governance-Controlled Functions and Critical Parameters in 'CoreVaultManager.sol'

Submitted on May 14th 2025 at 00:34:54 UTC by @rusalka711 for Audit Comp | Flare | FAssets

  • Report ID: #45405

  • Report Type: Smart Contract

  • Report severity: Insight

  • Target: https://github.com/flare-labs-ltd/fassets/blob/main/docs/ImmunefiScope.md

  • Impacts:

Description

Brief/Intro

Governance functions like updateSettings, addPreimageHashes, and account management utilities lack explanations for parameter constraints, role definitions, and system dependencies. Missing context increases the risk of misconfiguration during governance actions, potentially destabilizing escrow mechanics or access control.

Vulnerability Details

Affected Components:

  1. addTriggeringAccounts/removeTriggeringAccounts:

    • No definition of "triggering accounts" or their privileges.

    • Example:

      function addTriggeringAccounts(address[] calldata _triggeringAccounts)  
      // What permissions do these accounts have? How do they interact with `triggerInstructions`?  
  2. updateCustodianAddress:

    • Undocumented impact of custodian changes on escrow lifecycle.

      function updateCustodianAddress(string calldata _custodianAddress)  
      // How does this affect existing escrows or payment instructions?  
  3. updateSettings:

    • Lack of rationale for constraints (e.g., _escrowEndTimeSeconds < 1 days).

    • No explanation of parameter interplay:

      require(_escrowEndTimeSeconds < 1 days, "invalid end time");  
      // Why enforce <1 day? How does this align with UTC cycles?  
  4. addPreimageHashes:

    • Missing context on preimage hash lifecycle (e.g., usage in escrows, redemption).

      require(_preimageHashes[i] != bytes32(0), "invalid preimage hash");  
      // What is a preimage hash? How is it generated/used?  

Impact Details

Category: Insight - Documentation Improvements

Impact Analysis:

  • No Direct Exploit: Functions operate as intended.

  • Operational Risks:

    • Incorrect escrow configurations due to misunderstood time parameters.

    • Invalid preimage hashes disrupting redemption workflows.

    • Privilege escalation if triggering accounts are misconfigured.

References

  • Code File: CoreVaultManager.sol (link: https://github.com/flare-labs-ltd/fassets/blob/main/contracts/assetManager/implementation/CoreVaultManager.sol)

  • Key Functions:

    • updateSettings (Lines 504-520).

    • addPreimageHashes (Lines 527-538).

    • Role management functions (Lines 449-460, 467-478 and 485-494).

Proof of Concept

Proof of Concept

1. updateSettings Function

Improved Documentation:


2. addTriggeringAccounts and removeTriggeringAccounts

Improved Documentation:


3. addPreimageHashes Function

Improved Documentation:


4. updateCustodianAddress Function

Improved Documentation:


5. addTriggeringAccounts Function

Improved Documentation:


6. removeTriggeringAccounts Function

Improved Documentation:

Was this helpful?