DustAndRoundingCleaner
DustAndRoundingCleaner prevents creation of dust positions — holdings so small that their eventual pUSD value at settlement is less than the transacti
What it does
DustAndRoundingCleaner prevents creation of dust positions — holdings so small that their eventual pUSD value at settlement is less than the transaction cost of acquiring or selling them. It rounds order sizes to economically viable minimums and sweeps existing dust positions on a configurable cron schedule.
Pipeline placement
Applies to: Any order with remainder below min_economic_size and any existing dust positions on cron
Why it matters
| If this fails | Consequence |
|---|---|
| Dust position created | A position of <$1 pUSD accumulates with no path to profitable exit; creates accounting noise and wastes position-budget slots. |
| Rounding not applied before submission | Orders with fractional pUSD sizes are rejected by CTFExchangeV2 which requires integer token units; submission fails with a parse error. |
| Dust sweep not scheduled | Over time, hundreds of dust positions accumulate from partial fills, consuming wallet gas allowance on Polygon and polluting portfolio reporting. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| CLOB V2 minimum order size for market | clob_public | required | Ensure order size is above CLOB V2 minimum (1 share unit) after rounding. |
| Current position holdings for sweep | clob_auth | required | Identify existing positions below min_economic_size_usd for the sweep cron. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Remainder below min_economic_size from PartialFillHandler | exec.partialfillhandler | optional | Forward sub-minimum remainders to DustAndRoundingCleaner for sweep or cancellation. |
| ExecutionPlan size before signing | exec.smart_router | required | Round plan.size_usd to nearest integer pUSD unit before signing. |
Authority
What this bot is permitted to do
State
Readiness
Spec started
Status
planned
Class
Execution Utility
Default mode
shadow_only
Developer owner
Polytraders core — Execution pod
Capital impact
Direct
Reason codes emitted
| Code | Severity | Meaning | Action |
|---|---|---|---|
| DUST_ROUNDED | RESHAPE | Order size rounded down to nearest valid integer pUSD unit. | Update plan.size_usd; forward to signing. |
| DUST_WARN | WARN | Order size below min_economic_size_usd but above hard threshold. | Emit WARN; proceed with order (size still valid for CLOB). |
| DUST_HARD_REJECT | HARD_REJECT | Order size below hard threshold (1 pUSD) after rounding; not viable. | Discard order; emit no submission. |
| DUST_SWEPT | INFO | Dust position swept via sell order on cron schedule. | Emit ExecutionReport; log to WAL. |
| DUST_REMAINDER_CANCELLED | INFO | Sub-minimum remainder from PartialFillHandler cancelled. | Cancel remainder; emit ExecutionReport. |
Related bots in Execution
Used by
Reverse index — strategies that currently reference exec.dustandroundingcleaner. If you change this bot's authority or reason codes, these strategies must re-pass shadow.
| Strategy | State | Activity |
|---|---|---|
| Fed Rates — surprise drift | frozen | last triggered 6m ago |
Showing 1 of 1 · demo-wired ≠ production-live
Why this matters
Execution bots does NOT propose new positions; only routes and shapes approved intents. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →