Submitted by Tigerfrake, also found by said
In cross-chain transactions, the integrity and correctness of the transaction must be maintained across different blockchain environments, which might have varying security measures, protocols. However, the missing ERC20method validation at destination allows cross-chain tx with a different ERC20Method from Transfer to be handled as transfer transactions when they actually arent.
When sending a cross-chain tx, the sender locks/burns some amount of tokens at source chain. With this, the recipient then unlocks or gets minted same amount of tokens at the destination. Basically this is similar to Token Transfer from one address to another.
As such, handler_erc20::receive_cross_chain_msg() checks to ensure that ERC20Method is TRANSFER at destination before handling tokens:
Checking for the ERC20Method at the destination is crucial due to the nature of cross-chain transactions and the need for validation and security on both ends of the transaction.
However ChakraSettlementHandler::receive_cross_chain_msg() only decodes the transfer payload and proceeds to handle tokens without actually verifying that the method is transfer.
ERC20Method should be validated before handling tokens in receive_cross_chain_msg():
0xsomeone (judge) commented:
