Withdrawing a bridged token from StarkNet to Ethereum or vice versa is not possible without an admin setting the collection addresses, despite a previous audit ([C-02]) claiming the issue was fixed.
The issue marked as [C-02] in the previous audit was claimed to be resolved, but it is not possible to withdraw a bridged token without admin intervention.
if we follow a user that bridge new collection to starknet following steps would happen.
User deposits a collection from Ethereum
The request will include collectionL1
address and collectionL2
as 0. At this point, the _l1ToL2Addresses
and _l2ToL1Addresses
mappings are not updated.
withdraw_auto_from_l1
is called on starknet
On the StarkNet side, since collection_l2
is 0, a new collection will be deployed, and mappings will be filled accordingly.
User deposit bridged tokens to withdraw from starknet to eth
Since starknet collections mappings are already filled request will include correct addresses
User try to withdraw tokens from ethereum
On the Ethereum side, the _verifyRequestAddresses
function will verify the collection addresses. Inside the Solidity contract, if the admin has not set the mappings, they will remain 0. Since mapping and request address doesn't match user cant withdraw .
Test:
This issue also present for starknet to ethereum bridged tokens with similar logic.
This issue prevents users from withdrawing bridged tokens until admin intervention.
manual
Implement different logic to update mappings or remove verification between request addresses and mappings
Likelyhood: High, any collections bridged, without bridge owner action, will be unable to bridge back. Impact: High, L2 -> L1 tokens will be stuck in the bridge. L1 -> L2 will need to ask for a cancellation.
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.