DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Lack of event emission for critical state changes

Summary

Lack of event emission for critical state changes.

Vulnerability Details

function setOwner(address _newOwner) external onlyOwner {
if (_newOwner == address(0)) revert InvalidZeroAddress();
owner = _newOwner;
}
function setRewardAdmin(address _rewardAdmin) external onlyOwner {
if (_rewardAdmin == address(0)) revert InvalidZeroAddress();
rewardAdmin = _rewardAdmin;
}
function addAuthorizedSablierSender(address _address) external onlyOwner {
authorizedSablierSenders[_address] = true;
}

https://github.com/Cyfrin/2024-08-fjord/blob/0312fa9dca29fa7ed9fc432fdcd05545b736575d/src/FjordStaking.sol#L347C5-L359C6

In the provided functions setOwner, setRewardAdmin, and addAuthorizedSablierSender, there are no events emitted when critical state changes occur. This omission significantly reduces the contract's transparency and makes it difficult for external systems or users to track important changes in the contract's state.

Impact

Without events, it becomes challenging to track changes in ownership, reward administration, and authorized senders off-chain.

Tools Used

Manual review

Recommendations

Implement event emissions for each of these critical state changes.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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