Skip to main content

Diagram

States

Cancellation rules

Users can cancel while status is PENDING, MLRO_REVIEW, or CO_SIGNED:
After SUBMITTED the tx is already in the mempool — cancel is not possible. Response:

Audit trail

Every transition writes an immutable row to withdrawal_events: CREATED, AML_PASSED, AML_FLAGGED, MLRO_APPROVED, MLRO_REJECTED, BACKEND_COSIGNED, SUBMITTED, CONFIRMED, REVERTED, USER_CANCELLED, REJECTED. The table has NO_UPDATE / NO_DELETE PG rules enforcing append-only semantics. GET /api/me/withdrawals/{id}/events returns the full lifecycle audit stream:
kind is one of created, auto_approved, mlro_approved, mlro_rejected, cosigned, broadcast, confirmed, reverted, cancelled, rejected. actor is the EOA for user-initiated transitions, system for back-office workflows, or chain for the chain-watcher that flips SUBMITTED → CONFIRMED. Use this endpoint for any compliance audit trail — GET /api/me/withdrawals/{id} only returns the head state.