A crypto investment app may function smoothly during normal market conditions but face significant challenges during a liquidity shock. When market liquidity disappears, investors may encounter execution prices far from the displayed quote, partial order fills, and exchange outages that leave transaction statuses uncertain.
During a liquidity shock, buying or selling interest declines sharply, leading to orders that consume several price levels or remain unfilled. For example, an investor selling $20,000 worth of cryptocurrency might see portions of the order executed at lower prices if buyers withdraw their orders. Key issues include slippage, partial fills, and exchange outages, which can overlap and create transaction risks.
Developers can test slippage by simulating reduced market depth, wider spreads, and delayed execution reports. Testing should verify weighted average execution prices, investor warnings, and configured price protections. Partial fills require applications to accurately record executed quantities, remaining quantities, fees, and reserved funds. Testing should include delayed execution reports, duplicate messages, and cancellations after partial execution.
Exchange outages create uncertainty about order statuses. Applications must use persistent order identifiers, controlled retries, and reconciliation to prevent duplicate transactions. A stress test should combine market disruption with interrupted transaction processing to ensure execution prices reflect available liquidity and balances remain accurate.