20,000 USDC
View results
Submission Details
Severity: gas

Events are missing sender information

Summary

Events are missing sender information

Vulnerability Details

When an action is triggered based on a user's action,
not being able to filter based on who triggered the
action makes event processing a lot more cumbersome.
Including the msg.sender the events of these types
of action will make events much more useful to end users,
especially when msg.sender is not tx.origin.

File: src/Lender.sol
165: emit PoolBalanceUpdated(poolId, p.poolBalance);
169: emit PoolCreated(poolId, p);
172: emit PoolUpdated(poolId, p);
214: emit PoolMaxLoanRatioUpdated(poolId, maxLoanRatio);
225: emit PoolInterestRateUpdated(poolId, interestRate);
405: emit Repaid(
422: emit Borrowed(
449: emit AuctionStart(
507: emit Repaid(
533: emit LoanBought(loanId);
577: emit LoanSiezed(
708: emit Refinanced(loanId);
734: emit PoolBalanceUpdated(poolId, newBalance);

Link to code - https://github.com/Cyfrin/2023-07-beedle/tree/main/src/Lender.sol

Tools Used

Code Review

Recommendations

Add sender information to the events

Auditor

NeoCrao

Support

FAQs

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