1. Component Architecture
This diagram shows the structural relationships between the internal platform services and the external execution environment.
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.
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
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.
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.
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.
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.