20,000 USDC
View results
Submission Details
Severity: gas

Emitting an event inside a loop performs a LOG op N times, where N is the loop length.

Summary

Emitting an event inside a loop performs a LOG op N times, where N is the loop length. Consider refactoring the code to emit the event only once at the end of the loop. Gas savings should be multiplied by the average loop length.

Vulnerability Details

Consider refactoring the code to emit the event only once at the end of the loop.

Impact

Gas savings should be multiplied by the average loop length.

Tools Used

manually

Recommendations

Consider refactoring the code to emit the event only once at the end of loop. Gas savings should be multiplied by the average loop length.

Support

FAQs

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