# LNHANCE bips and implementation

**URL:** <https://delvingbitcoin.org/t/lnhance-bips-and-implementation/376>\
**Category:** Protocol Design\
**Created:** [January 7, 2024, 6:40pm UTC](https://delvingbitcoin.org/t/lnhance-bips-and-implementation/376 "2024-01-07T18:40:08Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![moonsettler](https://delvingbitcoin.org/user_avatar/delvingbitcoin.org/moonsettler/32/38_2.png) [@moonsettler](https://delvingbitcoin.org/u/moonsettler)\
**Post date:** [January 8, 2024, 10:21am UTC](https://delvingbitcoin.org/t/lnhance-bips-and-implementation/376/8 "2024-01-08T10:21:44Z")

</div>

indeed. LN-symmetry is an other big thing it enables. (will try to dig up the contract, pretty sure someone already laid it out) it won’t do everything APO can, and that’s on purpose. just the most important things that are highly desired.

edit:

```plaintext
# S = 500000000
# IK -> A+B
<sig> <state-n-hash> | CTV IK CSFSV <S+1> CLTV

```

before funding sign first state template:

```plaintext
# state-n-hash { nLockTime(S+n), out(contract, amount(A)+amount(B)) }
# settlement-hash { nSequence(2w), out(A, amount(A)), out(B, amount(B)) }

# contract for state n < m
IF
  <sig> <state-m-hash> | CTV IK CSFSV <S+n+1> CLTV
ELSE
  <settlement-hash> CTV
ENDIF

```

`CLTV` ensures only a larger `nLockTime` transaction can spend the current on-chain state, the relative timelock for the last co-signed state’s `CTV` distribution is committed to in the `settlement-hash`

---

_[View the full topic](https://delvingbitcoin.org/t/lnhance-bips-and-implementation/376)._
