LNhance

A soft fork proposal for bitcoin.

This upgrade involves 4 significant technological changes or concepts to improve bitcoin’s scalability, privacy, and flexibility.

Learn More View Github

LNhance combines 4 total opcodes:

And repurposes 2 NOPs in all script types plus 2 SUCCESSes in Tapscript only

  • OP_CHECKTEMPLATEVERIFY

    Allows creating predictable, template-based transactions, helping with scaling by making complex multi-step transactions easier to validate.

  • OP_CHECKSIGFROMSTACK

    Verifies a digital signature from data already on the stack instead of only on hashed transaction data, adding flexibility.

  • OP_PAIRCOMMIT

    Pops two elements off the stack, then concatenates them along with their size commitments and takes the "PairCommit" tagged SHA256 hash of that concatenated string, then pushes the resulting hash back on the stack.

  • OP_INTERNALKEY

    Makes the key used for taproot key spends also available for use in script spends and enables efficient alternative spend paths for lightning and other constructions.

The combination of these opcodes enables many enhancements for the Lightning Network, along with enabling other off chain UTXO sharing protocols such as Ark.




Concretely, this upgrade enables LN-Symmetry, Timeout Trees, simplified PTLC scripts, unidirectional non-interactive channels, vaults (better than now), trustless coin pools, plus much more.
View More Details

Features

The LNhance upgrade involves the 4 significant technological changes or concepts found below to improve bitcoin’s scalability, privacy, and flexibility

LN-Symmetry

Currently all Lightning Channels are Asymmetric, meaning that the Update and Settlement Transactions are not mirrored perfectly between counterparties. Alice and Bob both have their own versions of the channel and if someone tries to cheat their counterparty, their counterparty can submit a Justice Transaction to swipe the funds. Symmetry Channels share the state of the channel and does away with the justice transaction concept.

Non-Interactive Channels

Currently all Lightning Channels require interactivity to create and to maintain. Now you'll have the ability to create channels asynchronously so that you can create a channel with your counterparty while they're offline, and if you're also offline, a third party can do it for the both of you. This will work with both asymmetry and symmetry channels.

Payment Pools / Channel Factories

Currently all Lightning Channels require their own transaction footprint on-chain. Sharing UTXO's is not a new concept but for the most part, only custodians are privy to this ability since they don't require Bitcoin Script to control funds. For Bitcoin Script, sharing UTXO's requires a Unilateral Exit scheme. This means if there's a group of 10 people inside a UTXO, each of them should have a means of trustlessly ejecting from the UTXO without anyone's consent. A Payment Pool is the most basic scheme for sharing UTXO's and to have a Unilateral Exit. A Payment Channel is a Payment Pool that incorporates Channels into the Payment Pool. There are further models that can be done such as Hierarchical Channels [Channels within Channels], or Timeout-Trees [Hierarchical Channels that incorporate timeout periods that reduces interactivity requirements].

Vaults (better than now) / Bigger Arks

These opcodes let vaults enforce specific spending conditions, such as time delays or multi-signature setups, that can be implemented in a lighter, more modular way. This functionality provides users with control over complex, secure vault setups without increasing the size and complexity of transaction scripts and in turn even enables larger Arks with reduced interactivity. Additionally, the OP_INTERNALKEY opcode can help reduce data storage needs, making vaults more compact and adaptable to advanced requirements like non-interactive and programmable multi-step authorization.

Team

There are many people contributing to the LNhance proposal but below are the main 2 developers

Image

Brandon Black (Reardencode)

Developer
Image

4moonsettler

Developer