Achieve optimal pricing: Streaming Swaps land to Maya

The feature that optimizes swap fees for the best pricing. Whether you're new or experienced, learn how streaming swaps can enhance your trading strategy.

August 22, 2024

Key Takeaways:

  • Maya's new feature allows you to optimize your swap fees by breaking down a large trade into smaller, incremental transactions.
  • Streaming swaps offer flexibility in execution. You can prioritize either a shorter time frame for faster swaps or a longer duration for optimal pricing.
  • After introducing streaming swaps, THORChain's daily trading volume increased from approximately $12.8 million to $327.2 million.

One of the biggest moments for Maya is here: the ability to optimize your swap fees to get the best pricing. If you're new to the community and have no idea what we're talking about, or if you're already familiar but want to dive into every detail, we recommend reading until the end to get ready for this feature because your wallet is going to love it. 

What are streaming swaps?

Imagine wanting to watch a movie. You could download it all at once, ensuring uninterrupted viewing once it's ready, but this takes time and isn't always efficient, especially if you're unsure about committing to the whole movie upfront. Alternatively, streaming lets you start watching almost immediately while the movie continues to download. It's flexible, saves time, and conserves storage space on your device. 

Similar to streaming a movie, streaming swaps involve splitting your trade into smaller parts, much like transmitting segments of a film. This allows you to adjust to market conditions gradually, optimizing trade execution by adapting to price movements and minimizing fee impacts.

Streaming swaps are all about patience for better pricing. Instead of executing your swap all at once (which might incur higher fees), you can split

your swap into smaller chunks and do it gradually. This approach gives the market time to adjust, allowing you to secure a better overall deal. Plus, if any of the smaller swaps can’t be completed at your desired price, they’ll be refunded, so you don’t lose out. It’s all about being patient and smart with your trades!

Why are streaming swaps going to be your default option?

This innovation is designed to provide traders with enhanced price execution and cost efficiency, regardless of the trade size. By breaking down a large trade into smaller, incremental transactions, streaming swaps solve several key issues:

  1. Reduced slippage/Lower fees: Smaller trades experience less price impact, meaning lower fees during different market conditions. 
  2. Market adjustment: The gradual execution allows the market to adjust between trades, leading to more favorable conditions for each subsequent transaction.
  3. Increased flexibility: You can set limits and intervals, allowing for more control over the trade execution process.

Is there any way to reduce streaming time?

When using streaming swaps, two key parameters come into play:

1. Streaming Intervals: This refers to the number of blocks in a subswap. The interval can be as short as one block, meaning faster swaps since they occur more frequently.

2. Number of Subswaps: This is the total number of subswaps you want to execute.

If you set the number of subswaps to zero, Maya will automatically calculate the optimal amount of subswaps to minimize slippage. This means you're letting Maya handle the process to get the best deal for you with minimal fees. The maximum limit for subswaps quantity is 14,400; if your swap interval is one block (which is the equivalent to one day, the maximum period of a stream).

For more control, you can specify the maximum duration for the swaps. For instance, if you want the entire process to be completed within 30 minutes, you can set the parameters accordingly. You can choose a one-block interval and specify a total of 100 subswaps, providing you with significant flexibility.

Time optimized swap vs. Price optimized swap

A regular swap prioritizes quick transaction completion, often disregarding the cost of fees. In contrast, a streaming swap optimizes the price by adjusting the transaction time, allowing for a more cost-effective and strategic approach. To illustrate the benefits of streaming swaps, let’s compare how a regular swap functions versus a streaming swap with a practical example. 

Example: Swapping 20,000 KUJI for BTC

Swapping 20,000 KUJI tokens for BTC in a single trade could cause significant slippage. With Streaming Swaps, you can split this into 50 mini-swaps of 400 KUJI each. This approach helps minimize slippage and ensures better pricing by spreading the trade across multiple smaller swaps, rather than executing it all at once.

Two Scenarios:

1. Optimizing for Time

If you need the swap completed within a specific time frame, such as 30 minutes, you can set the parameters to achieve this. For example, you might set a one-block interval and specify that you want 100 subswaps. This allows the swaps to complete within the desired time, providing you with control over the duration of the process while still benefiting from reduced slippage.

2. Optimizing for Price

If you're less concerned about the time and more focused on minimizing slippage, you can let Maya determine the optimal number of subswaps and intervals. By setting the number of subswaps to zero, Maya will calculate the best configuration to minimize fees and slippage, even if it takes longer to complete the swap. This approach ensures you get the best possible pricing for your tokens.

What sets streaming swaps on Maya apart from THORChain?

THORChain launched this feature on July 26th of 2023, and since then streaming swaps have had a considerable impact on the trading volume. To understand the impact of streaming swaps on THORChain, let's look at the trading volumes before and after introducing the feature according to DefiLlama.

Source: DefiLlama

Before streaming swaps were introduced, the daily trading volume on THORChain was significantly lower. For instance, in the months leading up to July 2023, the average daily trading volume was around $12.8 million. Now, the current daily volume, averaged over the past year, stands at approximately $327.2 million. There’s no doubt it has attracted more trading activity.

"THORChain's streaming swaps offer the best price execution of any CEX or DEX in the market today. This innovation has made THORChain the third-largest DEX in the world by volume," said core developer Chad Barraford to The Defiant in 2023, just four months after launch.

The story of why Maya decided to adopt this new feature speaks for itself, but the key difference lies in the supported chains. With this implementation, you can now enjoy streaming swaps on the following chains: Dash, Kuji, Leo, Arbitrum, THORChain, Ethereum, and Bitcoin.

Expect streaming swaps to boost our capital efficiency and propel Maya into the top DEXs. For instance, it is likely that Maya with Streaming swaps makes Arbitrum token to Arbitrum token swaps more price effective than smart contract DEX’s native to its chain. 

Where can I start using the streaming swaps feature? 

Streaming swaps will soon be available on every UI supporting Maya swaps. Follow these platforms on social media to stay tuned:

Additional resources

X

Website

Discord

Docs