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.

Cross-border payment flows are inherently directional. Morning remittance flows might push USD→IDR while afternoon commerce flows push IDR→USD. Over any period, one direction typically dominates, creating inventory imbalances. Ratio’s rebalancing system ensures pools stay healthy and corridors remain available — automatically, without manual intervention.

The two-phase model

Two-Phase Rebalancing Ratio separates the user experience (instant settlement) from inventory management through a two-phase model:
Every user swap settles instantly against the protocol’s liquidity pools. The user receives their destination stablecoin in under one second. At this point, the swap is complete from the user’s perspective.Phase 1 is what partners and end users see — fast, atomic, predictable.

How rebalancing triggers work

The system monitors each pool’s balance relative to its target and responds with increasing urgency:
1

Mild imbalance

The pricing engine adjusts the mid-rate via inventory skew, naturally attracting offsetting flow. No external action needed.
2

Moderate imbalance

The system coordinates with external market makers via RFQ (Request for Quote) to source needed liquidity. Pool availability is maintained throughout.
3

Severe imbalance

The system escalates to emergency sourcing, recalls liquidity from yield strategies, and may restrict trading to the rebalancing direction only.
Each corridor has independently configured thresholds, allowing the system to respond differently to imbalances in deep G10 corridors versus thinner emerging-market corridors.

Time-of-day awareness

Rebalancing is aware of market hours and trading patterns. The system distinguishes between:
  • Peak hours — When bilateral flow offsets are likely. Rebalancing is more patient, waiting for natural correction.
  • Off-peak hours — When external rebalancing may be needed sooner.
  • Holidays — Market holiday calendars for each jurisdiction are factored in.
This prevents premature rebalancing during periods when natural offsets are expected — reducing external costs.

Self-stabilising design

Multiple mechanisms work together to create a self-stabilising system:

Inventory-aware pricing

Attracts offsetting flow before external action is needed.

Tiered thresholds

Escalates response proportionally to imbalance severity.

Yield recall

Provides additional liquidity without relying on external markets.

Cooldown periods

Prevents over-rebalancing by spacing out external actions.
The result is a system that handles the natural ebb and flow of cross-border payments automatically — maintaining pool health while minimising cost.