TWAMM long-term order: Choose a window that meets your deadline
Choose a TWAMM long-term order duration by dividing order size by hours, comparing that rate with normal pair volume, then checking your deadline.
The Blockheight Editors··3 min read
Choose the shortest duration that makes your order’s hourly sell rate a small share of the pair’s usual hourly volume and still finishes before your deadline. Divide the order size by candidate hours, compare that rate with volume, and lengthen the window if the rate is too large. The Fraxswap automated market maker includes a time-weighted market maker for executing trades over time.
What should you compare before choosing hours?
- Compare the order size with the pair’s reserves on your chosen chain. Use the reserves for the Fraxswap pair contracts on Ethereum or Fraxtal, as applicable. This gives you context for how large the order is relative to the pool; a large order deserves closer scrutiny of its rate and likely price impact.
- Calculate the hourly sell rate. Divide the order size by the candidate duration in hours. For a 24-hour order, divide by 24; for a 72-hour order, divide by 72. Fraxswap TWAMM sells the order evenly across its duration, so this rate represents the amount sold each hour.
- Compare the rate with typical hourly volume. Estimate hourly volume by dividing the pair’s typical daily volume by 24, then compare that baseline with your rate. Treat it as a rough comparison: daily volume may not be evenly distributed across hours. If your order’s hourly rate is a large share of that usual activity, lengthen the window and recalculate. Judge the rate, not just the total order size.
- Check the deadline for proceeds. Confirm the order’s end time leaves enough time for the proceeds to be available by your deadline. An unfinished long-term order can be cancelled, with the unsold remainder returned, but cancellation does not change the time already spent in the market.
How does a longer duration change the trade?
A longer duration spreads each hourly slice across more time and can reduce the pressure from each slice. It also keeps more of the order exposed to market movement for longer. If the token price is trending while the order runs, that trend can affect the later slices.
Arbitrageurs can trade against price differences between pools, so the pair’s normal volume is useful context, not a fixed impact threshold. The practical test is whether your calculated hourly rate stays a small share of the pair’s usual hourly volume. There is no single duration that suits every pair or order size.
Start with the order size and pair, calculate the rate for a candidate duration, and lengthen it until the rate is a small share of usual hourly volume. Then confirm the end time beats your deadline and choose that duration.