Submitted by Chom
Executor.sol#L113-L192
Executor.sol#L194-L213
Current implementation of arbitrary call execute failure handler may break some use case for example NFT Bridge.
In the case of NFT Bridge, NFT may be lost forever.
This is likely to be happened in the case of out of gas.
Relayer receive the message to unlock BAYC on ETH chain. Relayer call execute on BridgeFacet which then call execute in Executor internally. Continue to these lines:
Unfortunately, an enormous NFT project has just started minting their NFT when the relayer perform the execution. Causing gas price to increase by 20x.
As a result, gasLimit is 20x lesser than what we have calculated causing ExcessivelySafeCall.excessivelySafeCall to fail because of out of gas. We fall into _handleFailure function. Notice that NFT is not unlocked yet because target contract has failed to being executed.
_handleFailure just sent dummy fund in the NFT bridge process to the useless fallback address (Useless in NFT bridge case as it doesnt involve any cross chain swapping / token transferring).
Finally, transferId will be marked as used (or reconciled). This transferId cannot be used anymore.
Recall that BAYC hasnt been unlocked yet as target contract has failed to being executed.
And we cannot reuse this transferId to retry anymore in the future as it is marked as used
As a result, BAYC is locked forever as target contract call never success anymore since transferId has been marked as used
You should mix axelar style and connext style of error handling together.
Fund shouldnt be sent to fallback address immediately. Instead, leave an option for user to choose whether they want to recall the failed transaction manually or they want to transfer the fund to the fallback address.
LayneHaber (Connext) acknowledged and commented:
Chom (warden) commented:
0xleastwood (judge) decreased severity to Medium and commented:
Chom (warden) commented:
0xleastwood (judge) commented:
