Liquid Staking

Stakelink
DeFiHardhatOracle
50,000 USDC
View results
Submission Details
Severity: high
Invalid

High Volume of claimRewards leads to DOS attack

Summary

The issue occurs in the claimRewards function of the CommunityVCS.sol contract, particularly at line 65. The concern is that the function, when claiming a large amount of rewards from multiple vaults, could lead to a Denial of Service (DoS). This would happen if the claim process requires excessive computation or gas, leading to transaction failures or making it impractical to execute. Without regulating the amount of rewards or managing the number of vaults processed in a single transaction, users might face issues when interacting with the contract, as gas costs increase proportionally with the number of vaults and rewards being processed.

Impact

High Gas Costs:
Even if the transaction succeeds, the gas fees could be excessively high, making it economically impractical for users to claim their rewards. This would result in inefficient use of the Ethereum network or any other blockchain system with gas-based transaction costs.

Degraded User Experience:
Users might face difficulties in interacting with the platform, experiencing failed transactions or delays when claiming their rewards. This could reduce user trust in the system and potentially harm the platform’s reputation.

Recommendations

  1. Limit the Number of Vaults in a Single Claim:
    Implement a cap on the number of vaults that can be claimed in a single transaction. This ensures that the function will not attempt to process too many vaults at once, thereby keeping gas costs within reasonable limits.
    Example: Introduce a parameter like _maxVaultsPerClaim, which limits the maximum number of vaults processed in one transaction, and require users to call the function multiple times to claim rewards from a large number of vaults.

  2. Batch Processing:
    Instead of processing all vaults in a single loop, divide the claiming process into batches. Users can claim rewards incrementally, ensuring the gas cost remains manageable while preventing transaction failures due to excessive gas usage.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!