Submitted by RadiantLabs
The L1 deposit function allows a depositor to send a signed payload to be executed atomically with the deposited tokens, via bridge hooks.
Within this signed payload, Cosmos Messages are executed one by one via the following steps:
In this msg loop, we miss a step that is commonly executed by BaseApp on transactions submitted via RPC:
This validateBasicTxMsgs calls ValidateBasic on all messages that implement it:
This logic is missing from L2 hooks, meaning that messages that do have a ValidateBasic method will have this called bypassed as opposed to the situation of the same message submitted through RPC call.
This call can be reasonably executed by the ante handler. However, if we take as example minimove, this isnt the case, because NewValidateBasicDecorator is included for the RPC ante handler (L90) and not the hooks (L111-115):
The consequence is that, when called through L2 hook transactions, MsgServer instances can execute messages that would not pass ValidateBasic. Depending on the specific message handling, this can lead to inconsistent operation or application panics.
We recommend either:
beer-1 (Initia) confirmed and commented via Move audit, Issue F-7:
