🟩Swap Failures and Refunds

Due to price volatility, a swap request may fail in TeleSwap. In such cases, the protocol refunds funds to the same address that initiated the request on the source chain.

To ensure a smooth refund process without any user interaction, the refund admin is responsible for calling the contract to initiate the refund transactions. The refund admin can only trigger the refund and cannot change the amount or recipient address.

Bitcoin to EVM swaps

If a swap fails due to price volatility, incorrect exchange route, or any other reason, the minted TeleBTC remains in the smart contract. The refund admin then initiates an unwrap TeleBTC transaction to send funds back to the user.

EVM to Bitcoin swaps

Requests from base networks (Polygon, BNB) cannot fail, as the contract reverts the swap if it fails and no funds are moved. However, for other networks that use base chains as intermediaries, swaps may fail. In such cases, funds are held in the TeleSwap contract on the base chain. The refund admin then calls the contract to send funds back to the original sender on the source chain.

Refund fees

To minimize user fees in the case of failures, TeleSwap takes zero protocol fee for failed swaps. Only the fee for processing the refund is deducted:

  • For Bitcoin to EVM, the Bitcoin unwrapping fee is deducted.

  • For EVM to Bitcoin, the bridge fee to return funds to the original chain is deducted.

Last updated

Was this helpful?