If the recipient address is blacklisted by the collectionL1
or collectionL2
contract, the NFT
will be permanently locked in the bridge contract.
Let's take L2->L1
as an example:
The user calls the bridge.cairo::deposit_tokens()
function to bridge an NFT
from L2 back to L1. This method calls the core function starknet::send_message_to_l1_syscall()
to complete the L2->L1
information transmission. At this point, the owner_l1
address has been determined.
After the data is sent, the user will call the Starklane::withdrawTokens()
function in the L1 contract, transferring the NFT
to req.ownerL1
through the StarklaneEscrow::_withdrawFromEscrow()
function, thus completing the cross-chain process. However, if the req.ownerL1
address is blacklisted by the collectionL1
contract, the transfer will fail, and the NFT
will be permanently locked in the bridge contract.
https://github.com/Cyfrin/2024-07-ark-project/blob/273b7b94986d3914d5ee737c99a59ec8728b1517/apps/blockchain/starknet/src/bridge.cairo#L129-L181
https://github.com/ArkProjectNFTs/bridge/blob/1bb58731d8e4c37a71d3611c8ea6163c9b019193/apps/blockchain/ethereum/src/Bridge.sol#L153-L215
https://github.com/ArkProjectNFTs/bridge/blob/1bb58731d8e4c37a71d3611c8ea6163c9b019193/apps/blockchain/starknet/src/bridge.cairo#L242-L306
https://github.com/ArkProjectNFTs/bridge/blob/1bb58731d8e4c37a71d3611c8ea6163c9b019193/apps/blockchain/ethereum/src/Escrow.sol#L63-L89
If the recipient address is blacklisted by the collectionL1
or collectionL2
contract, the NFT
will be permanently locked in the bridge contract.
Manual Review
If the recipient address is in the blacklist of collectionL1
, there is currently no direct remedy. To address this issue, the following strategies can be considered:
Provide Address Update Function:
Add a function in the L2 contract to allow users to change the recipient address before or after initiating a cross-chain transaction on the L2 side. This requires close cooperation between L1 and L2 contracts.
Administrator Intervention:
In extreme cases, allow administrators to manually change the recipient address in the L1 contract or perform other necessary operations to ensure that NFT
can be extracted smoothly.
Note: L2->L1
should also add corresponding implementation according to the same logic
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.
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.