Starknet L2 → L1 messaging still doesn’t have a way to be canceled in the same way that L1 → L2 can be. This precondition combined with the leftover code from the ERC1155
integration will make the L2 → L1 bridged tokens to be permanently stuck.
When tokens are bridged from Starknet there is a single parameter that is left from the temporarily unused ERC1155
functionality: use_withdraw_auto
In normal situations and what the intentions of the Ark team are, it should not matter whether users pass true or false to this argument. But in reality, passing use_withdraw_auto
will lead to a complete loss of the token because Bridge::withdrawTokens
will be reverting when the header is being decoded and verified:
As we can see this change was introduced after the previous audit and due to missing proper mitigation, this will revert with NotSupportedYetError
and as we saw above, since there is no mechanism to cancel failing messages from L2 to L1 tokens will be forever locked.
The root cause of the issue is the missing input validation in deposit_tokens for the current iteration of the protocol.
Loss of funds, due to unvalidated input parameter.
Manual Review
Prevent users from passing use_withdraw_auto
== true
.
Impact: High, token will be stuck in L2 bridge. Likelyhood: Very low, option is available in L2 but has been disabled since March on L1, would be almost a user error.
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.