lightninglabs / pool

Lightning Pool: a non-custodial batched uniform clearing-price auction for Lightning Channel Leases (LCL). An LCL packages up inbound channel liquidity (ability to receive funds) as a fixed income asset with a maturity date expressed in blocks.
MIT License
253 stars 47 forks source link

orders: add a new MustMatch order matching predicate that allows directed orders #220

Open Roasbeef opened 3 years ago

Roasbeef commented 3 years ago

It would be useful to add a new order matching perdicate, called MustMatch (as an examlpe), that takes a list of public keys and only allows an order to be matched if the other side of the match is amongst that set of public keys. This allows users to attempt to purchase/sell channels to/from an specific node. Such a feature can be used as an example to create a market driven autopilot agent that attempts to greedily maximize a metric such as betweenness centrality by purchasing inbound channels from the set of N nodes that will serve to maximize its personal bt centrality gain.

Swissnode commented 3 years ago

is bt centrality a good metric on the lightning network? Do I even understand the metric correctly in that the more peers are connected to a node the higher its bt centrality score goes up?

This then leads to superhubs, no? But perhaps I don't yet understand bt centrality enough...

Roasbeef commented 3 years ago

What I described above would be about iteratively maximizing your own centrality. So essentially, you want your node to be part of more of the possible set of shortest paths between two nodes. To do this you'd compute your current centrality, then compute the relative gain by adding a new channel to a given peer, then repeat this until you've allocated your funds to your liking.

Do I even understand the metric correctly in that the more peers are connected to a node the higher its bt centrality score goes up?

No, if a peer has 10 peers connect to it but those peers themselves say only have that one connection to that peer, this doesn't affect their betweenness centrality.