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.
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
| Dependency | Source | Required For |
|---|---|---|
| kToken Rebasing Model | Vault Contract (Liquidity Index) | LP share tracking; fee/yield accrual during cooldown and queue wait |
| Reserve Pool Balance | Vault Contract | Small withdrawal source; health gate checks |
| Yield Pool Balance | Yield Engine | Large withdrawal source; recall speed depends on deployment strategy |
| State Engine Output | FX Engine, Layer 6 | Queue pauses on RESTRICT/HALT |
| Reserve Pool VaR | Reserve Pool VaR | Queue pauses when VaR > 80% |
| Phase 1 Settlement | FX Engine, Layer 9 | Reserve 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:
| Step | Event | Impact |
|---|---|---|
| 1 | Large LP withdraws $200K from IDRX pool | Reserve Pool IDRX drops significantly |
| 2 | Reserve Pool can no longer fully serve Phase 1 settlement | Active Pool imbalances persist longer; skew spikes to maximum |
| 3 | State Engine detects inventory stress | Moves to PROTECT or RESTRICT; spreads widen; quotes degrade |
| 4 | Other LPs see degraded performance | Confidence drops; more LPs initiate withdrawals |
| 5 | Reserve Pool drains further | Phase 1 settlement fails; Active Pool cannot be rebalanced |
| 6 | State Engine moves to HALT | No quotes issued on USD-IDR and MYR-IDR corridors |
| 7 | Emergency RFQ fires | External 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.