How do I choose TWAP parts and intervals for CoW Swap?
Choose the number of parts and time interval for a cowswap TWAP order by testing slice impact, allowing pool recovery, and weighing expiry risk against market drift.
The Altcoin News Desk3 min read
Choose each TWAP slice size by checking its quoted price impact against available liquidity, then set an interval long enough for pool prices to recover. The right part count and spacing depend on the pair’s depth, volatility and your tolerance for market drift.
Start with the full trade size and quote it against the available pools. Then quote smaller sizes. Pick a slice size where the quoted impact falls to an acceptable level; calculate parts as total amount divided by that slice size. A cowswap TWAP order is built on ComposableCoW conditional orders, and each part is settled in its own batch auction. CoW Swap settles each slice through a batch auction. For how that auction handles a TWAP slice, see the cowswap batch auction.
Set the interval to give arbitrageurs time to rebalance pool prices after a slice. Arbitrageurs trade when pool prices diverge from the wider market, helping restore the balance before the next part arrives. Quiet pairs may need longer spacing because price differences can take longer to attract that activity. More active pairs may recover sooner, but use observed liquidity and price behavior to judge the interval.
Work out the total duration by multiplying the number of parts by the interval. For instance, increasing the part count while keeping the interval fixed extends the order. A longer duration can lower impact by spreading execution, but it also leaves more time for the market to drift away from your limit.
Account for expiry before choosing tight price protection. Each part must fill within its own interval; an unfilled part expires instead of rolling into the next one. So a short interval combined with a narrow price limit can leave much of the trade unsold, even if later slices might have found liquidity. Thin or volatile tokens need smaller parts and wider price protection to improve the chance of filling. Wider protection accepts more price movement, so set it in line with your execution priorities.
Check the result against both impact and fill risk. Confirm that the slice quote stays within your impact tolerance, the interval gives pools time to rebalance, and the resulting total duration fits your exposure to market drift. If a slice is too large, add parts; if intervals are too tight for the pair’s activity, widen them. The final settings should give you a defensible part size, interval and total duration without relying on every slice filling instantly.