NFTBridge
60,000 USDC
View results
Submission Details
Severity: low
Invalid

Missing Event Emission in `enableBridge()` of `Bridge.sol`

Summary

The enableBridge function in the smart contract lacks an event emission when the bridge's enabled status is changed. This omission reduces transparency and makes it difficult for external systems and users to track critical state changes in the bridge's operational status.

Vulnerability Details

The vulnerability is present in the enableBridge function:

function enableBridge(bool enable) external onlyOwner {
_enabled = enable;
}

This function changes the operational status of the bridge but fails to emit an event to notify users and external systems of this critical state change.

Impact

Users and external systems have no on-chain way to track when the bridge is enabled or disabled.

Tools Used

Manual review

Recommendations

Implement an event emission in the enableBridge function:

// Define the event
event BridgeStatusChanged(bool enabled);
function enableBridge(bool enable) external onlyOwner {
_enabled = enable;
emit BridgeStatusChanged(enable);
}
Updates

Lead Judging Commences

n0kto Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational / Gas

Please, do not suppose impacts, think about the real impact of the bug and check the CodeHawks documentation to confirm: https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity A PoC always helps to understand the real impact possible.

Support

FAQs

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