Description
Extend the orders module with dollar-cost-averaging (recurring) orders that execute a fixed-size swap at a set ledger interval — a strong educational feature.
Direction
- Add
place_recurring_order(user, pair, amount, interval_secs, occurrences) to orders.rs.
- A permissionless
execute_due_orders(order_id) (or keeper) executes when now >= next_run; advances next_run and decrements remaining occurrences.
- Respect rate limits, slippage, and pause state; emit events per execution.
Acceptance criteria
Description
Extend the
ordersmodule with dollar-cost-averaging (recurring) orders that execute a fixed-size swap at a set ledger interval — a strong educational feature.Direction
place_recurring_order(user, pair, amount, interval_secs, occurrences)toorders.rs.execute_due_orders(order_id)(or keeper) executes whennow >= next_run; advancesnext_runand decrements remaining occurrences.Acceptance criteria
occurrencestimes then auto-completes.cancel_orderstops future executions.