Core Contracts

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

Fee Collection Griefing Attack Vector

Summary

The collectFee function in the FeeCollector contract allows anyone to send fees without a minimum amount requirement, enabling a griefing attack where an attacker fragments fee collections into numerous small transactions. This increases gas costs and computational complexity for reward distributions, potentially rendering the distributeCollectedFees function prohibitively expensive or unusable. This fully valid medium-impact, medium-likelihood vulnerability could disrupt protocol revenue distribution.

Vulnerability Details

The collectFee function permits unrestricted fee submissions with no lower bound beyond zero:

Any address can call collectFee with amounts between 1 wei and MAX_FEE_AMOUNT (1M RAAC).
Each call updates the collectedFees struct, tracked separately by feeType, adding accounting entries.
Attack Scenario:
Attacker observes a pending 100,000 RAAC fee distribution.
Repeatedly calls collectFee with 1 wei for various feeType values (e.g., 0-7).
Each call increments collectedFees fields (e.g., protocolFees, lendingFees), increasing the number of non-zero entries processed in _calculateDistribution and _processDistributions.
Gas costs for distributeCollectedFees rise due to iterating over fragmented fees, potentially exceeding block gas limits (e.g., 30M), blocking the $100,000 RAAC distribution.
No minimum amount or rate limiting prevents this, making fragmentation feasible.

Impact

The disruption of fee distributions, blocking $100,000 or more in protocol revenue, constitutes a medium-impact issue, as it affects operational efficiency and stakeholder payouts without direct fund loss. The medium likelihood reflects the ease of execution by any party with minimal RAAC (e.g., 1 wei per call), a plausible griefing tactic in a public system, especially targeting high-value distributions.

Tools Used

Static Analysis Tools: Slither identified the unrestricted collectFee entry point and lack of minimum amount checks, flagging potential DoS vectors.

Recommendations

Add a minimum fee amount and batch collection mechanism to prevent fragmentation:

Updates

Lead Judging Commences

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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

Give us feedback!