15,000 USDC
View results
Submission Details
Severity: gas

Excessive indexing in CollateralDeposited event

Summary

Current CollateralDeposited event indexed for all argument.
It is highly unlikely and against best practice to index amount. There are enormous possibilities for amount and most of them will be presented once.

event CollateralDeposited(address indexed user, address indexed token, uint256 indexed amount);

Impact

Additional 215 (375 for indexed parameter - 160 for unindexed parameter) gas used every event emit.

Tools Used

Observation

Recommendations

Change code to:

event CollateralDeposited(address indexed user, address indexed token, uint256 amount);

Support

FAQs

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