Skip to content

Pool Health

Pool Health primitives answer “is this pool safe to deposit into?” by surfacing on-chain liquidity, activity, and concentration signals.

V2/V3-focused in v2.0 — the framing (concentration risk, swap-history-derived activity, threshold-based rug detection) is most natural on constant-product binary pools. Weighted and amplified pools have their own risk surfaces (covered under Risk).

  • CheckPoolHealth — pool-level snapshot (TVL, reserves, LP count, fee activity).
  • DetectRugSignals — threshold-based rug-pull detector composed over CheckPoolHealth.
  • DetectFeeAnomaly — V2-only invariant-vs-contract fee-discrepancy check via a synthetic test trade.
ProtocolCoverageNotes
Uniswap V2FullCheckPoolHealth, DetectRugSignals, DetectFeeAnomaly all V2-supported.
Uniswap V3PartialCheckPoolHealth and DetectRugSignals work; DetectFeeAnomaly is V2-only (blocked on UniV3Helper.quote hard-coded fee — see cleanup backlog). num_swaps and fee_accrual_rate_recent are V2-only on CheckPoolHealth because V3 lacks per-swap history.
BalancerN/ALP concentration, swap activity, and rug signals don’t map cleanly to weighted-pool semantics where TVL is shares-based and concentration is a different question; v1 keeps the category Uniswap-focused.
StableswapN/ASame as Balancer; the at-peg / off-peg framing of stableswap risk is captured by AssessDepegRisk under Risk instead.

V3 fee-anomaly support unblocks once the upstream UniV3Helper.quote fix lands.

In the curated v2.0 set: CheckPoolHealth, DetectRugSignals. Not in: DetectFeeAnomaly (niche V2-only forensic check; LLMs rarely need invariant-vs-contract divergence as a first-pass tool).