👉Cross-chain Swaps with TIF Protocol
Explore the TIF protocol's innovative approach to achieving smooth and secure cross-chain swaps and bridging functionalities.
Last updated
Explore the TIF protocol's innovative approach to achieving smooth and secure cross-chain swaps and bridging functionalities.
Last updated
The inception of the TIF protocol was centered around cross-chain operations, initially focusing on swaps and bridging. As the protocol evolved, additional functionalities were integrated. This document provides an overview of the cross-chain swap concepts within the TIF protocol's journey.
When performing a cross-chain operation, the source and destination blockchains are not BNB. Let's illustrate this with a cross-chain swap example: Imagine a user who wishes to exchange BNB tokens from the Ethereum blockchain for ETH on the BNB Chain, aiming to maximize their token amount while minimizing on-chain and cross-chain fees. TIF protocol provides support for two types of transit tokens:
Stablecoins, applicable to all supported blockchains.
WBNB, available for certain supported blockchains. If a pair of blockchains allows both stablecoins and WBNB as transit tokens, TIF identifies two routes (sequences of intermediate swaps) for each swap between these blockchains. For instance, in the case of a cross-chain swap from ETH on the Ethereum blockchain to BNB on the BNB Chain, two routes are available:
The optimal route using stablecoins as transit tokens (Scheme 1): (ETH → USDC on Ethereum) → Bridging with TIF → (USDC → BNB on BNB Chain)
The best route utilizing WBNB as transit tokens (Scheme 2): (UNI → WBNB on Ethereum) → Bridging with TIF → (WBNB → BNB on BNB Chain)
Every cross-chain swap is subject to a predetermined slippage tolerance limit, which is proportionally distributed among all transactions within the swap. This approach ensures that each individual transaction adheres to its designated slippage tolerance fraction, guaranteeing that the cumulative price change remains within the overall slippage tolerance threshold.
Here's how it works:
If a transaction on the first network exceeds the approved price change, the assets remain in the user's wallet.
If a transaction on the TIF host chain exceeds the agreed-upon price change, the cross-chain swap is halted.
If a transaction on the destination blockchain surpasses the accepted price change, the user will receive an appropriate amount of the transit token.