The use_deposit_burn_auto
parameter is passed from the Starknet bridge to the Ethereum bridge, but it is not utilized in the Ethereum bridge's Solidity code. If this parameter is not used, it should be removed to avoid confusion. Additionally, if there are plans to implement an auto burn feature, it should include a check to ensure that only synthetic tokens are burned and not native ones to prevent the permanent loss of NFTs.
The use_deposit_burn_auto
parameter is passed from the Starknet bridge to the Ethereum bridge, where it is intended to control whether automatic burning of tokens should occur. However, the current Solidity implementation of the Ethereum bridge ignores the useAutoBurn
parameter, rendering the use_deposit_burn_auto
parameter redundant. This can lead to confusion for developers and users, as the parameter's purpose is not reflected in the Solidity code. Additionally, if an auto burn feature is to be implemented in the future, there is a risk of burning native tokens, which could lead to irreversible loss of NFTs if not properly checked.
Redundant Parameter: The presence of an unused parameter creates confusion and potential misconfiguration, as developers may expect it to have an effect based on its presence.
Potential for Token Loss: If auto burn functionality is implemented without appropriate checks, native tokens could be mistakenly burned, leading to a permanent loss of NFTs.
Increased Complexity: Unused parameters add unnecessary complexity to the code, making it harder to maintain and understand.
Remove Unused Parameter: If the use_deposit_burn_auto
parameter is not intended to be used in the Ethereum bridge, remove it from the code to reduce confusion and simplify the contract.
Implement Auto Burn Safeguards: If implementing an auto burn feature, ensure that it includes checks to differentiate between synthetic and native tokens. This will prevent the accidental burning of native tokens.
Review Parameter Usage: Review the entire codebase to ensure that any parameters passed between the Starknet and Ethereum bridges are properly utilized. Ensure that there is no ambiguity regarding their purpose and effect.
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.