Trading

DEX Algo Orders (TWAP / VWAP / Iceberg)

9 min read

What it is

One-shot smart execution that slices a single large order across a short window (30 min to 24 hours). Three profiles: TWAP (equal slices at equal intervals — predictable), VWAP (slice sizes follow hourly volume — heavier at peak liquidity), Iceberg (4× more slices at 1/4 the size each — camouflages total notional from observers). Same protocol rails as DCA (CoW + Velora), same approval pattern, same gas-free fills.

How to think about it

Algo Orders is the one-shot cousin of DCA. Both share the same backend engine — the difference is the time window. DCA = days/weeks/months of recurring accumulation. Algo Orders = hours of slicing a single intent. Use Algo Orders when you have $5k+ to swap and the spot impact would be too high in a single shot. Live-validated May 2026: TWAP perfectly uniform, VWAP weight math correct (slice sizes shifted at volume-bucket boundaries), Iceberg 4× slice expansion confirmed.

Step-by-step

  1. Pick a profile

    TWAP if you want predictable equal slices ("split this evenly across 4 hours"). VWAP if you want volume-aware sizing ("buy more during US trading hours, less overnight"). Iceberg if you want camouflage ("don't let observers see one big notional — chop it into 16 tiny ones across 4 hours").

  2. Pick protocol + chain + tokens

    CoW (Ethereum / Arbitrum / Base) or Velora (adds Polygon / BSC / Optimism / Avalanche). Sell + Buy from the curated per-chain list or paste a custom token.

  3. Set total amount + time window + slice count

    Total amount = full size you want to swap (e.g., 1000 USDC). Time window = how long to spread it across (30min / 1h / 2h / 4h / 8h / 24h). Slice count = how many chunks (4 / 6 / 8 / 12 / 16 / 20). Per-slice amount auto-computes (total / slices). Iceberg expands slice count by 4× internally without changing the user-facing total.

  4. Sign approval + each slice

    First-time spend-token: ERC-20 approval (gas, one-time). Then one EIP-712 signature per slice. TWAP at 4 slices = 4 popups. VWAP at 8 slices = 8 popups. Iceberg at 4 user-slices → expands to 16 internal slices → 16 popups. Be ready for that pop-up cadence.

  5. Watch slices submit + fill in the order row

    After signing, the row shows status Running. Each slice fires at its scheduled time and submits to CoW/Velora. The expanded row shows per-slice status (pending / submitted / filled / failed) with timestamps. After all slices complete, status flips to Completed.

  6. Cancel mid-execution if needed

    Cancel button stops all PENDING slices. Already-submitted slices may still fill at the orderbook (you cannot un-submit a signed order). The row shows the partial completion count (e.g., "8/12 filled, 4/12 cancelled").

Tips & pitfalls

  • TWAP for newcomers: same size every slice, even spacing. Easiest to reason about and audit after the fact. The default profile.
  • VWAP looks visually subtle on short windows — slice 1-3 might all sit in the same hourly volume bucket and be uniformly sized; slice 4 lands in a different bucket and shows a different size. This is correct math, not a bug. Validated May 2026: 3-slice cluster at $1.0461 each, then slice 4 at $0.8615 because the volume bucket shifted.
  • Iceberg is anti-front-running. The 4× internal expansion means observers watching the orderbook see lots of small "retail-sized" trades instead of one big notional. Use when swapping $25k+ where MEV bots would otherwise spot you.
  • Time windows of 30min / 1h are TIGHT — slippage savings are minimal because there is not enough time to spread risk. Algo Orders shine at 4h, 8h, 24h. For sub-30min, just use DEX Swap one-shot.
  • Slice count vs window: more slices in the same window = smaller per-slice notional but more signatures. 4 slices in 4 hours = 1 hour spacing. 16 slices in 4 hours = 15 min spacing. Pick based on how impatient solvers are with the asset (popular asset = more slices OK; thinly-traded = fewer larger slices fill better).
  • Approval gas-paid ONCE per (sell-token, protocol) combo — shared with DCA / Limit Orders / Smart Trade / Stop Orders. If you already approved USDC for CoW on Base previously, no new approval needed for this Algo Order.
  • Cancel cancels PENDING slices only. If 8 of 12 have already submitted to the orderbook, those 8 may still fill. Plan accordingly — for tight-stop trades, prefer fewer slices so you have less in-flight at any moment.
  • Algo Orders and DCA share UI patterns but are different products. Use DCA for "every Monday for 4 weeks". Use Algo Orders for "today, spread the next 4 hours". The page is single-purpose to keep the form simple.