Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ratiofx.com/llms.txt

Use this file to discover all available pages before exploring further.

Atomic Settlement

Every FX swap on Ratio settles atomically on the Kaia blockchain. Both sides of the trade execute in a single transaction — the source pool debit and the destination pool credit happen simultaneously. Either both complete or neither does. There is no settlement risk window, no partial fills, and no counterparty exposure.

How it works

Settlement Comparison When you execute a firm quote, the following four steps complete in a single transaction on Kaia:
1

Source pool debit

The source stablecoin (e.g., USDT) is debited from the source liquidity pool.
2

Destination pool credit

The destination stablecoin (e.g., IDRX) is credited to the destination address you specified.
3

Fee collection

Swap fees are collected and distributed to the protocol treasury, pool LPs, and the global fee pool — all in the same transaction.
4

On-chain record

The transaction is recorded on-chain with full auditability: amounts, rates, timestamp, and counterparty addresses.
Kaia uses Byzantine Fault Tolerant (BFT) consensus, which provides sub-second finality. Once a transaction is confirmed, it is final and irreversible — no reorgs, no probabilistic confirmation, no waiting for multiple block confirmations.

What you receive after settlement

After a swap settles, the API response includes:
FieldDescription
tx_hashThe on-chain transaction hash. Independently verifiable on any Kaia block explorer.
settled_atThe UTC timestamp of settlement confirmation.
filled_rateThe actual execution rate achieved.
You can use tx_hash as the single source of truth for reconciliation. The on-chain record is immutable and does not require cross-referencing with Ratio’s systems.

Why atomic settlement matters

Traditional cross-border FX carries a well-known risk called Herstatt risk — the danger that one counterparty delivers their currency but the other fails to deliver. This risk exists because traditional FX settlement happens across different systems, time zones, and clearing houses, often with T+1 or T+2 delays.
Atomic settlement on Kaia eliminates Herstatt risk entirely. There is no window where one party has delivered and the other has not — both sides settle simultaneously in the same transaction.
For your integration, this means:
  • Zero counterparty risk — No exposure between trade execution and settlement.
  • No T+ delays — Settlement is immediate, not next-day or two-day.
  • No partial fills — A swap either completes fully or reverts entirely. You never end up in a half-settled state.
  • No reconciliation overhead — The on-chain transaction record is the single source of truth. You do not need to cross-reference internal ledgers with a counterparty’s records.
  • Full auditability — Every settlement is permanently recorded on-chain and available to auditors, regulators, and your compliance team.

Settlement finality

Kaia’s BFT consensus provides immediate, deterministic finality. Unlike proof-of-work chains — where finality is probabilistic and requires waiting for multiple confirmations — a Kaia transaction is final as soon as it is included in a block. This means Ratio can confirm settlement to you in under one second, with absolute certainty that the transaction will not be reversed.
Execution is irreversible. Once a firm quote is executed, the swap cannot be unwound. Make sure you have reviewed the quote — including the rate, amounts, and destination address — before calling the execute endpoint. See Firm Quotes for how to lock and confirm a quote before execution.

Cross-currency corridors

For corridors without a direct oracle feed (e.g., MYR↔IDR), Ratio constructs a reference rate using USD as a pricing anchor — computing the MYR/IDR rate from the USD/IDR and USD/MYR oracle feeds. This is purely a rate calculation. No actual USD conversion takes place. You swap directly between MYRC and IDRX in a single atomic transaction, just like any other corridor. The USD anchor is used only to derive a fair mid-rate.