Skip to content

Recurring / DCA orders module #219

Description

@DevMuhdishaq

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

  • A recurring order executes only when due and advances its schedule.
  • Executes exactly occurrences times then auto-completes.
  • cancel_order stops future executions.
  • Insufficient balance skips/cancels gracefully with an event, no panic.
  • Tests cover due/not-due, completion, and cancellation.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions