Submitted by Trust
L1GraphTokenGateway.sol#L236
The outboundTransfer function in L1GraphTokenGateway is used to transfer users Graph tokens to L2. To do that it eventually calls the standard Arbitrum Inboxs createRetryableTicket. The issue is that it passes callers address in the submissionRefundAddress and valueRefundAddress. This behaves fine if caller is an EOA, but if its called by a contract it will lead to loss of the submissionRefund (ETH passed to outboundTransfer() minus the total submission fee), or in the event of failed L2 ticket creation, the whole submission fee. The reason its fine for EOA is because of the fact that ETH and Arbitrum addresses are congruent. However, the calling contract probably does not exist on L2 and even in the rare case it does, it might not have a function to move out the refund.
The docs dont suggest contracts should not use the TokenGateway, and it is fair to assume it will be used in this way. Multisigs are inherently contracts, which is one of the valid use cases. Since likelihood is high and impact is medium (loss of submission fee), I believe it to be a HIGH severity find.
If L1GraphTokenGateways outboundTransfer is called by a contract, the entire msg.value is blackholed, whether the ticket got redeemed or not.
Alice has a multisig wallet. She sends 100 Graph tokens to L1GraphTokenGateway, and passes X ETH for submission. She receives an L1 ticket, but since the max gas was too low, the creation failed on L2 and the funds got sent to the multisig address at L2. Therefore, Alice loses X ETH.
A possible fix is to add an isContract flag. If sender is a contract, require the flag to be true.
Another option is to add a refundAddr address parameter to the API.
0xean (judge) decreased severity to Medium and commented:
pcarranzav (The Graph) acknowledged, but disagreed with severity and commented:
0xean (judge) commented:
pcarranzav (The Graph) commented:
