getAlby / lndhub.go

Accounting wrapper for the Lightning Network. It provides separate accounts for end-users. (LndHub compatible API written in Go)
GNU General Public License v3.0
86 stars 23 forks source link

Add support for service fees #474

Closed bumi closed 9 months ago

bumi commented 10 months ago

This introduces a new transaction type "service_fee". Each outgoing payment is charged a service fee of x/1000. The service fee entries is added with the routing fee reserve entry. For failed payments the service fee is reversed.

A threshold up to which transactions are free can be configured (NO_SERVICE_FEE_UP_TO_AMOUNT)

bumi commented 10 months ago

transaction entries are associated with the invoice and have a type (outgoing, service_fee, fee, etc.)this is associating the related tx entries.