← Back to Router Design Hub

External USDC Transfer: System Architecture

Visualizing the interfacing between Source ADA, Payment Router, Treasury Ledger, and Destination.

1. Component Architecture

This diagram shows the structural relationships between the internal platform services and the external execution environment.

flowchart TD subgraph Upstream["Upstream Context"] BusSys[External Business System] end subgraph Platform["Core Platform"] API[Payment Instruction API] Router{Payment Orchestration Router} Ledger[(Treasury Accounting Ledger)] Recon[Reconciliation & Webhooks] subgraph ADAService["Account of Digital Asset (ADA)"] SrcADA[Source ADA
Customer USDC Liab.] end end subgraph External["External Ecosystem"] Circle[Circle API / Base Rail] DestADA[Destination External Wallet] end BusSys -->|1. Creates Instruction| API API -->|2. Requests Decision| Router Router -->|3. Triggers Reservation| Ledger Ledger -.->|4. Reclassifies Balance| SrcADA API -->|5. Submits Tx| Circle Circle -->|6. Settles On-Chain| DestADA Circle -->|7. Status Webhook| Recon Recon -->|8. Finalizes Accounting| Ledger

2. Event Sequence & State Handoff

This sequence illustrates the exact timeline of state changes, ledger journal entries, and balance updates.

sequenceDiagram autonumber participant API as Payment API participant ADA as Source ADA participant Router as Payment Router participant Ledger as Treasury Ledger participant Circle as Circle API Note over API, Ledger: State: CREATED API->>Router: Resolve Route (USDC, Region: US) Router-->>Router: Evaluate Policies & Telemetry Router->>Ledger: Winner: RC_CIRCLE_ONCHAIN_BASE Note over API, Ledger: State: ROUTE_RESOLVED Ledger->>Ledger: Debit: Customer USDC - Available
Credit: Customer USDC - Reserved Ledger->>ADA: Update Balance: Move to Reserved API->>Circle: Submit On-Chain Transfer ($500) Note over API, Ledger: State: PENDING_PROVIDER Ledger->>Ledger: Debit: Customer USDC - Reserved
Credit: Settlement Transit Liability Ledger->>ADA: Update Balance: Move to Pending Outbound Circle-->>Circle: Execute Blockchain Tx to Dest ADA Circle-->>API: Webhook: Terminal Success Note over API, Ledger: State: CONFIRMED API->>Ledger: Reconcile Tx Ledger->>Ledger: Debit: Settlement Transit Liability
Credit: Circle Custody USDC Asset Ledger->>ADA: Update Balance: Clear Pending

Detailed Interfacing Breakdown

Step 1 & 2

Routing & Decision

Interface: Payment API ↔ Router

The business system injects a transfer request. The Router intercepts this instruction, evaluates real-time telemetry (liquidity, cost, latency), and selects the external Circle on-chain rail. The Source and Destination ADAs are simply context variables at this stage.

Step 3 & 4

Reservation & Handoff

Interface: Router ↔ Ledger ↔ Source ADA

Once the route is decided, the Router triggers the Ledger. The Ledger posts the first journal entry, shifting funds internally from Available to Reserved. The Source ADA balance is updated to reflect that funds are locked, preventing double-spending.

Step 5 & 6

External Execution

Interface: API ↔ Circle ↔ Ledger

The API fires the transaction to Circle. Simultaneously, the Ledger debits the reserved liability and credits a Settlement Transit Liability. The funds are now mathematically marked as "in flight" to the Destination ADA outside the platform.

Step 7, 8 & 9

Reconciliation & Final Settlement

Interface: Circle ↔ Reconciliation ↔ Ledger ↔ Source ADA

Circle completes the blockchain transfer to the external Destination ADA and sends a webhook to the platform. The Reconciliation service verifies the transaction hash and amount. Finally, the Ledger clears the Settlement Transit Liability and officially reduces the platform's actual Circle Custody Asset. The Source ADA removes the pending outbound amount, completing the lifecycle.