Bitcoin’s Lightning Network revolutionized off-chain micropayments by enabling fast, low-cost transactions without burdening the main blockchain. One of the key technical parameters ensuring efficiency and economic viability in this second-layer protocol is the dust limit. This article explores what dust limits are, how they function across different output types, and their critical role in maintaining network health and scalability.
What Is a Dust Limit?
In Bitcoin and its layer-2 protocols like the Lightning Network, a dust limit defines the minimum value an output must have to be considered economically viable for inclusion in a transaction. Outputs below this threshold—called dust—are typically excluded because their transaction fees would exceed their value.
While Bitcoin’s consensus rules do not invalidate dust outputs, most node implementations (like Bitcoin Core) reject or ignore transactions containing them. In the context of the Lightning Network, each node sets a dust_limit_satoshis parameter, below which HTLC (Hashed Time-Locked Contract) outputs are omitted from commitment transactions.
👉 Discover how low-cost transactions are optimized on scalable networks.
Core Bitcoin Output Types and Their Dust Thresholds
The dust threshold varies depending on the script type due to differences in input and output size. The formula used by Bitcoin Core assumes a feerate of 3,000 satoshis per kilobyte (sat/kB):
Dust Threshold (sats) = (Output Size + Input Size) × 3
Below are common script types and their respective thresholds.
Pay-to-Pubkey Hash (P2PKH)
A P2PKH output uses 34 bytes:
- 8 bytes for amount
- 1 byte for script length
- 25 bytes for the locking script
A corresponding input requires at least 148 bytes due to signature and public key data.
Dust limit: (34 + 148) × 3 = 546 satoshis
Pay-to-Script Hash (P2SH)
P2SH outputs are slightly smaller at 32 bytes:
- 8 bytes for amount
- 1 byte for length
- 23 bytes for script
Inputs vary based on redeem scripts, but a conservative estimate uses 148 bytes.
Dust limit: (32 + 148) × 3 = 540 satoshis
Pay-to-Witness-Pubkey Hash (P2WPKH)
With SegWit optimization, P2WPKH reduces witness weight significantly:
- Output: 31 bytes
- Input (with witness discount): ~67 bytes
Dust limit: (31 + 67) × 3 = 294 satoshis
This reflects SegWit’s efficiency gains—nearly half the dust floor of legacy formats.
Pay-to-Witness-Script Hash (P2WSH)
P2WSH outputs take 43 bytes due to longer scripts:
- 8 bytes for amount
- 1 byte for length
- 34 bytes for witness program
Input size estimated at 67 bytes (witness-discounted).
Dust limit: (43 + 67) × 3 = 330 satoshis
Unknown SegWit Versions
For unknown SegWit versions (v1–v16), outputs can be up to 51 bytes:
- Up to 42-byte push after OP_n
Using same input estimate of 67 bytes:
Dust limit: (51 + 67) × 3 = 354 satoshis
These conservative thresholds prevent spam while allowing future flexibility.
Dust Management in Lightning Commitment Transactions
In the Lightning Network, commitment transactions represent the current state of a payment channel. They contain multiple outputs, including those paying to local and remote parties, HTLCs, and optional anchor outputs.
To optimize space and cost, any HTLC or output below the counterparty’s announced dust_limit_satoshis is omitted during transaction construction.
Weight Calculation for Commitment Transactions
Commitment transaction weight depends on:
- Number of HTLCs
- Use of optional features like
option_anchors
Base components:
- Funding input: 41 bytes
- Two main outputs (local/remote): 74 bytes total
- Per-HTLC output: 43 bytes
- Witness data: ~222 bytes
- Witness header: 2 bytes
After applying SegWit’s 4× multiplier to non-witness data:
- Without anchors: ~724 weight units (500 + 172×n HTLCs + 224 witness)
- With anchors: ~1,124 weight units (900 + 172×n HTLCs + 224 witness)
This impacts fee calculations and channel capacity planning.
HTLC Timeout and Success Transaction Weights
HTLCs enable routed payments through timelocks and preimages. Two resolution paths exist:
- HTLC-timeout: Sender reclaims funds after timeout.
- HTLC-success: Receiver redeems with preimage.
Each has distinct script logic and witness structures.
Script Sizes
- Accepted HTLC script: 140 bytes (143 with anchors)
- Offered HTLC script: 133 bytes (136 with anchors)
Witness Data
- Timeout witness: ~285 bytes
- Success witness: ~324 bytes (includes preimage)
Final Transaction Weight
After encoding:
- HTLC-timeout: 663 weight units (666 with anchors)
- HTLC-success: 703 weight units (706 with anchors)
Note: These values are slightly rounded up from exact calculations for historical compatibility.
These precise weights allow nodes to accurately estimate fees and avoid unprofitable routing attempts.
👉 Learn how advanced blockchain protocols manage transaction efficiency.
Why Dust Limits Matter for Network Health
Dust limits serve several crucial functions:
- Economic Rationality: Prevents spending more on fees than the output value.
- Chain Bloat Prevention: Reduces UTXO set growth, improving node performance.
- Routing Efficiency: Enables smaller HTLCs only when justified by channel economics.
- Spam Resistance: Discourages attackers from flooding channels with uneconomical outputs.
Nodes can adjust their dust_limit_satoshis, but too low a setting increases resource usage; too high limits micropayment granularity.
Frequently Asked Questions
Q: Can dust outputs ever be spent?
A: Yes, technically they are valid, but most wallets and nodes won't create or relay transactions that lose money after fees.
Q: How does SegWit reduce dust thresholds?
A: By separating witness data and applying a 75% discount to its size in fee calculations, reducing effective input cost.
Q: Do all Lightning nodes use the same dust limit?
A: No—each node announces its own dust_limit_satoshis. Channels adopt the less restrictive (lower) value.
Q: What happens if an HTLC is below the dust limit?
A: It is excluded from the commitment transaction entirely, simplifying settlement and saving fees.
Q: How do dust limits affect micropayments?
A: They set a practical lower bound—currently around 294–354 satoshis per output—below which payments cannot be reliably routed.
Q: Are dust limits hardcoded in Bitcoin?
A: Not in consensus rules. They're policy-level settings enforced by clients like Bitcoin Core and Lightning implementations.
Conclusion
Understanding dust limits is essential for developers, node operators, and users navigating Bitcoin’s layered architecture. From preventing economic waste to enabling scalable off-chain networks like Lightning, these thresholds balance usability, security, and efficiency.
As transaction patterns evolve and fee markets shift, dust policies may adapt—but their foundational role in preserving network integrity remains unchanged.
👉 Explore tools that help manage Bitcoin transaction costs effectively.