> For the complete documentation index, see [llms.txt](https://dev.hybrid-chain.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.hybrid-chain.com/guides/financial-infrastructure/on-chain-fx-settlement.md).

# On-Chain FX Settlement

**Overview:** Enable real-time, secure, and fully-auditable foreign exchange (FX) transactions between banks, treasuries, enterprises, or fintech operators. Hybrid-Chain allows you to issue digital currency tokens, anchor real-world stablecoins, and conduct instant swaps across multiple Layer-1 chains using cryptographically signed proof and ledger reconciliation—paving the way for the next generation of cross-border financial infrastructure.

**Platform Benefits:** Hybrid-Chain solves major FX pain points such as settlement delays, counterparty risk, reconciliation complexity, and off-chain messaging. With its multi-layer architecture, operators can create bilateral or multilateral FX corridors with atomic settlement and deterministic auditability. Vaults, margin wallets, and token whitelisting ensure compliance and minimize operational exposure.

**Integration Flow:**

1. **Establish participating parties:**
   * Register institutional users and verify onboarding/KYC through your own gateway or via Hybrid-Chain Whitelabel Admin
   * Assign Layer-1 vaults and Hybrid-Vaults for each participating currency and user
2. **Issue or onboard stablecoins/tokens:**
   * Use `TokenCreate()` to mint FX tokens (e.g., USDX, EURX)
   * Or onboard already-issued stablecoins via token whitelisting (e.g., USDC, USDT, EURC)
3. **Set up FX pairings and corridors:**
   * Define trading pairs (e.g., USDX/EURX) and assign liquidity pools, vaults, or margin control logic
   * Configure token decimals, spread logic, and transfer permissions
4. **Initiate and execute FX swaps:**
   * Use `CreateFXSwap()` API (custom wrapper) to match and lock counterparties’ funds
   * Confirm ledger-level receipt of both assets before settlement is marked complete
   * Settlements can occur:
     * Directly to vaults (Layer-1 delivery)
     * Internally within Hybrid-Wallets (Layer-2 fast-path)
5. **Ledger Reconciliation and Auditing:**
   * Every FX settlement is logged as a cryptographically signed transaction by indexers and core validators
   * Status updates available via `GetFXTransactionStatus()` or admin dashboard views
   * Discrepancy alerts, multi-party confirmations, and external audit hooks supported

**Optional Add-ons:**

* **Time-locked trades:** Require confirmation within X minutes or auto-cancel
* **Partial swaps & liquidity providers:** Allow third-party LPs to fulfill FX pools via smart routing
* **On-ramp and off-ramp support:** Integrate with fiat providers for end-to-end conversion
* **SWIFT/MQ-style message mirroring:** Send hybrid confirmations to legacy infrastructure
* **Regulatory hooks:** Auto-notify or pre-authorize trades via regulatory or compliance nodes

**Note:** FX operations may be regulated under national currency exchange laws or central bank settlement policies. Ensure appropriate licensing and regulatory clearance in operating jurisdictions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://dev.hybrid-chain.com/guides/financial-infrastructure/on-chain-fx-settlement.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
