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.
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
This issue does not pose a direct security risk but can contribute to inefficiencies in the contract’s logic and additional gas cost
Manual code review
Remove the redundant logic to simplify the code.
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.