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

Redundant code logic in `bridge.cairo`

Summary

Redundant code logic exists in the bridge.cairo contract due to a condition that will always evaluate to false. This is a result of a newly deployed l2_addr_from_deploy which has a whitelist mapping set to the zero address.

Vulnerability Details

The following if branch will always execute because the condition line will always be false due to a a newly deployed l2_addr_from_deploy which has a mapping set to Zero Address.

Locations:

  • https://github.com/Cyfrin/2024-07-ark-project/blob/273b7b94986d3914d5ee737c99a59ec8728b1517/apps/blockchain/starknet/src/bridge.cairo#L471-L479

Impact

This issue does not pose a direct security risk but can contribute to inefficiencies in the contract’s logic and additional gas cost

Tools Used

  • Manual code review

Recommendations

  • Remove the redundant logic to simplify the code.

Updates

Lead Judging Commences

n0kto Lead Judge about 1 year 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.

Give us feedback!