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
| Priority | Component | Dependency |
|---|---|---|
| P1 | FX Engine & State Engine | Active Pool feeds FX swaps; State Engine signals affect deposit acceptance |
| P3 | Inventory Skew | Active Pool isolation ensures clean skew readings |
| P4 | Smart Rebalancing | Reserve→Active rebalancing triggers; Yield Pool recall on deficit |
| P5 | LP Withdrawal | Withdrawal 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
- Active Pool starts empty (balance = 0).
- LP deposits flow into Reserve (and Yield for Class B) per routing logic.
- Reserve Pool balance crosses the minimum threshold for triggering a rebalance to Active.
- Smart Rebalancing detects Active Pool deficit and initiates internal settlement.
- Reserve Pool sends capital to Active Pool up to Active's target balance.
- Active Pool is now live and can service FX swap requests.
- 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.