Lightning Network Anchor Outputs Explained: The Basics (Part 1)

Published: (February 19, 2026 at 11:43 PM EST)
7 min read
Source: Dev.to

Source: Dev.to

Welcome back, and thank you for being here to learn with me.

Recap: Part 1

  • Problem: Pre‑signed Lightning commitment transactions can have outdated fees by the time you need to broadcast them.
  • Solution: Anchor outputs let you boost fees later using CPFP (Child Pays For Parent).

What We’ll Cover in Part 2

  1. How CPFP really works – the mechanics at the Bitcoin protocol level.
  2. Why 330 sats? – the “magic number” explained.
  3. The one‑block delay (CSV) – why it’s crucial for security.
  4. What happens to your other outputs – a quick overview.
  5. Real‑world examples with actual numbers.

1. CPFP Mechanics

The basic idea

  • Miners want to maximize profit, so they fill each block with the highest‑fee transactions.
  • They consider transaction packages (parent + child) and compute a combined fee rate.

Example with real numbers

TransactionSize (vbytes)Fee (sats)Fee rate (sat/vbyte)
Parent (your commitment TX)2002001 sat/vbyte ❌ Too low
Child (spends the 330‑sat anchor)150120 000
Total package350120 530344 sat/vbyte
  • The child transaction cannot be confirmed until the parent is confirmed (it spends an output from the parent).
  • Miners must include both or neither, so the high fee in the child pulls the parent into the block.

2. Why 330 sats?

  1. Dust limit – Bitcoin rejects outputs that are too small to be economical.
    • Standard dust limit ≈ 546 sats.
  2. Anchor‑output script – a special script type with a lower dust limit of 330 sats, making it the smallest spendable output that isn’t considered dust.
  3. Consensus – All major Lightning implementations (LND, Core Lightning, Eclair, LDK) adopted 330 sats in the BOLT specifications, ensuring compatibility.

Why this number is “just right”

  • Small enough not to waste channel capacity.
  • Large enough to be recognized as a valid output and to cover the cost of a tiny child transaction.

The example below is truncated in the original draft; feel free to fill in the missing values as needed.

You have a Lightning channel:

  • Your balance: 5,0… (value continues in the original text)

(Continue the walkthrough with the actual numbers you wish to illustrate.)

TL;DR

  • CPFP works because miners evaluate the combined fee rate of parent + child packages.
  • 330 sats is the smallest non‑dust, spendable output for anchors, standardized across implementations.
  • A 1‑block CSV lock on all non‑anchor outputs prevents adversarial “pinning” attacks and gives you a safe window to bump fees.
  • Only anchor outputs are immediately spendable; everything else is delayed by one block for security.

Channel Overview

ItemAmount (sats)Amount (BTC)
Your balance5,000,0000.05 BTC
Partner balance3,000,0000.03 BTC
Your anchor330
Partner anchor330
Total channel capacity8,000,660

Your partner goes offline, so you must force‑close the channel to retrieve your funds.

1️⃣ Check the mempool fee market

  • Current fee rate: 250 sats/vbyte (high congestion)
  • Commitment transaction size: 220 vbytes
  • Required fee for confirmation: 220 × 250 = 55,000 sats

Problem: Your pre‑signed commitment transaction only includes a 440 sat fee (≈ 2 sats/vbyte). At the current market rate it would sit in the mempool for days or weeks.

2️⃣ Broadcast the commitment transaction

  • Fee paid: 440 sats (far too low)
  • Status: Unconfirmed, stuck in the mempool

3️⃣ Create a CPFP child transaction

ParameterValue
SpendsYour 330‑sat anchor output
Adds inputs60,000 sats from your on‑chain wallet
Creates outputSends to your wallet
Size180 vbytes
Fee54,560 sats (child) + 330 sats (anchor) = 54,890 sats

3.1 Calculate the package fee rate (parent + child)

  • Parent size: 220 vbytes
  • Child size: 180 vbytes
  • Total size: 400 vbytes
ComponentFee (sats)
Parent440
Child54,890
Total55,330
  • Package rate: 55,330 ÷ 400 ≈ 138 sats/vbyte

This is still below the required 250 sats/vbyte.

4️⃣ Re‑calculate the child fee to meet the market rate

  1. Target total fee: 400 vbytes × 250 sats/vbyte = 100,000 sats
  2. Parent already paid: 440 sats
  3. Child must pay: 100,000 – 440 = 99,560 sats

Create the child transaction with a 99,560 sat fee.

4.1 Final package

ItemFee (sats)
Parent440
Child99,560
Total100,000
  • Package rate: 100,000 ÷ 400 = 250 sats/vbyte

5️⃣ Confirmation & Cost Summary

  • Total on‑chain cost: 100,000 sats$130 USD (at $65 k/BTC)
  • Funds secured: 5,000,000 sats (0.05 BTC ≈ $3,250 USD)

Result: Paying the fee is worthwhile to recover your funds.

6️⃣ Fee Scenarios (illustrative)

Fee rate (sats/vbyte)Parent fee (220 vbytes)Child fee (180 vbytes)Total cost (USD)
51,100 sats (~$1.43)900 sats (~$1.17)≈ $2.60
20044,000 sats (~$57)36,000 sats (~$47)≈ $104 ⚠️
500110,000 sats (~$143)90,000 sats (~$117)≈ $260 💀

Force‑closing during high‑fee periods can be expensive, which is why Lightning encourages cooperative closes.

7️⃣ Why Anchor Outputs Matter

  • Without anchors you may be unable to close a channel during fee spikes (the parent transaction would never confirm).
  • With anchors you have the option to add fees via CPFP, giving you a path to recover funds.

Common Q&A

QuestionAnswer
Can I spend an anchor output more than once?No. Once an anchor is spent in a child transaction, it cannot be spent again. If that child still doesn’t confirm, you must create another child (a “grandchild”) that spends the first child – this is CPFP chaining.
Do both parties have separate anchors?Yes. Each side can create its own child transaction. Whichever child confirms first will pull the parent through, so either party can ensure confirmation.
What about the balance output?It has a 1‑block CSV lock. You must wait one block after the commitment transaction confirms before you can spend the balance output. Anchors can be spent immediately.
Can I use RBF to bump the fee?Not reliably. RBF requires cooperation from the other party (unlikely in a force‑close) and is vulnerable to pinning attacks. CPFP with anchors is the preferred method.

8️⃣ Key Take‑aways

  • CPFP mechanics: Miners evaluate the combined fee rate of parent + child, incentivizing them to confirm both.
  • 330 sats anchor: The minimum non‑dust spendable amount, standardized across Lightning implementations.
  • CSV lock: A 1‑block delay on balance outputs prevents transaction‑pinning attacks and gives a clean window for fee‑bumping.
  • Cost spectrum: From a few dollars in normal times to hundreds during extreme congestion – still cheaper than being stuck.
  • Economic incentive: High force‑close costs push users toward cooperative closes and reliable channel partners.

9️⃣ What’s Next? (Part 3 – Practical Guide)

  1. Check if your node supports anchor outputs (LND, Core Lightning, Eclair).
  2. Enable/disable anchor outputs in each implementation.
  3. Reserve funds: How much on‑chain Bitcoin to keep for emergency fee‑bumping.
  4. Tools & commands for monitoring anchor outputs and fee‑bumping.
  5. Step‑by‑step actions when a force‑close occurs.

We’ve moved from “what are anchor outputs?” (Part 1) → “how do they work?” (Part 2) → hands‑on usage (Part 3).

If any part of Part 2 was confusing, let me know—your feedback helps improve the explanations.

See you in Part 3!

CSV Lock (1‑Block Delay) on Balance Outputs Prevents Transaction Pinning Attacks

  • Only anchors can be spent immediately; all other outputs must wait 1 block.
  • Real costs vary from $3 to $200+ depending on network congestion.

Coming Next (Part 3)

  • Practical setup
  • Implementation guides
  • Reserve‑fund management

If you have any questions or feedback, drop them in the comments.

0 views
Back to Blog

Related posts

Read more »