12

How are fees determined in the Lightning Network?

For transactions that occur on chain, fees are determined by the availability or demand for space in node's mempools. How are they determined in the Lightning Network?

If there aren't fees in the Lightning Network, what is the economic incentive to operate a node?

3 Answers 3

8

Fees are determined by the node operators. It's a free market, you can set whatever fee you want. Of course there's lots of competition, so if you want people to route payments through you, you should set a low or no fee.

If there aren't fees in the Lightning Network, what is the economic incentive to operate a node?

Even without fees, there is still an incentive to operating a node and using LN. In order to use LN, you must be a node. You will want to use LN to avoid paying higher fees with on chain transactions, and thus you will be operating a LN node.

2
  • Can the fee for a given node be reactive to other node fees? Is this system akin to the mempool bidding system of onchain? Could fees be more related to how much liquidity a node has? i.e. higher liquidity nodes have higher fees
    – arshbot
    Jan 17, 2018 at 3:11
  • 1
    Certainly. The fee is set by the operator, and they can change it as they want. Once a payment begins routing through them, the fee is fixed for that particular payment so the node operator can't change it for that payment. But they can change it for future payments.
    – Ava Chow
    Jan 17, 2018 at 3:14
4

I'd simply like to expand on Andrew's answer and mention that the routing algorithm used to find the various hops towards your final destination payment will also impact your resulting fee.

The idea is that channels sometimes become almost exhausted - where most of the money is pushed towards one direction. This is bad for people because it would mean that their channels cannot be reused; you'd have to open a new channel for new payments, hence on-chain transactions.

If a channel is almost exhausted, the person of the channel with less money (exhausted towards her) will want payments routed towards her to allow her channel to be full again so she can make more payments on that same channel without reopening a new one.

She will actually want to pay if someone chooses her channel to route their payments -- hence sometimes you'll have negative fees.

This means that a routing algorithm will actually look for paths where you actually get paid (negative fees) because you'd be rebalancing some channels along the way.

1

Addiotionaly you can estimate exactly what fee you are going to pay reading two parameter [fee_base_msat, fee_proportional_millionths] in nodes policy and applying the following formula:

fee_base_msat + ( amount_to_forward * fee_proportional_millionths / 1000000 )

Ref[https://github.com/ElementsProject/lightning/blob/master/lightningd/peer_htlcs.c]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.