Section 086
Withdrawal State Machine
The states a withdrawal passes through, what each one waits for, and what happens on failure.
Withdrawals follow the treasury's state machine. Each state has one owner service and one condition to leave it.
| State | Waits for |
|---|---|
REQUESTED | A reconciled snapshot and enough free USDC in the strategy book. |
CLOSING_PRO_RATA | Reduce-only orders that cut each position by your share. These orders are exits, so no brake can block them. |
PULLING_MARGIN | Released margin to become withdrawable on the venue. |
HL_WITHDRAW_SENT | The venue's payout on Arbitrum, matched by nonce and amount. |
DONE | Terminal. Units burned, USDC received, fee lines written. |
FAILED_MANUAL | A condition that automation must not guess about. Units are not burned until it is resolved. |
Idempotency: every state change is keyed by the withdrawal id. If a service restarts mid-step, it re-reads the venue and the chain before acting, so the same withdrawal cannot be paid twice.
NAV treatment: from the moment units are burned until the payout is confirmed, the amount is a liability (withdrawals owed), so remaining holders are neither credited nor charged for it.
Typical time end to end is a few minutes when no positions need to be reduced. Reducing positions adds the time needed to fill reduce-only orders at acceptable prices.