High level fee mechanics [combined summary]



Individual post summaries: Click here to read the original discussion on the lightning-dev mailing list

Published on: 2018-04-13T16:13:18+00:00


Summary:

The writer is seeking a comprehensive understanding of the mechanics of Lightning fees, specifically in the case of routed payments. To illustrate their query, they present an example of a multi-hop payment from A to D through intermediate nodes B and C, which are connected by established channels. The writer's primary objective is to grasp how fees are determined, communicated, and ultimately collected in such a payment scenario.The writer poses several inquiries regarding the process. Firstly, they wonder if A is aware of the fees associated with nodes B and C prior to initiating the payment. Additionally, they seek insight into how A determines the precise amount of fees required to be added to the payment, effectively covering all fees along the payment route. Furthermore, the writer questions whether D is informed about the total payment amount, including all applicable fees. Lastly, they express curiosity about the actual mechanism through which fees are claimed.In response to the writer's queries, it is explained that fees are announced through node gossip using the `channel_update` message in BOLT#7. This message contains information about the fee_base_msat and fee_proportional_millionths for each channel. If a node has outdated fee information, routing will fail, but the `channel_update` will be sent as part of the error message. The sender computes the total fees by adding the fees from each hop along the payment route. The sender offers a value to each intermediary node that is higher than what they are instructed to forward, with the difference being the fee. As the source of the payment, the sender ends up paying the entire fee.However, it is not explicitly mentioned whether A is aware of the fees associated with nodes B and C prior to initiating the payment. Similarly, it is unclear if D is informed about the total payment amount, including all applicable fees. Overall, the writer is eager for guidance and hopes that someone can direct them towards the appropriate resources or provide answers to their specific queries, enabling them to acquire a clear understanding of the aforementioned aspects of Lightning fees and routed payments.


Updated on: 2023-07-31T19:52:49.734061+00:00