Enhancing DeFi Trading Efficiency and Flexibility through Swap Optimization
THORChain operates using a slip-based fee model for its liquidity pools. This means that the trade execution fee is influenced by the swap size and pool depths.
Before Streaming Swaps, traders could achieve lower slippage for larger trades by manually dividing them into numerous smaller swaps. The downside? This method resulted in multiple individual on-chain inbound and outbound transactions. Consequently, traders faced a surge in on-chain gas fees and a tedious manual process.
How Streaming Swaps Work
Streaming Swaps streamline this process to ensure maximum capital efficiency. Users only need to send a single inbound transaction. Internally, THORChain divides the swap into several sub-swaps executed over time, consolidating them into a single outbound transaction to the chosen wallet.
This helps to reduce price slippage by allowing arbitrageurs to rebalance the pool intra-swap and reduce the swap size vs the pool depth.
Imagine sipping a drink slowly to savor it instead of gulping it all down in one go. By taking your time, you often get a better overall experience. Similarly, by being more patient with your swaps, you can achieve better price execution (optimal rate/lower slippage).
For a deep dive into the technical background of Streaming Swaps, check out THORChain Dev Docs.
Optimize for time ⏳
If you want your swap executed faster, you can choose the regular THORChain swap method, where swaps are only limited by each native network’s transaction speed.
Optimize for price 💰
Using Streaming Swaps, trades can be broken down into a number of sub swaps, allowing for potentially a more favorable average price.
With the introduction of Streaming Swaps, THORSwap now offers a balance between getting the best price and saving time, putting the decision-making power directly in the hands of the user.
At launch, Streaming Swaps will split a Price Optimized swap automatically depending on Swap Size.
In future updates, THORSwap will introduce further customization options, allowing users to adjust swap intervals and specify the number of sub-swaps. It is important to note that this feature doesn’t change the fact that THORSwapnever has custody of your assets. During the execution, your assets are held in the THORChain vaults, secured by an overbonded network of node operators. You can read more on THORChain vaults here.