Submitted by Tigerfrake, also found by SBSecurity, 0xAsen, blackpanther, Abdessamed, 0xb0k0, avoloder, DPS, agent3bood, ABAIKUNANBAEV, peanuts, calfun0x, ZdravkoHr, 0xNirix, and haxatron
Anyone can initiate a cross-chain ERC20 settlement with invalid parameters, breaking an invariant due to missing validations.
For example if these values are non-existent or zero values, it would boil down to the following:
One of the Main Invariants in Settlement Handler Contract is:
This is enforced in ChakraSettlementHandler::cross_chain_erc20_settlement() as follows:
However, this is not enforced in handler_erc20::cross_chain_erc20_settlement():
As seen, the function only checks for handler validity but performs no validations for to_token, to, and amount.
Add the following checks to the cross_chain_erc20_settlement() function in handler_erc20:
zvlwwj (Chakra) confirmed
0xsomeone (judge) commented:
