Skip to main content

LP Withdrawal Cooldown & Queue Management

1. Purpose & Scope

This section specifies the LP Withdrawal Cooldown and Queue Management system for the Ratio FX Engine. LPs deposit stablecoins into single-sided pools (USDT, IDRX, MYRC, tnSGD) and receive kTokens representing their share. When LPs withdraw, they burn kTokens and receive the underlying stablecoin.

Without controls, sudden or large withdrawals can drain pool liquidity, degrade execution quality, force emergency rebalancing, and destabilise the entire FX Engine.

This document introduces a three-layer withdrawal protection system: minimum lock periods (cooldowns) per pool, a withdrawal queue gated by pool health checks, and large withdrawal handling with advance notice and tranche execution. It also specifies the withdrawal source architecture, which isolates the Active Pool from all LP withdrawals.

Critical Design Principle: Active Pool Isolation

The Active Pool is NEVER debited by LP withdrawals. It exists solely to serve user swaps and is the execution pool for the FX Engine. LP withdrawals are sourced exclusively from the Reserve Pool (for small withdrawals) and the Yield Pool (for large withdrawals or when Reserve is stressed).

This isolation ensures that LP withdrawal activity cannot degrade user swap execution quality, cannot trigger false State Engine signals, and cannot introduce false inventory skew readings. The Active Pool remains clean and predictable at all times.

2. Dependencies

DependencySourceRequired For
kToken Rebasing ModelVault Contract (Liquidity Index)LP share tracking; fee/yield accrual during cooldown and queue wait
Reserve Pool BalanceVault ContractSmall withdrawal source; health gate checks
Yield Pool BalanceYield EngineLarge withdrawal source; recall speed depends on deployment strategy
State Engine OutputFX Engine, Layer 6Queue pauses on RESTRICT/HALT
Reserve Pool VaRReserve Pool VaRQueue pauses when VaR > 80%
Phase 1 SettlementFX Engine, Layer 9Reserve Pool must maintain capacity for Phase 1 duties

3. The Problem: Uncontrolled LP Withdrawals

3.1 Bank-Run Risk in Thin EM Pools

In traditional finance, bank runs occur when depositors simultaneously demand their money, overwhelming the institution's liquid reserves. DeFi liquidity pools face the same risk: if multiple LPs withdraw simultaneously, the pool drains faster than it can replenish.

For Ratio's EM stablecoin pools (IDRX, MYRC), this risk is amplified because pool depth is shallower than USDT/tnSGD, replacement liquidity is harder to source (minting IDRX through issuers takes time; external sourcing via RFQ is expensive for EM stablecoins), and a single large LP may represent a significant percentage of total pool TVL.

3.2 Cascade Failure Scenario

Without withdrawal controls, the following cascade can occur:

StepEventImpact
1Large LP withdraws $200K from IDRX poolReserve Pool IDRX drops significantly
2Reserve Pool can no longer fully serve Phase 1 settlementActive Pool imbalances persist longer; skew spikes to maximum
3State Engine detects inventory stressMoves to PROTECT or RESTRICT; spreads widen; quotes degrade
4Other LPs see degraded performanceConfidence drops; more LPs initiate withdrawals
5Reserve Pool drains furtherPhase 1 settlement fails; Active Pool cannot be rebalanced
6State Engine moves to HALTNo quotes issued on USD-IDR and MYR-IDR corridors
7Emergency RFQ firesExternal sourcing at unfavourable rates; high COGS; realised losses

The withdrawal cooldown and queue system breaks this cascade at Step 1 by controlling the rate and source of withdrawals.

4. Flow Diagram

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