LNHANCE

A proposed soft-fork bundle adding covenants and signature-checking opcodes to make Lightning and vaults more capable.

Basically

LNHANCE is a proposed upgrade to Bitcoin, known as a soft fork. It bundles OP_CTV, OP_CHECKSIGFROMSTACK, and OP_INTERNALKEY to improve Lightning and vaults.

Key Takeaways

  • LNHANCE is a Bitcoin soft fork proposal that bundles three opcodes: OP_CHECKTEMPLATEVERIFY (BIP 119), OP_CHECKSIGFROMSTACKVERIFY (BIP 348), and OP_INTERNALKEY (BIP 349). It aims to bring practical improvements to Lightning and off-chain protocols.
  • The combined opcodes provide capabilities that no single opcode achieves alone: LN-Symmetry channels, trustless covenant constructions, more efficient discreet log contracts, and congestion control through transaction templates.
  • LNHANCE takes a more targeted approach than broader proposals such as OP_CAT. It focuses on concrete, well-understood use cases with minimal changes to Bitcoin's consensus rules.

What Is LNHANCE?

LNHANCE is a proposed Bitcoin soft fork that packages three new opcodes into a single activation bundle. Bitcoin protocol developers Brandon Black (reardencode) and 4moonsettler created the proposal. LNHANCE aims to give Bitcoin Script the minimum set of new capabilities needed to greatly improve Lightning Network channel management, vault constructions, and multi-party protocols.

The name reflects the proposal's core motivation: enhancing the Lightning Network. Each opcode has standalone value, but their combination unlocks protocol designs that none can achieve individually. LNHANCE repurposes existing no-operation (NOP) opcodes in legacy script types and SUCCESS opcodes in Tapscript, following the same backwards-compatible upgrade path as previous soft forks.

How It Works

LNHANCE introduces three opcodes, and each one fills a different gap in Bitcoin Script's current capabilities. Each opcode has a distinct role before they combine into more powerful constructions.

OP_CHECKTEMPLATEVERIFY (BIP 119)

OP_CHECKTEMPLATEVERIFY (CTV) allows a UTXO to commit to the exact transaction that will spend it. The opcode computes a SHA-256 hash of specific transaction fields: version, locktime, input count, sequences hash, output count, outputs hash, and the index of the spending input. The spend is valid if the hash matches the template on the stack.

The result is what developers call a transaction template: a predetermined spending path that cannot be altered after the UTXO is created. CTV enables congestion control by batching many payments into a single on-chain transaction that later expands, as well as simple vaults and non-interactive channel opens.

OP_CHECKSIGFROMSTACKVERIFY (BIP 348)

OP_CHECKSIGFROMSTACKVERIFY (CSFS) verifies a Schnorr signature against an arbitrary message provided on the stack, rather than against transaction data. It pops three elements: a 32-byte public key, a message, and a signature, then validates them using BIP 340 Schnorr verification.

Standard Bitcoin signature opcodes like OP_CHECKSIG can only verify signatures over the spending transaction itself. CSFS removes this limitation, enabling scripts that verify signatures over any data. The capability is a building block for oracle-based contracts, delegated spending authority, and state updates in off-chain protocols.

OP_INTERNALKEY (BIP 349)

OP_INTERNALKEY pushes the 32-byte x-only representation of the Taproot internal key onto the stack. A standard P2TR output embeds the internal key in the output's public key, but a script cannot access it directly. OP_INTERNALKEY makes it available.

OP_INTERNALKEY saves approximately 8 virtual bytes per script that needs access to the internal key, since the key would otherwise have to be duplicated in the script itself. The opcode also enables collaborative spending constructions where the MuSig2 aggregate key used as the internal key can participate in script-path conditions.

How the Opcodes Combine

The opcodes work together because CTV alone can commit to a transaction template but cannot update it after creation. CSFS allows a signature to authorise a new template, creating updatable commitments. OP_INTERNALKEY lets the Taproot key-path signers also participate in these script conditions without duplicating key data.

The combination enables LN-Symmetry (formerly eltoo): CTV commits to a channel state, a CSFS-verified signature authorises state transitions, and OP_INTERNALKEY allows efficient reference to the channel participants' aggregate key. The result is a channel construction where all states are equally valid and the latest state always wins. Penalty transactions are no longer needed.

LN-Symmetry Channels

Current Lightning channels use a penalty mechanism: if a counterparty broadcasts an old state, the other party can claim all funds as punishment. The mechanism works but requires storing every prior state and introduces complex justice transaction logic. LN-Symmetry replaces it with a simpler model where any party can publish any state, and newer states can always override older ones through a brief challenge period.

LNHANCE enables LN-Symmetry by combining CTV to template each state transaction, CSFS to authorise state updates with signatures over state data, and OP_INTERNALKEY to reference the channel key-path. The design reduces storage requirements and simplifies Lightning channel implementations. Research on PTLCs and the next evolution of Lightning explores how this changes Lightning protocol design.

Non-Interactive Channel Opens

Lightning channel opens currently require both parties to be online and actively coordinate. CTV allows a sender to construct a transaction that opens a channel to a recipient without the recipient being online. The transaction template commits to the channel's funding output structure, so the recipient can begin using the channel whenever they come online.

Channel factories and timeout trees benefit greatly because a single on-chain transaction can open dozens or hundreds of channels simultaneously. CSFS allows these constructions to support state updates, making them far more practical than CTV-only designs.

Efficient Vaults

Vaults are a covenant pattern where funds require a time-delayed withdrawal process: the owner initiates a withdrawal, waits through a challenge period, and then completes it. The owner or a watchtower can claw back unauthorised withdrawals to a recovery address during the waiting period.

LNHANCE enables vault constructions using CTV to template the withdrawal transaction and CSFS to authorise clawback signatures. The dedicated OP_VAULT proposal (BIP 345) provides a more specialised vault opcode, while LNHANCE-based vaults offer a general-purpose alternative using composable primitives. Research on Bitcoin script vaults provides a detailed comparison of vault designs.

Discreet Log Contracts

Discreet log contracts (DLCs) enable trustless bets on real-world outcomes using oracle signatures. Current DLC implementations require a separate adaptor signature for every possible outcome, which becomes expensive for contracts with many outcomes, such as price feeds with thousands of possible values.

CSFS allows DLCs to verify oracle signatures directly in script rather than relying on pre-computed adaptor signatures for each outcome. The setup cost falls from O(n) signatures to a constant-size script, making DLCs with large outcome spaces practical. Research on discreet log contracts on Bitcoin provides background on DLC mechanics.

Congestion Control

CTV enables a single transaction to commit to a tree of future transactions during periods of high on-chain demand. A payment processor or exchange can batch hundreds of withdrawals into one on-chain transaction that expands into individual payments over time as block space becomes available. Recipients receive a cryptographic guarantee of eventual settlement without needing immediate block inclusion.

LNHANCE vs. Other Proposals

LNHANCE is one of several Bitcoin covenant proposals. Comparisons with alternatives clarify its design philosophy. Research on Bitcoin covenants explained and the OP_CAT covenant debate provides comprehensive coverage of the covenant debate.

Standalone CTV

CTV on its own (BIP 119) enables transaction templates, vaults, and congestion control, but it cannot support updatable state. CSFS is needed to authorise new templates after the initial commitment, so CTV alone cannot enable LN-Symmetry or interactive covenant constructions. LNHANCE adds CSFS and OP_INTERNALKEY to fill this gap, turning static templates into dynamic, updatable protocols; research on OP_CTV and Check Template Verify covers CTV's standalone capabilities.

OP_CAT

OP_CAT takes a broader approach by enabling arbitrary data concatenation on the stack. This single opcode, combined with existing opcodes, can emulate many covenant patterns, including recursive covenants and validity proofs. OP_CAT's generality also raises concerns because it enables constructions whose security implications are difficult to analyse and could affect Bitcoin's fungibility through complex spending conditions.

LNHANCE proponents argue that their approach is more targeted: each opcode solves a specific, well-understood problem, and the combined capabilities are bounded and predictable. OP_CAT advocates counter that a single general-purpose opcode is simpler to reason about than multiple special-purpose ones. The two proposals are not mutually exclusive, and some developers advocate activating both.

APO (SIGHASH_ANYPREVOUT)

SIGHASH_ANYPREVOUT (BIP 118) is another proposal that enables LN-Symmetry by allowing signatures that do not commit to the specific input being spent. APO achieves rebindable transactions through a new sighash flag rather than new opcodes. LNHANCE achieves similar goals through CTV plus CSFS, with different tradeoffs: LNHANCE additionally enables vaults and congestion control, while APO has a simpler implementation for the specific case of channel state updates.

Current Status

LNHANCE has no scheduled activation date as of mid-2026. All three opcodes are available for testing on Bitcoin Inquisition, the dedicated testing framework for proposed consensus changes. The proposal has been implemented as a Bitcoin Core pull request (PR #29198) for review.

Community sentiment is generally positive among developers who prioritise practical Lightning improvements. Debate continues over whether the three-opcode bundle represents the right scope and whether alternative formulations like BIP 446 (OP_TEMPLATEHASH) and BIP 448 offer a cleaner design. Developers also debate what level of tooling and proof-of-concept implementations should exist before activation is considered.

The broader covenant activation discussion remains one of Bitcoin's most active areas of protocol development. Layer 2 protocols like Spark, Ark, and Lightning would all benefit from the capabilities LNHANCE provides, creating strong demand-side pressure for some form of covenant support.

Activation Uncertainty

Bitcoin's consensus change process is deliberately slow and conservative, and Taproot, the last successful soft fork, took years from proposal to activation. LNHANCE faces the additional challenge of bundling three separate BIPs, each of which must be individually reviewed and accepted. There is no guarantee that all three will be activated together, or at all.

Bundle Scope Debate

Some developers argue that LNHANCE bundles too many changes, making review more complex. Others argue it bundles too few and that additional opcodes like OP_CAT should be included. The right scope for a consensus change bundle is inherently political as well as technical because different stakeholders prioritise different use cases.

Interaction with Future Proposals

LNHANCE activation does not preclude future covenant proposals, but it does influence the design space. Future proposals can build on CSFS rather than reimplementing signature verification if it is activated. This composability is a design goal, but it also means the choice of which opcodes to activate first shapes the long-term evolution of Bitcoin Script.

Implementation Complexity

The individual opcodes are relatively simple, but the protocols they enable, including LN-Symmetry, vaults, and DLCs, are complex systems that require significant engineering effort to build, test, and deploy. Activating the opcodes is only the first step: the practical limitations of Bitcoin Script mean that translating opcode capabilities into production software takes years of additional development.

The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.

0

← All 1876 glossary terms