20,000 USDC
View results
Submission Details
Severity: low
Valid

No event emitted for critical changes

Summary

Missing Event Emission for Critical Changes in Lender.sol

Vulnerability Details

The contract Lender.sol has critical changes in the code at line 84 & 92, but it lacks an event emission to notify off-chain monitors about the changes.
Affected functions:

function setLenderFee(uint256 _fee) external onlyOwner {
if (_fee > 5000) revert FeeTooHigh();
// @audit-issue critical change should emit an event for offchain monitor
lenderFee = _fee;
}
function setBorrowerFee(uint256 _fee) external onlyOwner {
if (_fee > 500) revert FeeTooHigh();
// @audit-issue critical change should emit an event for offchain monitor
borrowerFee = _fee;
}

Impact

The absence of an event can prevent external systems from being aware of the critical change, potentially leading to a lack of synchronization between on-chain and off-chain data.

Tools Used

Manual Review

Recommendations

The contract should emit an event when making critical changes.

Support

FAQs

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