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

Lack of Event Emission in setStarklaneL2Address Function

Summary

The setStarklaneL2Address function allows the contract owner to set the _starklaneL2Address variable, which is presumably critical for the contract's functionality. However, the function does not emit an event when this address is set, reducing the transparency and traceability of this important operation.

Vulnerability Details

The setStarklaneL2Address function modifies the _starklaneL2Address state variable without emitting an event. In smart contracts, events serve as an important logging mechanism that allows off-chain systems and users to track changes in contract state. Without an event, changes to _starklaneL2Address are not easily detectable by external observers, which can lead to a lack of visibility into key contract operations.

Impact

Transparency: The lack of an event reduces the transparency of changes to the _starklaneL2Address, making it difficult for external systems and stakeholders to track and verify when this critical address is updated.

Off-Chain Monitoring: Off-chain services and monitoring tools that rely on events to detect changes in contract state will miss updates to the _starklaneL2Address, potentially leading to incorrect or outdated information being used in decision-making processes.

Tools Used

Manual Code Review: The issue was identified through a manual review of the smart contract code, focusing on the presence or absence of event emissions for key state changes.

Recommendations

To enhance transparency and enable effective off-chain monitoring, it is recommended to emit an event whenever the _starklaneL2Address is updated. This event should include the new address to allow external observers to track the change.

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.