Submitted by sseefried, also found by Chom
Smart contract calls often revert. In such cases any ether sent along with the transaction is returned and sometimes the remaining gas (depending on whether an assert caused the reversion or not).
For contracts involving ERC20 tokens it is also expected that, should a contract call fail, ones tokens are not lost/transferred elsewhere.
The callContractWithToken function does not appear to take contract call failure on the destination chain into account, even though this could be quite a common occurrence.
Tokens are burned on line 105 but there is no mechanism in the code base to return these burned tokens in the case that the contract call fails on the destination chain.
The impact is that users of the Axelar Network can lose funds.
I have put together an executable Proof of Concept in a fork of the repo.
File DestinationChainContractCallFails.js implements a test that attempts to call a token swap function on the destination chain. The swap function was provided as part of the competition repo. Given a certain amount of token A it returns twice as much of token B.
In the test I have provided the contract call on the destination chain fails because there is simply not enough of token B in the TokenSwapper contract to transfer to the user. This might be rare in practice  since adequate liquidity would generally be provided by the contract  but cross-chain contract calls are unlikely to be limited to token swaps only! I specifically chose this example to show that cross-chain contract calls can fail even in the cases that Axelar have already considered in their test suite.
In the unit test you will find:
When making a credit card purchase it is common for transactions to remain in a pending state until eventually finalised. Often ones available bank balance will decrease the moment the purchase has been approved. Then one of
two things happens:
I suggest a similar design for cross-chain contract calls, with one major difference: the token should still be burned on the source chain but it should be re-minted and refunded in case of a contract call failure on the destination chain. The steps would be roughly this:
deluca-mike (Axelar) acknowledged and commented:
0xean (judge) increased severity to High and commented:
