⚠ INTERNAL — Operator UX mock · Design preview of V2 development path · demo-wired ≠ production-live · back to dev guide
Polygon · pUSD 10
📓 Developer Guide 📋 Reason Codes 📈 Shadow Mode
JD John Doe · Admin

DustAndRoundingCleaner

exec.dustandroundingcleaner
Execution planned Spec started frozen

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

runs after: PartialFillHandler (remainder below min_economic_size) or strategy sizing step DustAndRoundingCleaner runs before: Order signing and CLOB V2 submission; dust sweep runs on cron

Applies to: Any order with remainder below min_economic_size and any existing dust positions on cron

Why it matters

If this failsConsequence
Dust position createdA position of <$1 pUSD accumulates with no path to profitable exit; creates accounting noise and wastes position-budget slots.
Rounding not applied before submissionOrders with fractional pUSD sizes are rejected by CTFExchangeV2 which requires integer token units; submission fails with a parse error.
Dust sweep not scheduledOver time, hundreds of dust positions accumulate from partial fills, consuming wallet gas allowance on Polygon and polluting portfolio reporting.

Inputs

Polymarket inputs

InputSourceRequiredUse
CLOB V2 minimum order size for marketclob_publicrequiredEnsure order size is above CLOB V2 minimum (1 share unit) after rounding.
Current position holdings for sweepclob_authrequiredIdentify existing positions below min_economic_size_usd for the sweep cron.

Internal inputs

InputSourceRequiredUse
Remainder below min_economic_size from PartialFillHandlerexec.partialfillhandleroptionalForward sub-minimum remainders to DustAndRoundingCleaner for sweep or cancellation.
ExecutionPlan size before signingexec.smart_routerrequiredRound plan.size_usd to nearest integer pUSD unit before signing.

Authority

What this bot is permitted to do

Reshape

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

CodeSeverityMeaningAction
DUST_ROUNDEDRESHAPEOrder size rounded down to nearest valid integer pUSD unit.Update plan.size_usd; forward to signing.
DUST_WARNWARNOrder size below min_economic_size_usd but above hard threshold.Emit WARN; proceed with order (size still valid for CLOB).
DUST_HARD_REJECTHARD_REJECTOrder size below hard threshold (1 pUSD) after rounding; not viable.Discard order; emit no submission.
DUST_SWEPTINFODust position swept via sell order on cron schedule.Emit ExecutionReport; log to WAL.
DUST_REMAINDER_CANCELLEDINFOSub-minimum remainder from PartialFillHandler cancelled.Cancel remainder; emit ExecutionReport.

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.

StrategyStateActivity
Fed Rates — surprise driftfrozenlast 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 →
Polytraders Operator UX Mock · INTERNAL · demo-wired ≠ production-live · the plan · reason codes · shadow-mode pipeline
⚙ Page Configuration
Current page settings
Loading configuration…