Diagram
A request that is refused before it is created never enters this machine and locks nothing: it gets a 4xx error, or a201 body with
status: "rejected" and a code (compliance refusal, for example
wallet_banned, aml_blocked, or restriction_active), or an uppercase
status: "REJECTED" with an empty id: "" and refusal code in code (for
example insufficient_funds or withdrawal_restricted_onchain).
States
The status enum also contains
REVERTED. No current transition
produces it; if you see it, treat it as terminal and refunded.
Cancellation rules
Users can cancel while status isPENDING, MLRO_REVIEW, or
CO_SIGNED:
vault:write and the narrow withdraw:write scope are accepted. A key
created in account settings with only the Withdraw permission (withdraw:write)
is fully authorized to cancel its own withdrawals.
Cancelling a withdrawal in MLRO_REVIEW closes the linked compliance alert
cleanly without recording a compliance violation, and immediately releases the
locked balance.
After SUBMITTED, the transaction is already in the mempool or broadcast pipeline
— cancellation is not possible. Attempting to cancel answers 409
(error envelope):
Expiration and reservation recovery
When a withdrawal’s signed deadline (expiry) passes before the transaction is
confirmed on-chain:
- The smart contract will reject late execution with
WithdrawExpired. - No manual unlock call is needed. Unlike split/merge operations
(which provide
POST /api/me/splits-merges/{opId}/unlock), withdrawals do not have a user-facing unlock endpoint. - Instead, the platform’s background chain-watcher and sweeper janitor
automatically monitor expired rows, verify on-chain that the EIP-712 digest
was not consumed, transition the withdrawal to
EXPIRED, and return the locked funds toavailablebalance (reason: withdrawal_expired). - If an API request encounters a network drop or
503 withdrawal_unknown, do not sign a new withdrawal. Re-send the exact same payload (samesaltanduserSig); the backend safely replays the existing record without double-locking funds.
Audit trail
Every status transition is recorded in an append-only event log.GET /api/me/withdrawals/{id}/events (portfolio:read scope) returns
the user-visible audit trail, sorted chronologically:
kind: Clean lifecycle event name (created,auto_approved,flagged_for_review,mlro_approved,mlro_rejected,broadcast,rebroadcast,confirmed,cancelled,expired,broadcast_failed,broadcast_blocked). Internal reason suffixes are stripped from user views.actor:- The user’s lowercase wallet address for user actions (
created,cancelled). 'system'for automated backend transitions.'chain'for on-chain transaction confirmation.'journal-archivist'for money-journal reconciliations.'staff'for any compliance or MLRO action (individual reviewer identities are strictly masked to prevent tipping off and protect staff privacy).
- The user’s lowercase wallet address for user actions (