User deposits in ERC1155 NFTs can be locked forever
The way the bridge handels erc1155 NFTs fails to account for the fact that a single token ID can be owned by multiple users and have more than 1 supply.
The above line of code maps a token ID of a particular collection to an address as the owner. But for ERC1155 nfts where multiple users can own the same token ID, mapping it this way means only the latest depositor would own the NFT and all previously deposited NFTs are unaccounted for.
This above line used in withdrawing tokens from the L1 bridge doesnt work properly for ERC1155 NFTs because, if one of the owners of a particular token ID withdraws that token, the mapping is reset and all other previous depositors are unable to withdraw.
Irregularities in accounting for deposited and withdrawn tokens can lead to NFTs being locked indefinitely.
Manual Review
Consider creating a separate mapping for ERC1155 NFTs that include a separate map for each owner of a particular tokenID
```compatibilities: Blockchains: - Ethereum/Starknet Tokens: - [ERC721](www.tokenstandard.com) ``` ``` function depositTokens( uint256 salt, address collectionL1, snaddress ownerL2, uint256[] calldata ids, bool useAutoBurn ) external payable { if (!Cairo.isFelt252(snaddress.unwrap(ownerL2))) { revert CairoWrapError(); } if (!_enabled) { revert BridgeNotEnabledError(); } CollectionType ctype = TokenUtil.detectInterface(collectionL1); if (ctype == CollectionType.ERC1155) { @> revert NotSupportedYetError(); } … } ```
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.