Skip to main content

Inventory Skew & Dynamic Mid-Rate Adjustment

1. Purpose & Scope

This section specifies how the Ratio FX pricing engine adjusts the mid-rate in real time based on inventory position, so that organic user flow naturally rebalances the Active Pool before internal (Phase 1) or external (Phase 2) rebalancing is required.

It covers the skew calculation formula, per-corridor calibration, State Engine and VaR integration, arbitrage safety, and the on-chain implementation specification.

Design Philosophy

In traditional FX market-making, the single most effective tool for managing inventory risk is skewing the mid-rate. Rather than widening the spread symmetrically (which deters all flow equally), a skewed mid-rate makes the beneficial direction of flow cheaper and the harmful direction more expensive.

This attracts the exact flow the book needs without penalising the overall market. It is the most capital-efficient tool for managing inventory risk, and it is how institutional FX dealers manage their books.

For Ratio on Kaia, this mechanism directly reduces the frequency and volume of external rebalancing (Phase 2 RFQ/OTC), which reduces cost-of-goods-sold (COGS), improves WAOP tracking, and increases net spread revenue retained by LPs.

2. Dependencies

DependencySourceRequired For
Oracle Aggregated MidFX Engine, Layer 5Base mid-rate before skew
Oracle Freshness FlagFX Engine, Layer 5Skew zeroed on stale oracle
State Engine OutputFX Engine, Layer 6Skew caps per state
Active Pool BalanceVault ContractCurrent inventory position
Target Balance RatioCorridor ConfigNeutral reference point
VaR Threshold StatusReserve Pool VaREmergency skew amplification

3. Core Concepts

3.1 What Is Mid-Rate Skewing?

Every FX quote has a mid-rate (the fair value anchor) and a spread (the execution cost around it). In a symmetric model, the mid equals the oracle price and the spread widens or narrows. In a skewed model, the mid itself is shifted away from the oracle price before the spread is applied.

The direction of the shift is determined by the protocol's Active Pool inventory position. If Ratio holds too much of one stablecoin (e.g., long IDRX), the mid is pulled in the direction that makes it cheaper for users to take that stablecoin off Ratio's books, and more expensive for users to add more of it.

3.2 Skew vs. Spread — Institutional FX Analogy

On a bank FX desk, a trader who is long EUR/USD will shade their price lower (offering a better price to clients who want to buy EUR, which reduces the trader's long position). The trader does not simply widen their spread, because that would deter both buyers and sellers equally.

Ratio applies the same logic on-chain. The inventory skew offset shifts the Adjusted MID, which means one side of the quote becomes more attractive while the other becomes less attractive. The spread (Base + Volatility + Liquidity components) is then applied symmetrically on top of this shifted mid.

Why Skew the MID, Not Just the Spread?

Widening the spread symmetrically deters all flow equally — both the flow you want and the flow you don't want. Skewing the mid-rate makes the beneficial direction of flow cheaper and the harmful direction more expensive, without penalising the overall market.

This is more capital-efficient, produces better user outcomes, and reduces the need for external rebalancing.

3.3 The Pricing Pipeline (Recap from FX Engine)

For context, the full pricing construction pipeline from the FX Engine (Layer 7) is:

StepOperationOutput
1Oracle Aggregation (Pyth 50% + Orakl 50%)Oracle MID
2Inventory Skew Calculation (this document)Skew Offset (bps)
3Mid-Rate AdjustmentAdjusted MID = Oracle MID ± Skew Offset
4Spread ConstructionBID = Adjusted MID − Half Spread · ASK = Adjusted MID + Half Spread

This document specifies Steps 2 and 3 in full detail.

4. Flow Diagram

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