Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: low
Valid

Fee Type Initialization and Update Discrepancy

Summary

The _initializeFeeTypes function is responsible for setting default fee distributions for various protocol operations. However, an issue has been identified where Fee Type 6 and 7 were not capped at 100% during initialization, while the updateFeeType function enforces strict validation requiring fee distributions to sum to 100% (BASIS_POINTS). This inconsistency forces Fee Type 6 and 7 to be set at 100% when updated, which may not align with their intended design.

Vulnerability Details

  1. Fee Type 6 and 7 Not Capped at 100% in Initialization

    • In _initializeFeeTypes, Fee Type 6 and 7 were set with a total distribution of 2% rather than 100%.

    • This discrepancy does not trigger any validation during contract deployment since _initializeFeeTypes lacks a validation check.

  2. Strict Validation in updateFeeType Enforces a 100% Cap

    • The updateFeeType function enforces that all fee shares must sum to 100%.

    • Since Fee Type 6 and 7 were initialized with a sum of 2%, any attempt to update them forces a change to 100%, which alters the original allocation logic.

  3. Potential Issues

    • The enforced 100% requirement on updates might misalign with the protocol's intended fee distribution for Fee Type 6 and 7.

    • If Fee Type 6 and 7 are meant to represent a fraction of an external fee structure (e.g., 2% of a transaction rather than 100% of an internal allocation), the update function’s strict validation prevents maintaining their proportional structure.

    • This inconsistency can cause confusion for developers and auditors reviewing the contract logic.

Impact

  • Governance will be forced to set Fee Type 6 and 7 at 100% during updates, which may not reflect their intended distribution.

  • Unexpected contract behavior could arise if Fee Type 6 and 7 are adjusted incorrectly due to the enforced 100% validation.

  • The inconsistency between initialization and update logic could lead to governance and operational challenges.

Tools Used

  • Manual code review

Recommendations

Ensure Fee Type 6 and 7 Maintain Their Intended Proportional Allocation

  • Modify _initializeFeeTypes to either set Fee Type 6 and 7 at 100% or establish a separate validation rule for proportionally allocated fees.

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Fee shares for fee type 6 and 7 inside FeeCollector do not total up to the expected 10000 basis points, this leads to update problems, moreover they are 10x the specifications

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!