DittoETH

Ditto
DeFiFoundryOracle
55,000 USDC
View results
Submission Details
Severity: medium
Invalid

Potential Out-of-Gas Errors Due to Unbounded Loops in _distributeYield Function

Summary

Potential Out-of-Gas Errors Due to Unbounded Loops in _distributeYield Function

Vulnerability Details

The _distributeYield function systematically processes each short record associated with a specific asset.In this contract, it's also important to note that the loop is not only dependent on the number of short records but also on the condition of each short record. If a short record is cancelled or recently modified, it is skipped, which could potentially reduce the gas cost.

Impact

it can potentially cause transactions to fail due to out-of-gas errors if the number of short records is very large. This can disrupt the normal operation of the contract and cause inconvenience to users.

Tools Used

Manual

Recommendations

To mitigate this, developers often implement a mechanism to limit the number of iterations per transaction, or they provide a way to perform the operation in multiple transactions

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Out of Gas

Support

FAQs

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