From rusty at rustcorp.com.au Tue Dec 12 01:25:47 2017 From: rusty at rustcorp.com.au (Rusty Russell) Date: Tue, 12 Dec 2017 11:55:47 +1030 Subject: [Lightning-dev] Directionality of the transaction fees In-Reply-To: References: <87wp1uxjh3.fsf@rustcorp.com.au> Message-ID: <87shcgu484.fsf@rustcorp.com.au> Edward Marynarz writes: > On Mon, Dec 11, 2017 at 12:15 AM, Rusty Russell > wrote: > >> >> In particular, fees are charged on entry to the channel, so if there's >> an A->B channel, A charges the fee. If you traverse B->C, B charges the >> fee, etc. >> > > Thank you for your explanations. > > It's good, though not as good as if both sender and recipient could set > their own fees. I know it would have made everything more complicated but > receiving is actually more costly than sending. If you have less balance > than the initial opening of the channel, it is risk-free. But forwarding nodes do both, so they can charge appropriate fees. > Another trivial question: can the fee be negative? It might help with some > channel rebalancing. In my original implementation, they could be. However, that turns out to be a very strange idea, and complicates routing. > I tried to get the information from BOLT #3 but BOLT's are very hard to > read if you are not an expert. Who pays for the closing of the channel? Is > it the person who initiates the closing? Since opening and closing fees are > probably going to be larger than lifetime channel fees, it is much more > important than the LN fees. I worry about a scenario that I create a > channel (paying fees), send some funds through the channel to have the > channel available also for receiving and the other side of the channel, > simply cashes out the balance, and I'm without the channel opening fees > and with no receiving channel. The channel initiator pays all onchain fees, at the moment. This is simple, but potentially gamable. However, current alternatives are complex and potentially gamable, so we went with simple. Cheers, Rusty.