# How does a streaming swap work?

A streaming swap cuts one large swap into smaller sub-swaps that run over several blocks, so each piece moves the price less. You choose the interval between pieces and how many pieces there are.

Also called streaming swaps or streamed swap.

## Why it can get a better price

A large swap done in one step moves the pool’s price against you. Splitting it into smaller sub-swaps reduces the slippage on each piece, and the gaps between pieces give arbitrage traders time to rebalance the pool, which can improve the price of the whole swap.

THORChain’s documentation says that dividing a large swap into smaller ones over set intervals adds no extra L1 fees, which are the fees on the coins’ own chains.

## Interval and quantity

- The interval is the number of blocks between sub-swaps, so an interval of 3 means one sub-swap every 3 blocks.
- The quantity is the number of sub-swaps, so a quantity of 5 means 5 sub-swaps.
- For example, =:ASSET:DESTADDR:LIM/3/5 means 5 sub-swaps, one every 3 blocks.
- On the advanced swap queue, a quantity of 0, or no quantity at all, lets the network choose the streaming settings.
- The form =:ASSET:DESTADDR:/1/1 forces a single swap with streaming switched off.

## Limits and refunds

The limit in the memo applies to a streaming swap too. If the sub-swaps cannot reach that price during the stream, the inbound amount is refunded, in whole or in part.

## Related terms

- [Price limit](https://redacted.gg/glossary/price-limit.md): A price limit is the least amount of a coin you accept back from a swap, written into the memo. If the swap would pay less than that, THORChain refunds your coins instead of filling the swap below the limit.
- [Memo](https://redacted.gg/glossary/memo.md): A memo is a line of text attached to a THORChain transaction that tells the network what to do with the coins, such as which coin you want back and who receives it. Anyone can read it, because it sits in the public transaction.
- [Outbound fee](https://redacted.gg/glossary/outbound-fee.md): The outbound fee is what THORChain charges to pay the gas for the last step of a swap, the transaction that delivers the coin on its destination chain. It is taken from the swap output, so the amount you receive is after the fee.
- [Native cross-chain swap](https://redacted.gg/glossary/cross-chain-swap.md): A native cross-chain swap trades a coin on one chain for a coin on another, for example Bitcoin for Ether, by moving the real coins between vaults instead of minting wrapped copies on a bridge.
- [Liquidity pool](https://redacted.gg/glossary/liquidity-pool.md): A THORChain liquidity pool sets the price of a swap from the balances in the pool. The bigger the trade compared with the pool, the larger the slip, and that slip is the fee paid to liquidity providers.

Sources: [Continuous liquidity pools, THORChain documentation](https://docs.thorchain.org/technical-documentation/thorchain-finance/continuous-liquidity-pools), [Transaction memos, THORChain developer docs](https://dev.thorchain.org/concepts/memos.html)
---

Page: https://redacted.gg/glossary/streaming-swap/
