Someone setting up a hardware wallet for the first time, packaging on desk, laptop with wallet interface, afternoon home office light, casual unboxing moment.
Protocols

BOLT 3: Commitment Transaction Format

Security-critical specification defining the structure of commitment transactions, HTLC outputs, and revocation mechanisms that enforce Lightning channel state.
introduction
COMMITMENT TRANSACTION FUNDAMENTALS

Why BOLT 3 Defines Channel Security

BOLT 3 is the cryptographic core of the Lightning Network, defining the commitment transaction format that enforces the economic relationship between channel peers.

BOLT 3 specifies the exact structure of commitment transactions, the asymmetric on-chain contracts that allow two parties to unilaterally close a Lightning channel at any time. Each peer holds a different version of the commitment transaction, signed by the counterparty, which spends from the shared 2-of-2 multisig funding output. The format dictates how the channel balance is split into outputs, how pending HTLCs are represented as scripts, and how revocation keys are constructed to penalize a party that attempts to broadcast an old, invalid state.

The security of the entire Lightning Network depends on the precise implementation of these scripts. A deviation in the construction of an HTLC output—whether a time-locked OP_CHECKSEQUENCEVERIFY condition or the structure of the revocation key path—can lead to a direct loss of funds. The introduction of option_anchor_outputs and the migration to Taproot-based channels with PTLCs represent a fundamental shift in this format, moving from a complex ECDSA-based script structure to a more efficient and private Schnorr-based design using MuSig2 and point time locked contracts.

For hardware wallet integrators, custody providers, and node implementers, BOLT 3 is not a static document but a live security surface. Every change to the commitment transaction format requires a full security review of the signing logic, transaction monitoring systems, and key-management infrastructure. Chainscore Labs can perform a targeted security review of commitment transaction handling, assess the impact of a Taproot migration on your signing infrastructure, and validate that your revocation and penalty mechanisms remain sound against the latest specification.

COMMITMENT TRANSACTION IMPACT MATRIX

BOLT 3 at a Glance

Evaluates the operational and security impact of the commitment transaction format on key system actors.

ActorImpactAction

Node Implementers

Must correctly construct and validate commitment transactions, including HTLC scripts, to_self_delay, and revocation key derivation.

Verify implementation against the canonical BOLT 3 test vectors for all script types.

Custody Providers

Handling of revocation secrets and penalty mechanics is critical for fund safety; incorrect implementation leads to total loss.

Perform a security audit of key derivation, signing, and state management logic.

Hardware Wallet Integrators

Signing for commitment transactions requires parsing complex, non-standard output scripts and understanding revocation logic.

Validate that the signing device correctly interprets and displays the transaction being authorized.

Watchtower Operators

Must parse commitment transactions to detect revoked states and construct penalty transactions.

Update monitoring logic to support new output formats and ensure penalty transactions are valid.

Liquidity Providers (LSPs)

Channel open and close flows depend on the structure of the funding and commitment outputs.

Review how commitment output types affect channel reserve requirements and fee management.

Security Auditors

The commitment format is the primary attack surface for channel breaches and fund theft.

Focus review on state machine transitions, revocation key handling, and HTLC timeout/claim paths.

Payment Processors

Invoice settlement finality relies on the correct resolution of HTLCs within the commitment transaction lifecycle.

Monitor for changes to HTLC script construction that could affect payment success or failure detection.

technical-context
CHANNEL SECURITY PRIMITIVE

Commitment Transaction Structure and Revocation

The asymmetric commitment transaction format that enables unilateral channel closure while penalizing the broadcast of an old state, forming the core security mechanism of the Lightning Network.

BOLT 3 defines the exact structure of commitment transactions, the Bitcoin transactions that represent the current balance distribution of a Lightning channel. Each channel partner holds a different version of the commitment transaction: one that pays their own balance immediately but encumbers the counterparty's balance with a revocation key. This asymmetric construction is the protocol's primary defense against state fraud. When a party attempts to broadcast an old, more favorable commitment transaction, the counterparty can use the now-revealed revocation key to claim the entire channel balance as a penalty. The specification details the precise script templates for to_local, to_remote, and offered/received HTLC outputs, including the OP_CHECKSEQUENCEVERIFY (CSV) delay that gives the honest party time to react.

The format is parameterized by option_anchor_outputs and option_static_remotekey, which alter the script patterns and key derivation. Under option_static_remotekey, the to_remote output uses a fixed public key, simplifying recovery for the remote party. Anchor outputs, when negotiated, add zero-value outputs to enable Child-Pays-For-Parent (CPFP) fee bumping, changing the transaction weight calculation and the dust limits for HTLCs. Implementers must handle the commitment transaction's nLockTime and nSequence fields correctly, as they interact with CSV delays and the ordering of HTLC timeouts. A single off-by-one error in CSV enforcement or an incorrect dust threshold comparison can lead to unrecoverable funds or a failure to penalize a cheating counterparty.

For hardware wallet integrators, custody providers, and security engineers, the commitment transaction format is the most security-critical component of a Lightning implementation. The revocation key derivation, which uses a shachain of per-commitment secrets, requires precise state machine management: losing the ability to generate the correct revocation secret for a broadcasted old state means losing the penalty mechanism entirely. Chainscore Labs can perform a targeted security review of commitment transaction handling, including validation of script template construction, CSV delay enforcement, dust limit edge cases, and the correct implementation of the revocation key derivation path. For teams planning a migration to Taproot channels with MuSig2 and PTLCs, Chainscore provides an impact assessment covering the new output types, the removal of the revocation key in favor of a symmetric design, and the operational changes required for watchtowers and signing devices.

IMPACT BY OPERATOR TYPE

Who Is Affected by BOLT 3 Changes

Core Protocol Developers

Changes to the commitment transaction format require direct modification of the Lightning node's state machine and transaction construction logic. This is the most security-critical code in any implementation.

Immediate actions:

  • Audit the new commitment output scripts, ensuring correct handling of to_local, to_remote, and HTLC outputs.
  • Update the revocation key derivation and penalty transaction construction to match the new format.
  • Verify that the new commitment transaction weight is correctly calculated for fee estimation.

A single off-by-one error in the output ordering or a misinterpretation of the option_anchors zero-fee HTLC pattern can lead to unrecoverable fund loss. Chainscore Labs can perform a targeted security review of your updated commitment transaction handling, including differential analysis against the BOLT 3 specification and existing implementations.

implementation-impact
COMMITMENT TRANSACTION SECURITY

Key Implementation Impact Areas

BOLT 3 defines the exact format of commitment transactions, HTLC scripts, and revocation mechanisms. Implementation errors here lead to direct fund loss, making this the highest-stakes specification in the Lightning stack.

03

Transaction Fee and Dust Limit Handling

Commitment and HTLC transaction fees are subtracted from the funder's output, requiring precise calculation to avoid underpayment or overpayment that could delay confirmation or make the transaction non-standard. Outputs below the dust_limit_satoshis are not produced on-chain but are instead trimmed and added to miner fees. Implementers must handle trimmed HTLCs correctly: a trimmed output that is later needed for a penalty transaction must still be spendable via the revocation path, which requires special-case logic in the signing engine.

06

Weight Calculation and SIGHASH Flags

Commitment transactions use SIGHASH_ALL for non-anchor outputs and SIGHASH_SINGLE|SIGHASH_ANYONECANPAY for anchor outputs. Incorrect sighash flags can make signatures invalid or allow unintended modification of other outputs. The transaction weight must be pre-calculated to determine the fee, but the final weight depends on the number of HTLCs and whether they are trimmed. Implementers must validate that their weight estimation matches the final signed transaction exactly, as a mismatch can cause the commitment transaction to be rejected by the Bitcoin network.

COMMITMENT TRANSACTION SECURITY AND OPERATIONAL IMPACT

BOLT 3 Risk Matrix

Evaluates the security-critical risks, failure modes, and operational impacts arising from the commitment transaction format defined in BOLT 3, affecting node operators, wallet developers, and custody providers.

Risk AreaFailure ModeSeverityAffected ActorsMitigation and Action

Revocation Key Handling

Loss or leakage of revocation secret leads to theft of channel funds by a counterparty publishing an old state.

Critical

Node Operators, Wallet Developers, Custody Providers

Verify secure key derivation (BIP32 path), storage, and deletion logic. Implement watchtower support for outsourced monitoring.

HTLC Output Construction

Incorrect script construction for offered/received HTLCs leads to unspendable outputs or loss of funds during unilateral closes.

Critical

Node Implementers, Security Engineers

Strictly validate HTLC output scripts against the canonical BOLT 3 specification. Perform differential fuzzing against other implementations.

Transaction Fee Calculation

Inadequate commitment transaction fees cause the transaction to be stuck below mempool minimums, preventing timely channel closure.

High

Node Operators, LSPs

Implement dynamic fee bumping via anchor outputs or CPFP carve-out. Monitor mempool congestion and adjust channel fee reserves proactively.

to_self_delay Configuration

Setting the CSV delay too low exposes the counterparty to rapid theft; setting it too high locks funds for an unacceptable duration.

Medium

Node Operators, Wallet UX Teams

Calibrate to_self_delay based on watchtower response time and operational security. Document trade-offs for end-users.

Dust Limit Exposure

HTLCs below the dust limit are trimmed to miner fees, creating a loss vector that can be exploited by an attacker to steal small amounts.

Medium

Routing Node Operators

Set a conservative dust_limit_satoshis to minimize value at risk. Monitor for dust-trimming griefing patterns on active channels.

Commitment Transaction Format Migration

Incorrect handling of new commitment formats (e.g., anchor outputs, Taproot channels) leads to force-closes or loss of funds during upgrades.

High

Node Operators, Wallet Developers

Perform a phased rollout of new format support. Ensure backward compatibility and test unilateral closes on testnet before mainnet deployment.

Watchtower Integration Gap

A watchtower fails to parse a new commitment format, leaving a channel unmonitored and vulnerable to an old-state broadcast.

High

Watchtower Operators, Mobile Wallet Devs

Verify watchtower compatibility with every new commitment transaction format before activation. Audit the client-watchtower interface for completeness.

BOLT 3 COMMITMENT TRANSACTION SECURITY

Implementation Review Checklist

A technical checklist for engineering teams implementing or upgrading commitment transaction handling. This review focuses on the security-critical components of BOLT 3, including output construction, revocation key derivation, and HTLC script management, which are common sources of fund-loss vulnerabilities.

What to check: Verify that the revocation basepoint derivation and the construction of revocationpubkey strictly follow the BOLT 3 specification using the correct per_commitment_point.

Why it matters: Incorrect derivation of the revocation key allows a counterparty to broadcast an old, revoked state without penalty, leading to a total loss of channel funds. This is the most critical security mechanism in Lightning.

Readiness signal: The implementation must pass test vectors for derive_revocation_pubkey and derive_revocation_privkey. The revocation secret must be stored securely and deleted immediately after a new commitment is signed, ensuring it is never persisted alongside the state it penalizes.

Chains We Build On

Looking to build on a specific blockchain?

We build smart contracts, DeFi applications, wallets, tokenization platforms, and blockchain infrastructure across the major ecosystems teams choose today. That includes Ethereum, Arbitrum, Optimism, Polygon, Avalanche, Solana, Sui, Aptos, Hedera, Stellar, and NEAR, with support for additional EVM and non-EVM networks based on your product requirements.

EVM ecosystems

  • Ethereum logo
    Ethereum
  • Arbitrum logo
    Arbitrum
  • Optimism logo
    Optimism
  • Polygon logo
    Polygon
  • Avalanche logo
    Avalanche
  • Cronos logo
    Cronos

Non-EVM ecosystems

  • Solana logo
    Solana
  • Sui logo
    Sui
  • Aptos logo
    Aptos
  • Hedera logo
    Hedera
  • Stellar logo
    Stellar
  • NEAR logo
    NEAR

Additional ecosystems

  • Polkadot logo
    Polkadot
  • Cosmos logo
    Cosmos
  • TON logo
    TON
  • Cardano logo
    Cardano
  • Algorand logo
    Algorand
  • Tempo logo
    Tempo

Also available for Base, appchains, custom EVM networks, and cross-chain product architecture.

COMMITMENT TRANSACTION FAQ

Frequently Asked Questions

Answers to common operational and security questions about BOLT 3 commitment transaction formats, HTLC scripts, and revocation mechanisms.

The format relies on the ability of a party to revoke old state. This is achieved through a revocation key mechanism where each party holds a secret that, once revealed, allows the counterparty to claim all funds from a broadcasted old commitment transaction. The security model assumes that a node never loses its revocation secrets and that its watchtower or monitoring system can detect and react to a breach within the CSV (CheckSequenceVerify) delay window.

Trusted by Industry Leaders

Delivering blockchain solutions for 5+ years.

We have partnered with 50+ leading DeFi protocols, NFT ecosystems, and fintech innovators to build secure, scalable, and capital-efficient blockchain products.

Selected Partners & Clients

ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
ChainVote logo
Reax logo
Sokail logo
Swapsicle logo
SyntheX logo
Tekika logo
Telos logo
Zexe logo
“I've been working with Chainscore Labs for last 3+ years, they've consistently delivered with strong ownership across multiple projects. The team is reliable and detail-oriented.”
L
Lee Erswell
CEO, Telos Foundation
how to get started

How to get started?

If you're looking for blockchain integration, ChainScore Labs has 5+ years of experience helping teams build and integrate exchanges, wallets, smart contracts, tokenization solutions, and protocol-connected products, we can help you choose the right path, integrate securely, and get to production faster. Our team consists of experienced blockchain developers and architects who can help you with your blockchain integration needs.

01

Exploration & Strategy

Define your product goals and choose the right blockchain architecture for your use case.

02

Architecture & Design

Design the smart contracts, tokenomics, and security parameters of your system.

03

Development & Integration

Build and integrate with wallets, oracles, and front-end dApps for a seamless experience.

04

Security & Launch

Comprehensive audits followed by a risk-managed mainnet deployment to protect your users.

Start a build

Need a blockchain engineering team?

Send the project context and we will respond with next steps, scope questions, and a practical path to delivery.