Dust Position Explained in Detail
A dust position is a tiny leftover state value. It can come from rounding, fees, partial repayments, partial withdrawals, minimum units, or interest accrual.
The position may be economically small but still important to contract logic.
Smart contract example
repay almost all debt -> 1 wei debt remains -> collateral withdrawal stays blocked
That one wei can change whether an account is considered closed.
Dust Position in Auditing
Dust positions can block account closure, avoid liquidation, create bad debt, bloat arrays, or trap funds. They also expose rounding assumptions.
Auditors test whether users can reach a clean zero state.
Red flags in code
-
No minimum position size.
-
No full-close path.
-
Rounding leaves 1 wei of debt, shares, or collateral.
-
Liquidation skips small accounts forever.
-
Reward or liquidation loops include many dust accounts.
How to test or review it
-
Fuzz partial deposit, withdraw, borrow, repay, liquidate, and close flows.
-
Test exact zero, one unit, and minimum-size boundaries.
-
Check whether dust can accumulate globally.
-
Verify users can fully close positions.
-
Review rounding direction for every conversion.
Keep learning this topic
Dust Attack
A dust attack introduces tiny unwanted balances or positions to trigger accounting edge cases.
Liquidation
Liquidation is a protocol action that repays or closes an undercollateralized borrow position and transfers collateral according to the protocol's rules.
Rounding Direction
Rounding direction is the choice to round a division or fixed-point result down, up, or toward zero.
Practice this in real audit scenarios
Definitions help, but auditors need reps. SCH turns concepts like Dust Position into exploit labs, code review habits, and report-writing practice.
Start the free trial or see the full smart contract auditing course.