← All Recipes
Bazantic // Recipe

Uniswap Pool Safety Analysis

By Ignacio Pastor

uniswap-pool-safety-analysis

Is this Uniswap pool actually safe to LP? Compares how much a pool can really absorb, from a live Uniswap QuoterV2 depth ladder (Turnstile Liquidity Analyst), against what it holds on chain right now (Spectrum token balances and prices). Returns the largest trade that fills within 1% slippage as a share of on-chain TVL, with Turnstile's rating, confidence and caveats.

Recipe inputs
Complete fields before a run.
Ethereum mainnet Uniswap V3 or V4 pool contract address (0x format)
Output example
Representative published output.
{
  "pool": {
    "name": "Uniswap v3 USDC/WETH 0.3%",
    "address": "0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8",
    "network": "ethereum-mainnet",
    "feeTierPct": 0.3
  },
  "finding": {
    "formula": "usable depth (<=1% slippage, Turnstile live QuoterV2) / on-chain TVL (Spectrum balances x Turnstile priceUSD)",
    "interpretation": "Only 3.09% of the capital the pool holds is reachable within 1% slippage; the remaining ~97% sits outside the active tick range and is not fee-earning depth at the current price.",
    "onchain_tvl_usd": 32356828.27,
    "reachable_depth_usd": 1000000,
    "reachable_depth_to_onchain_tvl_pct": 3.0905,
    "comparison_ratio_vs_subgraph_tvl_pct": 3.0553
  },
  "disclaimer": "Signal only, not investment advice.",
  "onchain_tvl": {
    "legs": [
      {
        "token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "symbol": "USDC",
        "decimals": 6,
        "price_usd": 1,
        "value_usd": 13319677.525883,
        "price_source": "Turnstile analystInput.pool.tokens (dollar stablecoin)",
        "spectrum_balance": "13319677.525883",
        "spectrum_balance_raw": "13319677525883"
      },
      {
        "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "symbol": "WETH",
        "decimals": 18,
        "price_usd": 2578.191382206443,
        "value_usd": 19037150.75,
        "price_source": "Turnstile analystInput.pool.tokens (subgraph-lastPriceUSD)",
        "spectrum_balance": "7383.916834081396732559",
        "spectrum_balance_raw": "7383916834081396732559"
      }
    ],
    "source": "Spectrum getTokenBalance, chain=ethereum, read at current block",
    "total_usd": 32356828.27
  },
  "resolution_note": "Where the live quote and the balances disagree about what the pool can absorb, the QuoterV2 quote at block 25955477 governs. In concentrated liquidity a ~3% depth-to-TVL ratio is normal, but it means headline TVL overstates fee-earning depth by roughly 32x.",
  "turnstile_verdict": {
    "rating": "ACCEPTABLE",
    "caveats": [
      "USD notionals on the depth ladder were sized using the subgraph's own derived price for WETH ($2.6k). For a pool whose price the subgraph derives from this same pool, that is circular — the token amounts quoted are exact, the dollar labels on them are only as good as that price."
    ],
    "summary": "Uniswap v3 USDC/WETH 0.3% looks safe to LP on the evidence available. Reserves are genuinely two-sided, live quotes execute at the sizes tested, and the fee return is realized rather than projected. Confidence 95%.",
    "confidence": 0.95,
    "attestation": {
      "note": "Reproducible but not yet attested. MOV-227 runs assess() over exactly this input inside a Chainlink TEE and returns the attestation here.",
      "status": "unattested"
    }
  },
  "subgraph_claimed_tvl": {
    "source": "turnstile-uniswap-v3-messari (Studio)",
    "direction": "subgraph overstates on-chain TVL",
    "subgraph_block": 25955476,
    "claimed_tvl_usd": 32729724.6410258,
    "onchain_tvl_usd": 32356828.27,
    "per_token_drift": [
      {
        "delta": -183080.534003,
        "symbol": "USDC",
        "delta_pct": -1.3559,
        "spectrum_balance": 13319677.525883,
        "subgraph_balance": 13502758.059886
      },
      {
        "delta": -73.542526259878,
        "symbol": "WETH",
        "delta_pct": -0.9862,
        "spectrum_balance": 7383.916834081397,
        "subgraph_balance": 7457.459360341275
      }
    ],
    "absolute_gap_usd": 372896.37,
    "gap_pct_of_onchain": 1.1525,
    "subgraph_lag_seconds": 15
  },
  "largest_trade_within_1pct_slippage": {
    "direction": "WETH -> USDC",
    "full_ladder": [
      {
        "notional_usd": 1000,
        "slippage_pct": 0,
        "ticks_crossed": 1,
        "amount_out_usdc": 995.440016
      },
      {
        "notional_usd": 10000,
        "slippage_pct": 0.006,
        "ticks_crossed": 1,
        "amount_out_usdc": 9953.790236
      },
      {
        "notional_usd": 100000,
        "slippage_pct": 0.067,
        "ticks_crossed": 1,
        "amount_out_usdc": 99476.950642
      },
      {
        "notional_usd": 1000000,
        "slippage_pct": 0.676,
        "ticks_crossed": 3,
        "amount_out_usdc": 988715.743055
      },
      {
        "notional_usd": 10000000,
        "slippage_pct": 9.776,
        "ticks_crossed": 57,
        "amount_out_usdc": 8981222.137667
      }
    ],
    "notional_usd": 1000000,
    "slippage_pct": 0.676,
    "executed_rate": 2549.0984081962406,
    "amount_in_weth": 387.8688009360227,
    "quote_provider": "quoter-v2 (0x61fFE014bA17989E743c5F6cB21bF9697530B21e via ethereum-rpc.publicnode.com)",
    "amount_out_usdc": 988715.743055,
    "next_rung_fails": {
      "notional_usd": 10000000,
      "slippage_pct": 9.776,
      "initialized_ticks_crossed": 57
    },
    "quoted_at_block": 25955477,
    "initialized_ticks_crossed": 3
  }
}