You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The transferCrossChain function burns tokens before confirming their successful minting on the destination chain. This approach risks permanent token loss if the cross-chain operation fails.
The text was updated successfully, but these errors were encountered:
0xM3R
changed the title
Cross-Chain Transfer Risks may lead to token loss
Cross-Chain Transfer Risks may lead to token loss in UninversalNFT contract
Dec 11, 2024
0xM3R
changed the title
Cross-Chain Transfer Risks may lead to token loss in UninversalNFT contract
Cross-Chain Transfer Risks may lead to token loss
Dec 11, 2024
0xM3R
changed the title
Cross-Chain Transfer Risks may lead to token loss
Cross-Chain Transfer Risks may lead to token loss in the smart contracts
Dec 11, 2024
Vulnerability Details
The
transferCrossChain
function burns tokens before confirming their successful minting on the destination chain. This approach risks permanent token loss if the cross-chain operation fails.Analysis
The vulnerable implementation
standard-contracts/contracts/nft/contracts/evm/UniversalNFT.sol
Line 71 in a08166a
How It Can Be Harmful
PoC Code
Attempt a cross-chain transfer to an invalid
destination
address and observe the behavior:transferCrossChain(tokenId, invalidReceiver, invalidDestination);
How to Mitigate the Issue
Instead of burning tokens immediately, lock them until the cross-chain transfer is confirmed.
Ensure that burning occurs only after successful confirmation of minting on the destination chain.
References
The text was updated successfully, but these errors were encountered: