lightning-dev

Directionality of the transaction fees

Directionality of the transaction fees

Original Postby Johan Torås Halseth

Posted on: December 7, 2017 09:13 UTC

Johan, a member of a mailing list dedicated to discussing the Lightning Network, responded to a question posed by Edziu Marynarz about setting fees for each direction of a channel.

Johan provided a link to a GitHub page that explains how each node in a channel can announce the fee it will take to route a payment in the direction leading "away" from it. He also mentioned the use of "channel reserves," which ensure that each node always has some balance at stake in case an old state is broadcast. In his original email, Edziu had asked why such functionality would be necessary. He explained that if a bidirectional channel were set up with Alice and Bob, but most transactions were routed from Alice to Edziu and then to Bob, the channel would become imbalanced. In this scenario, Edziu would have 1900 satoshi in the Alice channel and only 100 satoshi in the Bob channel. If traffic continued in this direction, the route would stop working, and Edziu would have to close the channels to rebalance them or wait an extended period of time. Edziu suggested that if the fee could depend on the direction, one could ramp up fees on the receiving end of the channel that was getting large and lower the one that was empty to prevent the imbalance. He also mentioned that there is a risk factor involved, as Lightning Network channels get riskier on the receive side the more the channel value deviates from the original state. Regulating this imbalance with fees could mitigate this risk. Edziu concluded by saying that it would be best if Lightning Network applications could regulate imbalances automatically.