-
Notifications
You must be signed in to change notification settings - Fork 38
RFC: Node Fee Policy #1139
Comments
Will need to spend some time on this but some initial thoughts: Generally, the way that we can implement fees within Connext is to have the node propose an app with a receiver for a lower balance than the sender's app. This way the node can keep the difference between the two. The node can of course implement the fee based on some internal policy. The receiver can also choose to "accept" the fee by explicitly not unlocking the transfer in the event that the node attempts to collect more fees than expected. However, one thing I'm not certain about is how the receiver can know how much the sender originally sent -- the only data that is actually persisted across apps in the htlc application is the actual hashed preimage. Therefore, unless the sender and receiver agree upon a payment amount out-of-protocol, there's no way for the receiver to be certain that the "amount paid by sender" that the node reports is actually accurate. I believe that lightning handles this currently with an invoicing protocol which "pulls" payments by including all of the recipient's payment details in information that is sent out-of-band to the sender. In Connext, we "push" payments (which IMO has much better availability tradeoffs). Note that we can always include the Perhaps what we can do in the HTLC case is to include the |
P.s. In the case of XUD this isn't actually a huge issue. Say Alice is creating a BTC transfer to Bob in exchange for an ETH transfer from Bob. Alice is only incentivized to unlock Bob's ETH transfer if she agrees with the "rate" (which would bake fee into it) |
That is true, in our case the xud layer is the out-of-band communication layer that ensures received amounts have to be .. exact otherwise trades will fail and payments won't execute. We don't ensure values for forwarding/routing fees though, we believe the lower payment channel protocol should do that.
Lightning can do both in the meanwhile (push & pull). To put it short: for push, the receiver does not know how much to expect and what fees were involved and default is to accept whatever payment comes in. It does need out-of-band communication to configure a lightning node to reject a push payment e.g. below a certain amount from a certain peer. Pull or invoicing, doesn't have this problem and the receiver only accepts final amounts of minimum the invoiced amount (and actually up to twice the amount of the invoice (reason). But all that is not really related to how fees get communicated and how the sender know how much more to add to the raw send amount. In LN, fees get broadcasted ("gossiped") P2P as fee policy and the sender knows how to construct the first HTLC because it knows how much each hop in the route will deduct before it sends the payment. In a push-payment (which is still somewhat experimental) it would need to tell the receiver beforehand via a p2p message "heads-up, payment with hash Reference: |
Is your feature request related to a problem? Please describe.
Currently the indra node doesn't ask for any sort of fees, but sponsors quite some things. Mainly:
Describe the solution you'd like
A "fee policy" concept for the the node.
TBD:
A "fee management" concept for the node.
The text was updated successfully, but these errors were encountered: