{
  "schema_version": "1.0.0",
  "record_id": "dn-next42-20261205-q39",
  "record_version": "1.0.0",
  "title": "A Lightning channel can have liquidity but no free HTLC slots",
  "canonical_url": "https://decentralised.news/lightning-htlc-slot-count-liquidity-capacity",
  "evidence_type": "documentary_analysis_with_synthetic_worked_example",
  "source_review_date": "2026-12-05",
  "last_verified_utc": null,
  "observation_window": null,
  "methodology_url": "https://decentralised.news/lightning-htlc-slot-count-liquidity-capacity",
  "methodology_version": "1.0.0",
  "input_schema": {
    "columns": [
      "scenario",
      "max_htlc_count",
      "pending_htlc_count",
      "free_slots_count",
      "usable_liquidity_sats",
      "max_inflight_sats",
      "current_inflight_sats",
      "inflight_headroom_sats",
      "new_part_sats",
      "maximum_new_parts_count"
    ],
    "rows_file": "https://decentralised.news/data/dn-next42-20261205/v1/q39.csv"
  },
  "units": {
    "definition": "Units are named in the CSV columns, manuscript and calculation labels. Do not combine quantities without resolving their dimensions."
  },
  "sources": [
    {
      "id": 1,
      "title": "BOLT 2: Peer protocol",
      "url": "https://github.com/lightning/bolts/blob/master/02-peer-protocol.md",
      "reviewDate": "2026-12-05",
      "supports": "Directional max_accepted_htlcs and max_htlc_value_in_flight_msat; 483 versus 114 channel-type ceilings.",
      "evidenceType": "Protocol specification"
    },
    {
      "id": 2,
      "title": "BOLT 4: Onion routing",
      "url": "https://github.com/lightning/bolts/blob/master/04-onion-routing.md",
      "reviewDate": "2026-12-05",
      "supports": "Temporary channel failures can include too many in-flight HTLCs but are not unique to that cause.",
      "evidenceType": "Protocol specification"
    },
    {
      "id": 3,
      "title": "LND ChannelAcceptor API",
      "url": "https://api.lightning.community/api/lnd/lightning/channel-acceptor/index.html",
      "reviewDate": "2026-12-05",
      "supports": "Separate maximum HTLC count, in-flight value and reserve configuration fields.",
      "evidenceType": "Official documentation"
    }
  ],
  "calculations": [
    {
      "label": "Count-bound modeled capacity",
      "expression": "min(30-29,int(500000/10000),int((1000000-200000)/10000))",
      "expected": 1
    },
    {
      "label": "Value-bound modeled capacity",
      "expression": "min(30-10,int(500000/10000),int((300000-280000)/10000))",
      "expected": 2
    },
    {
      "label": "Liquidity-bound modeled capacity",
      "expression": "min(30-10,int(15000/10000),int((1000000-200000)/10000))",
      "expected": 1
    },
    {
      "label": "Part conversion to millisatoshis",
      "expression": "10000*1000",
      "expected": 10000000
    }
  ],
  "example": {
    "synthetic": true,
    "description": "Original DN synthetic worked example. All scenario inputs are hypothetical; no live transaction, return, quote or account is represented. Model Lightning HTLC count, in-flight value and directional liquidity separately; the smallest bound can stop a payment despite an available balance.",
    "rows": [
      [
        "count_bound",
        30,
        29,
        1,
        500000,
        1000000,
        200000,
        800000,
        10000,
        1
      ],
      [
        "value_bound",
        30,
        10,
        20,
        500000,
        300000,
        280000,
        20000,
        10000,
        2
      ],
      [
        "liquidity_bound",
        30,
        10,
        20,
        15000,
        1000000,
        200000,
        800000,
        10000,
        1
      ],
      [
        "equal_bounds",
        30,
        20,
        10,
        100000,
        300000,
        200000,
        100000,
        10000,
        10
      ]
    ]
  },
  "limitations": [
    "Examples use declared invented inputs, not observed fills, customer outcomes, provider rankings or predictive backtests.",
    "Source-review date is not a measurement time, publication date of the source or assurance that terms will remain current.",
    "Documentation does not establish individual access, legal eligibility, service reliability or investment suitability."
  ],
  "falsification_or_recheck_triggers": [
    "Changed governing document or applicable software version.",
    "Evidence of different account, product, timing, unit or legal-entity scope.",
    "An arithmetic error or reproducible counterexample to the stated mechanism."
  ],
  "rights": {
    "original_DN_analysis": "Cite Decentralised News, the canonical URL and record version when reusing this worked example.",
    "third_party_sources": "Third-party material remains subject to its original terms. Linking does not grant redistribution rights."
  },
  "commercial_disclosure": "This article includes a link to DN’s own separately scoped research service. No provider purchase is required to use the example.",
  "corrections": []
}
