The Starklane contract on Ethereum (L1) lacks proper validation of transaction fees (msg.value) when initiating messages to Starknet (L2). This oversight can result in message transmission failures due to inadequate gas allocation.
Function: depositTokens
File: Bridge.sol
The depositTokens function forwards the entire msg.value to the Starknet messaging contract without validating its sufficiency:
According to Starknet documentation, a minimum of 20,000 wei is required to cover the gas costs associated with storing the message hash on L1.
Message Failure: Transactions with insufficient fees may fail to properly transmit messages to L2.
Stuck Assets: NFTs could become temporarily locked in the bridge contract if associated messages fail to process.
User Experience: Users may need to initiate cancellation procedures after a 7-day waiting period to recover from failed transfers.
Increased Operational Overhead: The bridge operators may face an increased volume of support requests related to stuck transfers.
Severity: Medium
Likelihood: Medium (due to potential user error in fee estimation)
Initiate a depositTokens transaction with msg.value < 20,000 wei.
Observe that the transaction completes on L1 but fails to properly transmit to L2.
Implement a fee validation check in the depositTokens function:
From starknet documentation, https://docs.starknet.io/architecture-and-concepts/network-architecture/messaging-mechanism/#hashing_l2-l1 :
Impact: Medium/High. Need an admin to start a cancellation and wait for 5 days once done. DoS > 5 days. Likelyhood: Low. Everytime a wallet/or a user do not send enough gas
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.