A reserve stress test changes a defined part of pool state and recalculates the intended trade. State what is held constant. Otherwise, the result can mix a liquidity withdrawal with a market-price move and obscure which risk was tested.
A proportional-withdrawal scenario
Assume a hypothetical fee-free constant-product pool begins with 100,000 units of each asset. Test a fixed 1,000-unit input while reducing both reserves proportionally:
| Remaining reserves per side | Output | Average-rate shortfall |
|---|---|---|
| 100,000 | 990.099010 | 0.990099% |
| 75,000 | 986.842105 | 1.315789% |
| 50,000 | 980.392157 | 1.960784% |
| 25,000 | 961.538462 | 3.846154% |
The starting one-for-one price is held constant. The worsening result therefore comes from less depth in this model.
Interpret a cost limit
If the chosen average-rate shortfall ceiling is 2%, the 50,000-reserve scenario remains just within it and the 25,000 scenario exceeds it. That is a conditional finding, not an estimate of how likely either withdrawal is.
The calculation uses the constant-product structure. It excludes fees, rounding, separate costs and changes to route selection.
Adapt the stress to the pool type
For concentrated liquidity, remove or reduce the positions along the relevant execution path rather than multiplying every token balance by one factor. For a stable-asset pool, use its actual invariant and scaling parameters.
Keep market-price stress in another scenario or explicitly combine it. Report the state changes, quote or model method and resulting output bounds. A stress table is useful because it makes assumptions testable; it should not be presented as a forecast that liquidity providers will withdraw a particular amount or that a current quote will survive that withdrawal.
Sources & verification (1)
Source-check date is recorded in the article details. URLs are provided for manual verification. Use Copy to keep this page open.
- Uniswap v2 Core
Invariant, reserve accounting and historical protocol design; do not repeat obsolete activation status.
https://uniswap.org/whitepaper.pdf