Skip to main content

Liquidity Onboarding & Routing Engine

1. Executive Summary

This section defines the architecture for Ratio FX's Liquidity Onboarding and Routing Engine — the system that governs how LP deposits enter the protocol, how capital is classified by intent, and how funds are routed across the three-tier pool architecture (Active, Reserve, Yield).

The core innovation is the introduction of Liquidity Intent Classes, which allow the protocol to accommodate fundamentally different LP motivations (FX-only issuers vs. yield-seeking LPs) within the same pool infrastructure, while maintaining separate risk profiles, fee tiers, and accounting indices.

Key Design Decisions

  • Each deposit is one class: LPs who want both Class A and Class B exposure make two separate deposits. No splitting within a single deposit.
  • Admin-configurable thresholds: All pool capacity limits, split ratios, and overflow rules are set by admin. No dynamic auto-adjustment.
  • Custom fee tiers per partner: Class A (FX-only) LPs like stablecoin issuers receive configurable fee tiers, separate from the standard 30% LP share.

2. Dependencies

PriorityComponentDependency
P1FX Engine & State EngineActive Pool feeds FX swaps; State Engine signals affect deposit acceptance
P3Inventory SkewActive Pool isolation ensures clean skew readings
P4Smart RebalancingReserve→Active rebalancing triggers; Yield Pool recall on deficit
P5LP WithdrawalWithdrawal sources from Reserve (standard) and Yield (large); cooldown per deposit ledger

3. Active Pool Bootstrapping

A critical design decision: LP deposits never flow directly into the Active Pool. The Active Pool is populated exclusively via rebalancing from the Reserve Pool. This separation ensures that Active Pool composition is controlled by the rebalancing engine, not by deposit timing or LP behaviour.

Bootstrap Sequence

  1. Active Pool starts empty (balance = 0).
  2. LP deposits flow into Reserve (and Yield for Class B) per routing logic.
  3. Reserve Pool balance crosses the minimum threshold for triggering a rebalance to Active.
  4. Smart Rebalancing detects Active Pool deficit and initiates internal settlement.
  5. Reserve Pool sends capital to Active Pool up to Active's target balance.
  6. Active Pool is now live and can service FX swap requests.
Why This Matters
  • Clean Active Pool: The Active Pool only receives capital through a controlled rebalancing mechanism, never raw deposits. This keeps the State Engine signals, inventory skew readings, and FX execution clean.
  • No LP deposit timing risk: If a large deposit went directly to Active, it could temporarily distort pool ratios and affect pricing until the next rebalance cycle. Reserve-first routing eliminates this.
  • Consistent with withdrawal isolation: Just as withdrawals are sourced from Reserve/Yield and never drain Active directly, deposits fill Reserve/Yield and never inflate Active directly.

4. Flow Diagram

100% · Ctrl+Scroll to zoom · Drag to pan