Some functions contain loops that iterate over arrays without explicit bounds or limits. If the arrays become too large, these loops may consume excessive gas, causing transactions to fail due to reaching the block gas limit.
In CommunityVCS:
If _numVaults is large, the loop may exceed the gas limit. Similar issues may arise in functions that process large arrays.
Transaction Failures: Users may experience failed transactions due to gas exhaustion.
Denial of Service: Critical functions may become unusable if they cannot be executed within the gas limit.
Manual code review.
Implement Loop Limits:
Set reasonable maximum values for loop iterations.
For example, limit _numVaults to a safe number.
Batch Processing:
Allow operations to be performed in batches, so users can process a manageable number of items per transaction.
Off-Chain Computation:
Where possible, perform computations off-chain and provide the results on-chain for verification.
User Guidance:
Document any limitations and provide guidance to users to prevent issues.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.