Submitted by cccz, also found by joestakey, enckrish, and Chom
When the user calls CrossChainRelayerArbitrum.processCalls, ETH is sent as the submission fee.
According to the documentation : https://github.com/OffchainLabs/arbitrum/blob/master/docs/L1_L2_Messages.md#retryable-transaction-lifecycle
The excess submission fee is refunded to the address on L2 of the excessFeeRefundAddress provided when calling createRetryableTicket.
In CrossChainRelayerArbitrum.processCalls, excessFeeRefundAddress == msg.sender.
For EOA accounts, the excess submission fees are correctly refunded to their address on L2.
However, for smart contracts, since there may not exist a corresponding address on L2, these excess submission fees will be lost.
Also, since the callValueRefundAddress is also msg.sender, according to the documentation, if the Retryable Ticket is cancelled or expired, then the smart contract caller may lose all the submission fees
https://github.com/pooltogether/ERC5164/blob/5647bd84f2a6d1a37f41394874d567e45a97bf48/src/ethereum-arbitrum/EthereumToArbitrumRelayer.sol#L118-L127
https://github.com/OffchainLabs/arbitrum/blob/master/packages/arb-bridge-eth/contracts/bridge/Inbox.sol#L333-L354
Consider allowing the user to specify excessFeeRefundAddress and callValueRefundAddress when calling CrossChainRelayerArbitrum.processCalls.
Alex the Entreprenerd (judge) commented:
PierrickGT (PoolTogether) confirmed and commented:
Alex the Entreprenerd (judge) commented:
Alex the Entreprenerd (judge) commented:
Alex the Entreprenerd (judge) commented:
