What is Nostr?
CJP [ARCHIVE] /
npub13q8…uzdm
2023-06-09 12:46:50
in reply to nevent1q…064c

CJP [ARCHIVE] on Nostr: 📅 Original date posted:2016-10-10 📝 Original message: I can think more clearly ...

📅 Original date posted:2016-10-10
📝 Original message:
I can think more clearly when no one is talking, so I took advantage of
the evening to work out my fee proposal in more detail. :-)

A deposits into channel, as a way of paying B.
Amount to be paid to B: 1.000 BTC
Extra amount stored in channel: 1.997 BTC
Fee required for commit tx: 0.003 BTC

Anchor tx output size: 3.000 BTC
Commit tx outputs:
to A: 1.997 BTC
to B: 1.000 BTC
fee: 0.003 BTC


Next, A makes microtx to B:
Amount to be paid to B: 0.500 BTC
Extra fee required for HTLC: 0.001 BTC

Commit tx outputs while tx is locked:
to A: 1.497 BTC
HTLC: 0.499 BTC
to B: 1.000 BTC
fee: 0.004 BTC
Commit tx outputs when tx is released to B:
to A: 1.497 BTC
to B: 1.500 BTC
fee: 0.003 BTC
Commit tx outputs if tx were returned to A:
(just like before tx was locked)


Next, B makes microtx to A:
Amount to be paid to A: 1.000 BTC
Extra fee required for HTLC: 0.001 BTC

Commit tx outputs (while tx is locked):
to A: 1.497 BTC
HTLC: 0.999 BTC
to B: 0.500 BTC
fee: 0.004 BTC
Commit tx outputs (if tx is released to A):
to A: 2.497 BTC
to B: 0.500 BTC
fee: 0.003 BTC
Commit tx outputs (if tx is returned to A):
(just like before tx was locked)

So, summarizing the algorithm:
* Initially, the channel creator pays the fee (presumably, he has an
interest in creating the channel, and this is consistent with regular
BTC payments).
* Generally speaking, while using the channel, you're just shifting
around the non-fee part, without touching the fee itself.
* For as far as adding an HTLC requires extra fees (since it makes the
tx larger), that fee is deducted from the HTLC itself. Dust-sized txes
would create negative-size HTLCs; of course you'd just not create the
HTLC at even larger tx sizes (the fees of follow-up txes would not make
the HTLC worth the effort).

Not yet covered: how to change the fee size when on-blockchain fee
market conditions change.

Comments?

CJP
Author Public Key
npub13q863scgpsaanrjhfn7dd4h48lgnupgkcs828arzj4pckrq8hh6s4cuzdm