Autonomous Refunds for Failed Transfers

In rare cases, transfers will fail because there isn't enough liquidity in the target blockchain or the target token is not available. The token contract may be paused or trading may be temporarily disabled. In those cases, the transfer will fail. When a transfer fails, the tokens in the received blockchain are kept in the CCIP contract which is the one responsible for handling swaps and transferring tokens between blockchains. The tokens will be in USDC and they will be kept in the CCIP contract. In the event of a failed transaction, users are able to recover those funds because there are security mechanisms in place to save in the blockchain state before the failed transfer. This advancement in trading protection is due to the latest version of Solidity which allows users to protect function executions with a try catch block. In order to recover the USDC tokens, the receiving user will be able to connect his wallet to the DApp and select "Refund" to see the link to execute the blockchain transaction that reverts the USDC to the original user. Only the original user who submitted the swap will be able to recover these funds as the smart contract checks who the executor of the original function was.

Last updated