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

Lack of Event Emission in enableBridge Function

Summary

The enableBridge function in the smart contract allows the contract owner to enable or disable a specific feature by setting the _enabled state variable. However, the function does not emit an event when this change occurs, which can lead to transparency issues and hinder off-chain monitoring.

Vulnerability Details

The enableBridge function allows the contract owner to change the state of the _enabled variable without emitting an event. In smart contracts, events are critical for logging state changes that off-chain services, such as user interfaces or monitoring systems, rely on to track contract behavior. Without an event, there is no easy way for external systems to be notified of the change, which can lead to confusion or missed updates.

Impact

Transparency: The lack of event emission reduces the transparency of the contract's state changes, making it difficult for users and external systems to track when the bridge is enabled or disabled.

Off-Chain Monitoring: Off-chain services that rely on event logs to monitor contract activity will not be able to detect changes in the _enabled state, potentially leading to incorrect assumptions or missed actions.

Tools Used

Manual Code Review: The absence of event emission was identified through a manual review of the smart contract's code.

Recommendations

To improve transparency and enable effective off-chain monitoring, it is recommended to emit an event whenever the _enabled state is changed. This can be done by defining an event and emitting it within the enableBridge function.

Updates

Lead Judging Commences

n0kto Lead Judge 11 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.