20,000 USDC
View results
Submission Details
Severity: gas

[I-13] Event is missing `indexed` fields

Summary

Index event fields make the field more quickly accessible to off-chain tools that parse events. However, note that each index field costs extra gas during emission, so it's not necessarily best to index the maximum allowed per event (three fields). Each event should use three indexed fields if there are three or more fields, and gas usage is not particularly of concern for the events in question. If there are fewer than three fields, all of the fields should be indexed.

Vulnerability Details

Instances (9):

File: src/Lender.sol
11: event PoolCreated(bytes32 indexed poolId, Pool pool);
12: event PoolUpdated(bytes32 indexed poolId, Pool pool);
13: event PoolBalanceUpdated(bytes32 indexed poolId, uint256 newBalance);
14: event PoolInterestRateUpdated(
18: event PoolMaxLoanRatioUpdated(
49: event LoanBought(uint256 loanId);
56: event Refinanced(uint256 loanId);
File: src/interfaces/IERC20.sol
5: event Transfer(address indexed from, address indexed to, uint256 value);
6: event Approval(address indexed owner, address indexed spender, uint256 value);

Impact

Tools Used

Recommendations

Support

FAQs

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